source: pacpussensors/trunk/Dualshock/CMakeLists.txt@ 84

Last change on this file since 84 was 21, checked in by phudelai, 11 years ago

New component for the wifibot and the dualshock 3

File size: 2.2 KB
RevLine 
[21]1project(Dualshock)
2################################################################################
3add_definitions( -DDUALSHOCKXT_EXPORTS )
4
5# ========================================
6# Configure qt4
7# ========================================
8if(QT4_FOUND)
9 set(QT_USE_QTXML true)
10 set(QT_USE_QTNETWORK true)
11 include(${QT_USE_FILE})
12else()
13 message(ERROR "Qt4 needed")
14endif()
15
16# ========================================
17# Compiler definitions
18# ========================================
19add_definitions(
20 ${QT_DEFINITIONS}
21)
22
23# ========================================
24# Include directories
25# ========================================
26include_directories(
27 ${PROJECT_BINARY_DIR}
28 ${QT_INCLUDE_DIR}
29)
30
31# ========================================
32# Link directories
33# ========================================
34link_directories( ${PACPUS_LIB_DIR}
35)
36
37message (STATUS ${PACPUS_LIB_DIR})
38
39pacpus_plugin(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} )
40
41# ========================================
42# List of sources
43# ========================================
44set(
45 PROJECT_SRCS
46 controller.cpp
47 dualshock.cpp
48 ${PLUGIN_CPP}
49)
50
51# ========================================
52# Files to MOC
53# ========================================
54set(
55 FILES_TO_MOC
56 controller.h
57 dualshock.h
58 ${PLUGIN_H}
59)
60
61set(
62 UI_FILES
63
64)
65
66# ========================================
67# Call MOC
68# ========================================
69qt4_wrap_cpp(
70 PROJECT_MOC_SRCS
71 ${FILES_TO_MOC}
72)
73
74qt4_wrap_ui(
75 PROJECT_UI_SRCS
76 ${UI_FILES}
77)
78
79# ========================================
80# Build a library
81# ========================================
82pacpus_add_library(
83 ${PROJECT_NAME} SHARED
84 ${PROJECT_SRCS}
85 ${PROJECT_MOC_SRCS}
86 ${PROJECT_UI_SRCS}
87)
88
89message(STATUS ${PACPUS_DEPENDENCIES_LIB} )
90
91# ========================================
92# Libraries
93# ========================================
94# All the platform
95target_link_libraries(
96 ${PROJECT_NAME}
97 ${PACPUS_LIBRARIES}
98 ${QT_LIBRARIES}
99 ${PACPUS_DEPENDENCIES_LIB}
100 PacpusTools
101)
102
103# ========================================
104# Install
105# ========================================
106pacpus_install(${PROJECT_NAME})
107
Note: See TracBrowser for help on using the repository browser.