source: pacpussensors/trunk/StdDbtPlayerComponents/CMakeLists.txt@ 118

Last change on this file since 118 was 111, checked in by DHERBOMEZ Gérald, 9 years ago

Delete deprecated call to shared memories. Use I/O mechanism instead.
Adjustement of dllimport and dllexport macros;

File size: 3.6 KB
RevLine 
[99]1#########################quick start############################################
2#cmake ../ -G "CodeBlocks - Unix Makefiles"
3#make
4#make install
5#make clean
6################################################################################
7project(StdDbtPlayerComponents)
8set(${PROJECT_NAME}_VERSION_MAJOR 0)
9set(${PROJECT_NAME}_VERSION_MINOR 1)
[111]10add_definitions( -DSTDDBTPLAYERCOMPONENTS_EXPORTS )
11add_definitions( -DDBTPLYSICK_EXPORTS)
12add_definitions( -DDBTPLYGPS_EXPORTS)
13
14
[99]15################################################################################
16create_export(EXPORT_HDR ${PROJECT_NAME})
17pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME})
18add_definitions (${QT_DEFINITIONS})
19
20find_package(Qt5Network REQUIRED)
21################################################################################
22# DIRECTORIES
[108]23include_directories(
[99]24 ${PROJECT_BINARY_DIR}
25 ${QT_INCLUDE_DIR}
26 ${PACPUS_INCLUDE_DIR}
27 ${PACPUS_INCLUDE_DIR}/Pacpus/
28)
29
30# ========================================
31# Link directories
32# ========================================
[108]33link_directories(
[99]34 ${PACPUS_LIB_DIR}
35)
36
37
38################################################################################
39# FILES
40set(PROJECT_HDRS
41 ${EXPORT_HDR}
42 StdDbtPlayerComponentsConfig.h
43 DbtPlySickLMSManager.h
[108]44 DbtPlySickLDMRSManager.h
45
46 DbtPlyAlascaManager.h
47 DbtPlyImageManager.h
48 DbtPlyCPTComponent.h
49
[109]50 DbtPlyGstManager.h
51 DbtPlyGgaManager.h
52 DbtPlyGpsConfig.h
53 DbtPlyVtgManager.h
54
[110]55 DbtPlyImageManager.h
56 ImageViewer.h
[99]57)
58set(PROJECT_SRCS
59 ${PLUGIN_CPP}
60 DbtPlySickLMSManager.cpp
[108]61 DbtPlySickLDMRSManager.cpp
[109]62
[108]63 DbtPlyAlascaManager.cpp
64 DbtPlyImageManager.cpp
65 DbtPlyCPTComponent.cpp
[109]66 DbtPlySickLDMRSManager.cpp
67
68 DbtPlyGstManager.cpp
69 DbtPlyGgaManager.cpp
70 DbtPlyVtgManager.cpp
[110]71 DbtPlyImageManager.cpp
72 ImageViewer.cpp
[99]73)
74
75set(FILES_TO_MOC
76 ${PLUGIN_HDR}
77 DbtPlySickLMSManager.h
[108]78 DbtPlySickLDMRSManager.h
79
80 DbtPlyAlascaManager.h
81 DbtPlyImageManager.h
82 DbtPlyCPTComponent.h
[109]83
84 DbtPlyGstManager.h
85 DbtPlyGpsConfig.h
86 DbtPlyGgaManager.h
87 DbtPlyVtgManager.h
88
[110]89 DbtPlyImageManager.h
90 ImageViewer.h
[99]91)
92
93set(UI_FILES
94)
95
96################################################################################
97# Qt: call moc, uic
98qt_wrap_cpp(PROJECT_MOC_SRCS
99 ${FILES_TO_MOC}
100)
101
102qt_wrap_ui(PROJECT_UI_SRCS
103 ${UI_FILES}
104)
105
106################################################################################
107# BUILD and LINK
108pacpus_add_library(${PROJECT_NAME} SHARED
109 ${PROJECT_HDRS}
110 ${PROJECT_SRCS}
111 ${PROJECT_MOC_SRCS}
112 ${PROJECT_UI_SRCS}
113)
114
115
116# ========================================
117# Libraries
118# ========================================
119set(LIBS
120 optimized FileLib debug FileLib_d
121 optimized PacpusLib debug PacpusLib_d
122 optimized PacpusTools debug PacpusTools_d
[108]123
[110]124 #optimized NMEA0183LIB debug NMEA0183LIB_d
[108]125
[99]126)
127if (WIN32)
128 list(APPEND LIBS
129 optimized ROAD_TIME debug ROAD_TIME_d
130 )
131endif()
[108]132# LINK
133target_link_libraries(${PROJECT_NAME}
134 ${PACPUS_LIBRARIES}
135 ${PACPUS_DEPENDENCIES_LIB}
[99]136 ${LIBS}
[108]137 ${QT_LIBRARIES}
138
[110]139 #optimized NMEA0183LIB debug NMEA0183LIB_d
[99]140 )
141qt5_use_modules(${PROJECT_NAME} Network)
142################################################################################
143# FOLDERS
144pacpus_folder(${PROJECT_NAME} "components")
145################################################################################
146# INSTALL
[108]147pacpus_install(${PROJECT_NAME})
[99]148
149# install headers
150install(
151 DIRECTORY
152 ${StdDbtPlayerComponents_SOURCE_DIR}
153 DESTINATION
154 ${PACPUS_INSTALL_DIR}/include
155 FILES_MATCHING PATTERN "*.h"
156)
Note: See TracBrowser for help on using the repository browser.