source: pacpussensors/trunk/StdDbtPlayerComponents/CMakeLists.txt@ 101

Last change on this file since 101 was 100, checked in by nguyenhu, 9 years ago

comment out #{PROJECT_NAME}.xml

File size: 3.0 KB
Line 
1#########################quick start############################################
2#cmake ../ -G "CodeBlocks - Unix Makefiles"
3#make
4#make install
5#make clean
6################################################################################
7project(StdDbtPlayerComponents)
8set(${PROJECT_NAME}_VERSION_MAJOR 0)
9set(${PROJECT_NAME}_VERSION_MINOR 1)
10add_definitions( -DSTDDBTPLAYERCOMPONENTS_EXPORTS )
11add_definitions( -DDBTPLYSICK_EXPORTS)
12add_definitions( -DDBTPLYSICK_EXPORTS)
13################################################################################
14create_export(EXPORT_HDR ${PROJECT_NAME})
15pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME})
16add_definitions (${QT_DEFINITIONS})
17
18find_package(Qt5Network REQUIRED)
19################################################################################
20# DIRECTORIES
21include_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# ========================================
31link_directories(
32 ${PACPUS_LIB_DIR}
33)
34
35
36################################################################################
37# FILES
38set(PROJECT_HDRS
39 ${EXPORT_HDR}
40 StdDbtPlayerComponentsConfig.h
41 DbtPlySickLMSManager.h
42 DbtPlySickLDMRSManager.h
43 #${PROJECT_NAME}.xml
44 #${PROJECT_NAME}_d.xml
45)
46set(PROJECT_SRCS
47 ${PLUGIN_CPP}
48 DbtPlySickLMSManager.cpp
49 DbtPlySickLDMRSManager.cpp
50)
51
52set(FILES_TO_MOC
53 ${PLUGIN_HDR}
54 DbtPlySickLMSManager.h
55 DbtPlySickLDMRSManager.h
56)
57
58set(UI_FILES
59)
60
61################################################################################
62# Qt: call moc, uic
63qt_wrap_cpp(PROJECT_MOC_SRCS
64 ${FILES_TO_MOC}
65)
66
67qt_wrap_ui(PROJECT_UI_SRCS
68 ${UI_FILES}
69)
70
71################################################################################
72# BUILD and LINK
73pacpus_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# ========================================
84set(LIBS
85 optimized FileLib debug FileLib_d
86 optimized PacpusLib debug PacpusLib_d
87 optimized PacpusTools debug PacpusTools_d
88)
89if (WIN32)
90 list(APPEND LIBS
91 optimized ROAD_TIME debug ROAD_TIME_d
92 )
93endif()
94# LINK
95target_link_libraries(${PROJECT_NAME}
96 ${PACPUS_LIBRARIES}
97 ${PACPUS_DEPENDENCIES_LIB}
98 ${LIBS}
99 ${QT_LIBRARIES}
100 )
101qt5_use_modules(${PROJECT_NAME} Network)
102################################################################################
103# FOLDERS
104pacpus_folder(${PROJECT_NAME} "components")
105################################################################################
106# INSTALL
107pacpus_install(${PROJECT_NAME})
108
109# install headers
110install(
111 DIRECTORY
112 ${StdDbtPlayerComponents_SOURCE_DIR}
113 DESTINATION
114 ${PACPUS_INSTALL_DIR}/include
115 FILES_MATCHING PATTERN "*.h"
116)
Note: See TracBrowser for help on using the repository browser.