source: pacpussensors/trunk/Sick/CMakeLists.txt@ 55

Last change on this file since 55 was 37, checked in by cfougera, 11 years ago

First commit of Sick lidars interfaces.

File size: 2.7 KB
RevLine 
[37]1project(Sick)
2
3################################################################################
4add_definitions( -DSICKLDMRS_EXPORTS )
5
6
7
8# ========================================
9# Configure qt4
10# ========================================
11if(QT4_FOUND)
12 set(QT_USE_QTXML true)
13 set(QT_USE_QTNETWORK true)
14 include(${QT_USE_FILE})
15else()
16 message(ERROR "Qt4 needed")
17endif()
18
19# ========================================
20# Compiler definitions
21# ========================================
22add_definitions(
23 ${QT_DEFINITIONS}
24)
25
26# ========================================
27# Include directories
28# ========================================
29include_directories(
30 ${PROJECT_BINARY_DIR}
31 ${QT_INCLUDE_DIR}
32)
33
34# ========================================
35# Link directories
36# ========================================
37link_directories( ${PACPUS_LIB_DIR}
38)
39
40
41pacpus_plugin(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} )
42
43# ========================================
44# List of sources
45# ========================================
46set(
47 PROJECT_SRCS
48 SickComponent.h
49 SickComponent.cpp
50 AbstractSickSensor.h
51 AbstractSickSensor.cpp
52 SickLDMRSSensor.h
53 SickLDMRSSensor.cpp
54 SickLMSSensor.h
55 SickLMSSensor.cpp
56 SickSocket.h
57 SickSocket.cpp
58 ${PLUGIN_CPP}
59)
60
61# ========================================
62# Files to MOC
63# ========================================
64set(
65 FILES_TO_MOC
66 SickComponent.h
67 SickLDMRSSensor.h
68 SickLMSSensor.h
69 AbstractSickSensor.h
70 SickSocket.h
71 ${PLUGIN_H}
72)
73
74set(
75 UI_FILES
76
77)
78
79# ========================================
80# Call MOC
81# ========================================
82qt4_wrap_cpp(
83 PROJECT_MOC_SRCS
84 ${FILES_TO_MOC}
85)
86
87qt4_wrap_ui(
88 PROJECT_UI_SRCS
89 ${UI_FILES}
90)
91
92# ========================================
93# Build a library
94# ========================================
95pacpus_add_library(
96 ${PROJECT_NAME} SHARED
97 ${PROJECT_SRCS}
98 ${PROJECT_MOC_SRCS}
99 ${PROJECT_UI_SRCS}
100)
101
102message(STATUS ${PACPUS_DEPENDENCIES_LIB} )
103
104set(LIBS
105 optimized FileLib debug FileLib_d
106 optimized PacpusLib debug PacpusLib_d
107 optimized PacpusTools debug PacpusTools_d
108)
109if (WIN32)
110 list(APPEND LIBS
111 optimized ROAD_TIME debug ROAD_TIME_d
112 )
113endif()
114
115# ========================================
116# Libraries
117# ========================================
118# All the platform
119target_link_libraries(
120 ${PROJECT_NAME}
121 ${PACPUS_LIBRARIES}
122 ${QT_LIBRARIES}
123 ${PACPUS_DEPENDENCIES_LIB}
124 ${LIBS}
125)
126
127pacpus_folder(${PROJECT_NAME} "components")
128
129# ========================================
130# Install
131# ========================================
132pacpus_install(${PROJECT_NAME})
Note: See TracBrowser for help on using the repository browser.