[99] | 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)
|
---|
[111] | 10 | add_definitions( -DSTDDBTPLAYERCOMPONENTS_EXPORTS )
|
---|
| 11 | add_definitions( -DDBTPLYSICK_EXPORTS)
|
---|
| 12 | add_definitions( -DDBTPLYGPS_EXPORTS)
|
---|
| 13 |
|
---|
| 14 |
|
---|
[99] | 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
|
---|
[108] | 23 | include_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] | 33 | link_directories(
|
---|
[99] | 34 | ${PACPUS_LIB_DIR}
|
---|
| 35 | )
|
---|
| 36 |
|
---|
| 37 |
|
---|
| 38 | ################################################################################
|
---|
| 39 | # FILES
|
---|
| 40 | set(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 | )
|
---|
| 58 | set(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 |
|
---|
| 75 | set(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 |
|
---|
| 93 | set(UI_FILES
|
---|
| 94 | )
|
---|
| 95 |
|
---|
| 96 | ################################################################################
|
---|
| 97 | # Qt: call moc, uic
|
---|
| 98 | qt_wrap_cpp(PROJECT_MOC_SRCS
|
---|
| 99 | ${FILES_TO_MOC}
|
---|
| 100 | )
|
---|
| 101 |
|
---|
| 102 | qt_wrap_ui(PROJECT_UI_SRCS
|
---|
| 103 | ${UI_FILES}
|
---|
| 104 | )
|
---|
| 105 |
|
---|
| 106 | ################################################################################
|
---|
| 107 | # BUILD and LINK
|
---|
| 108 | pacpus_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 | # ========================================
|
---|
| 119 | set(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 | )
|
---|
| 127 | if (WIN32)
|
---|
| 128 | list(APPEND LIBS
|
---|
| 129 | optimized ROAD_TIME debug ROAD_TIME_d
|
---|
| 130 | )
|
---|
| 131 | endif()
|
---|
[108] | 132 | # LINK
|
---|
| 133 | target_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 | )
|
---|
| 141 | qt5_use_modules(${PROJECT_NAME} Network)
|
---|
| 142 | ################################################################################
|
---|
| 143 | # FOLDERS
|
---|
| 144 | pacpus_folder(${PROJECT_NAME} "components")
|
---|
| 145 | ################################################################################
|
---|
| 146 | # INSTALL
|
---|
[108] | 147 | pacpus_install(${PROJECT_NAME})
|
---|
[99] | 148 |
|
---|
| 149 | # install headers
|
---|
| 150 | install(
|
---|
| 151 | DIRECTORY
|
---|
| 152 | ${StdDbtPlayerComponents_SOURCE_DIR}
|
---|
| 153 | DESTINATION
|
---|
| 154 | ${PACPUS_INSTALL_DIR}/include
|
---|
| 155 | FILES_MATCHING PATTERN "*.h"
|
---|
| 156 | )
|
---|