source: pacpussensors/trunk/Gps/CMakeLists.txt@ 59

Last change on this file since 59 was 59, checked in by DHERBOMEZ Gérald, 10 years ago

Integration of new modules:

  • GPS NMEA0183 decoder
  • Span CPT Decoder

Update of:

File size: 3.4 KB
Line 
1project(Gps)
2################################################################################
3
4add_definitions( -DGPS_EXPORTS )
5
6# ========================================
7# Configure qt4
8# ========================================
9if(QT4_FOUND)
10 set(QT_USE_QTXML true)
11 set(QT_USE_QTNETWORK true)
12 include(${QT_USE_FILE})
13else()
14 message(ERROR "Qt4 needed")
15endif()
16
17# ========================================
18# Compiler definitions
19# ========================================
20add_definitions(
21 ${QT_DEFINITIONS}
22)
23
24# ========================================
25# Include directories
26# ========================================
27include_directories(
28 ${PROJECT_BINARY_DIR}
29 ${QT_INCLUDE_DIR}
30)
31
32# ========================================
33# Link directories
34# ========================================
35link_directories(
36 ${PACPUS_LIB_DIR}
37)
38
39
40pacpus_plugin(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} )
41
42# ========================================
43# List of sources
44# ========================================
45set(
46 PROJECT_SRCS
47 gpsComponent.cpp
48 gpsComponent.h
49 GpsFrames.h
50# SeptentrioSocket.h
51# SeptentrioSocket.cpp
52# SeptentrioComponent.h
53# SeptentrioComponent.cpp
54 #UbloxComponent.h
55 #UbloxComponent.cpp
56 #polarxGPSTKsolver.cpp
57# ui/polarxmainwindow.hpp
58# ui/polarxmainwindow.cpp
59 ${PLUGIN_CPP}
60)
61
62if(WIN32)
63set(PROJECT_SRCS
64 ${PROJECT_SRCS}
65 ../driver/Win32SerialPort.cpp
66 ../driver/Win32SerialPort.h
67)
68endif(WIN32)
69
70if(UNIX)
71set(PROJECT_SRCS
72 ${PROJECT_SRCS}
73 ../driver/PosixSerialPort.cpp
74 ../driver/PosixSerialPort.h
75 )
76endif(UNIX)
77
78
79# ========================================
80# Files to MOC
81# ========================================
82
83if(UNIX)
84set(FILES_TO_MOC
85 # add here the header files that you want to MOC
86 gpsComponent.h
87 SeptentrioComponent.h
88 SeptentrioSocket.h
89 ../driver/PosixSerialPort.h
90 ui/polarxmainwindow.hpp
91 ${PLUGIN_H}
92 )
93endif(UNIX)
94
95if(WIN32)
96set(FILES_TO_MOC
97 # add here the header files that you want to MOC
98 gpsComponent.h
99# SeptentrioComponent.h
100# SeptentrioSocket.h
101 ../driver/Win32SerialPort.h
102# ui/polarxmainwindow.hpp
103 ${PLUGIN_H}
104 )
105endif(WIN32)
106
107set(
108 UI_FILES
109)
110
111# ========================================
112# Call MOC
113# ========================================
114qt4_wrap_cpp(
115 PROJECT_MOC_SRCS
116 ${FILES_TO_MOC}
117)
118
119qt4_wrap_ui(
120 PROJECT_UI_SRCS
121 ${UI_FILES}
122)
123
124# ========================================
125# Build a library
126# ========================================
127pacpus_add_library(
128 ${PROJECT_NAME} SHARED
129 ${PROJECT_SRCS}
130 ${PROJECT_MOC_SRCS}
131 ${PROJECT_UI_SRCS}
132)
133
134# ========================================
135# Libraries
136# ========================================
137if(WIN32)
138 set(LIBS
139 # add your specific libraries to link here
140 optimized NMEA0183LIB debug NMEA0183LIB_d
141 )
142endif(WIN32)
143
144if(UNIX)
145 set(LIBS
146 # add your specific libraries to link here
147
148 )
149endif(UNIX)
150
151# All the platform
152target_link_libraries(
153 ${PROJECT_NAME}
154 ${PACPUS_LIBRARIES}
155 ${QT_LIBRARIES}
156 ${PACPUS_DEPENDENCIES_LIB}
157 ${LIBS}
158# optimized PacpusTools debug PacpusTools_d
159)
160pacpus_folder(${PROJECT_NAME} "components")
161
162# ========================================
163# Install
164# ========================================
165pacpus_install(${PROJECT_NAME})
Note: See TracBrowser for help on using the repository browser.