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