source: pacpusframework/trunk/examples/ProducerConsumerExample/CMakeLists.txt@ 372

Last change on this file since 372 was 301, checked in by Marek Kurdej, 11 years ago

Some Unix fixes

File size: 2.3 KB
Line 
1project(ProducerConsumerExample)
2
3set(${PROJECT_NAME}_VERSION_MAJOR 0)
4set(${PROJECT_NAME}_VERSION_MINOR 1)
5
6################################################################################
7create_export(EXPORT_HDR ${PROJECT_NAME})
8pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME})
9
10################################################################################
11# DIRECTORIES
12include_directories(
13 ${PACPUSCITYVIP_INCLUDE_DIR}
14 ${PROJECT_BINARY_DIR}
15 ${QT_INCLUDE_DIR}
16)
17
18set(SRC_BINARY_DIR "${PROJECT_BINARY_DIR}/../../src")
19get_filename_component(SRC_BINARY_DIR "${SRC_BINARY_DIR}" ABSOLUTE)
20#message("\${SRC_BINARY_DIR} = ${SRC_BINARY_DIR}")
21link_directories(
22 ${SRC_BINARY_DIR}/PacpusLib
23 ${SRC_BINARY_DIR}/PacpusTools
24 ${SRC_BINARY_DIR}/RoadTime
25)
26
27################################################################################
28# FILES
29set(PROJECT_HDRS
30 ${EXPORT_HDR}
31 ProducerExample.h
32 ConsumerExample.h
33 XML/${PROJECT_NAME}.xml
34 XML/${PROJECT_NAME}_d.xml
35)
36set(PROJECT_SRCS
37 ${PLUGIN_CPP}
38 ProducerExample.cpp
39 ConsumerExample.cpp
40)
41
42set(FILES_TO_MOC
43 ${PLUGIN_HDR}
44 ProducerExample.h
45 ConsumerExample.h
46)
47
48set(UI_FILES
49)
50
51################################################################################
52# Qt: call moc, uic
53qt_wrap_cpp(PROJECT_MOC_SRCS
54 ${FILES_TO_MOC}
55)
56
57qt_wrap_ui(PROJECT_UI_SRCS
58 ${UI_FILES}
59)
60
61################################################################################
62# BUILD and LINK
63pacpus_add_library(${PROJECT_NAME} SHARED
64 ${PROJECT_HDRS}
65 ${PROJECT_SRCS}
66 ${PROJECT_MOC_SRCS}
67 ${PROJECT_UI_SRCS}
68)
69
70list(APPEND PACPUS_LIBRARIES
71 optimized PacpusLib debug PacpusLib_d
72)
73if(WIN32)
74 list(APPEND PACPUS_LIBRARIES
75 optimized ROAD_TIME debug ROAD_TIME_d
76 )
77endif()
78
79# LIBS
80set(LIBS
81 ${PACPUS_LIBRARIES}
82 ${PACPUS_DEPENDENCIES_LIB}
83 ${QT_LIBRARIES}
84)
85
86# LINK
87target_link_libraries(${PROJECT_NAME} ${LIBS})
88
89################################################################################
90# FOLDERS
91pacpus_folder(${PROJECT_NAME} "examples")
92
93################################################################################
94# INSTALL
95pacpus_install(${PROJECT_NAME})
96
97# Installation of the headers
98#install(DIRECTORY ${PACPUSCITYVIP_INCLUDE_DIR} DESTINATION "${PACPUS_ROOT}")
Note: See TracBrowser for help on using the repository browser.