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