source: pacpussensors/trunk/PacpusSocket/CMakeLists.txt@ 139

Last change on this file since 139 was 126, checked in by DHERBOMEZ Gérald, 9 years ago

StringGenerator component added to test PacpusUDPSocket
XML file to test provided

File size: 2.5 KB
Line 
1project(PacpusSocket)
2set(${PROJECT_NAME}_VERSION_MAJOR 0)
3set(${PROJECT_NAME}_VERSION_MINOR 1)
4add_definitions( -DPACPUSSOCKET_EXPORTS )
5################################################################################
6create_export(EXPORT_HDR ${PROJECT_NAME})
7pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME})
8add_definitions (${QT_DEFINITIONS})
9
10find_package(Qt5Network REQUIRED)
11################################################################################
12# DIRECTORIES
13include_directories(
14 ${PROJECT_BINARY_DIR}
15 ${QT_INCLUDE_DIR}
16 ${PACPUS_INCLUDE_DIR}
17 ${PACPUS_INCLUDE_DIR}/Pacpus/
18)
19
20# ========================================
21# Link directories
22# ========================================
23link_directories(
24 ${PACPUS_LIB_DIR}
25)
26
27
28################################################################################
29# FILES
30set(PROJECT_HDRS
31 ${EXPORT_HDR}
32 PacpusSocketAirplug.h
33 PacpusUDPSocket.h
34 StringGenerator.h
35)
36set(PROJECT_SRCS
37 ${PLUGIN_CPP}
38 PacpusSocketAirplug.cpp
39 PacpusUDPSocket.cpp
40 StringGenerator.cpp
41)
42
43set(FILES_TO_MOC
44 ${PLUGIN_HDR}
45 PacpusSocketAirplug.h
46 PacpusUDPSocket.h
47 StringGenerator.h
48)
49
50set(UI_FILES
51)
52
53################################################################################
54# Qt: call moc, uic
55qt_wrap_cpp(PROJECT_MOC_SRCS
56 ${FILES_TO_MOC}
57)
58
59qt_wrap_ui(PROJECT_UI_SRCS
60 ${UI_FILES}
61)
62
63################################################################################
64# BUILD and LINK
65pacpus_add_library(${PROJECT_NAME} SHARED
66 ${PROJECT_HDRS}
67 ${PROJECT_SRCS}
68 ${PROJECT_MOC_SRCS}
69 ${PROJECT_UI_SRCS}
70)
71
72
73# ========================================
74# Libraries
75# ========================================
76set(LIBS
77 optimized FileLib debug FileLib_d
78 optimized PacpusLib debug PacpusLib_d
79 optimized PacpusTools debug PacpusTools_d
80)
81if (WIN32)
82 list(APPEND LIBS
83 optimized ROAD_TIME debug ROAD_TIME_d
84 )
85endif()
86# LINK
87target_link_libraries(${PROJECT_NAME}
88 ${PACPUS_LIBRARIES}
89 ${PACPUS_DEPENDENCIES_LIB}
90 ${LIBS}
91 ${QT_LIBRARIES}
92 )
93qt5_use_modules(${PROJECT_NAME} Network)
94################################################################################
95# FOLDERS
96pacpus_folder(${PROJECT_NAME} "components")
97################################################################################
98# INSTALL
99pacpus_install(${PROJECT_NAME})
100
101install(
102 DIRECTORY ${PacpusSocket_SOURCE_DIR}
103 DESTINATION ${PACPUS_INSTALL_DIR}/include
104 FILES_MATCHING PATTERN "*.h"
105)
Note: See TracBrowser for help on using the repository browser.