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