[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
|
---|
| 21 | include_directories(
|
---|
| 22 | ${PROJECT_BINARY_DIR}
|
---|
| 23 | ${QT_INCLUDE_DIR}
|
---|
| 24 | ${PACPUS_INCLUDE_DIR}
|
---|
| 25 | ${PACPUS_INCLUDE_DIR}/Pacpus/
|
---|
| 26 | )
|
---|
| 27 |
|
---|
| 28 | # ========================================
|
---|
| 29 | # Link directories
|
---|
| 30 | # ========================================
|
---|
| 31 | link_directories(
|
---|
| 32 | ${PACPUS_LIB_DIR}
|
---|
| 33 | )
|
---|
| 34 |
|
---|
| 35 |
|
---|
| 36 | ################################################################################
|
---|
| 37 | # FILES
|
---|
| 38 | set(PROJECT_HDRS
|
---|
| 39 | ${EXPORT_HDR}
|
---|
| 40 | StdDbtPlayerComponentsConfig.h
|
---|
| 41 | DbtPlySickLMSManager.h
|
---|
| 42 | DbtPlySickLDMRSManager.h
|
---|
[100] | 43 | #${PROJECT_NAME}.xml
|
---|
| 44 | #${PROJECT_NAME}_d.xml
|
---|
[99] | 45 | )
|
---|
| 46 | set(PROJECT_SRCS
|
---|
| 47 | ${PLUGIN_CPP}
|
---|
| 48 | DbtPlySickLMSManager.cpp
|
---|
| 49 | DbtPlySickLDMRSManager.cpp
|
---|
| 50 | )
|
---|
| 51 |
|
---|
| 52 | set(FILES_TO_MOC
|
---|
| 53 | ${PLUGIN_HDR}
|
---|
| 54 | DbtPlySickLMSManager.h
|
---|
| 55 | DbtPlySickLDMRSManager.h
|
---|
| 56 | )
|
---|
| 57 |
|
---|
| 58 | set(UI_FILES
|
---|
| 59 | )
|
---|
| 60 |
|
---|
| 61 | ################################################################################
|
---|
| 62 | # Qt: call moc, uic
|
---|
| 63 | qt_wrap_cpp(PROJECT_MOC_SRCS
|
---|
| 64 | ${FILES_TO_MOC}
|
---|
| 65 | )
|
---|
| 66 |
|
---|
| 67 | qt_wrap_ui(PROJECT_UI_SRCS
|
---|
| 68 | ${UI_FILES}
|
---|
| 69 | )
|
---|
| 70 |
|
---|
| 71 | ################################################################################
|
---|
| 72 | # BUILD and LINK
|
---|
| 73 | pacpus_add_library(${PROJECT_NAME} SHARED
|
---|
| 74 | ${PROJECT_HDRS}
|
---|
| 75 | ${PROJECT_SRCS}
|
---|
| 76 | ${PROJECT_MOC_SRCS}
|
---|
| 77 | ${PROJECT_UI_SRCS}
|
---|
| 78 | )
|
---|
| 79 |
|
---|
| 80 |
|
---|
| 81 | # ========================================
|
---|
| 82 | # Libraries
|
---|
| 83 | # ========================================
|
---|
| 84 | set(LIBS
|
---|
| 85 | optimized FileLib debug FileLib_d
|
---|
| 86 | optimized PacpusLib debug PacpusLib_d
|
---|
| 87 | optimized PacpusTools debug PacpusTools_d
|
---|
| 88 | )
|
---|
| 89 | if (WIN32)
|
---|
| 90 | list(APPEND LIBS
|
---|
| 91 | optimized ROAD_TIME debug ROAD_TIME_d
|
---|
| 92 | )
|
---|
| 93 | endif()
|
---|
| 94 | # LINK
|
---|
| 95 | target_link_libraries(${PROJECT_NAME}
|
---|
| 96 | ${PACPUS_LIBRARIES}
|
---|
| 97 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
| 98 | ${LIBS}
|
---|
| 99 | ${QT_LIBRARIES}
|
---|
| 100 | )
|
---|
| 101 | qt5_use_modules(${PROJECT_NAME} Network)
|
---|
| 102 | ################################################################################
|
---|
| 103 | # FOLDERS
|
---|
| 104 | pacpus_folder(${PROJECT_NAME} "components")
|
---|
| 105 | ################################################################################
|
---|
| 106 | # INSTALL
|
---|
| 107 | pacpus_install(${PROJECT_NAME})
|
---|
| 108 |
|
---|
| 109 | # install headers
|
---|
| 110 | install(
|
---|
| 111 | DIRECTORY
|
---|
| 112 | ${StdDbtPlayerComponents_SOURCE_DIR}
|
---|
| 113 | DESTINATION
|
---|
| 114 | ${PACPUS_INSTALL_DIR}/include
|
---|
| 115 | FILES_MATCHING PATTERN "*.h"
|
---|
| 116 | )
|
---|