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

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

Minor: library name.

File size: 2.5 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# INCLUDES
12include_directories(
13 ${PACPUSCITYVIP_INCLUDE_DIR}
14 ${PROJECT_BINARY_DIR}
15 ${QT_INCLUDE_DIR}
16)
17
18################################################################################
19# Link directories
20set(SRC_BINARY_DIR "${PROJECT_BINARY_DIR}/../../src")
21get_filename_component(SRC_BINARY_DIR "${SRC_BINARY_DIR}" ABSOLUTE)
22#message("\${SRC_BINARY_DIR} = ${SRC_BINARY_DIR}")
23link_directories(
24 ${SRC_BINARY_DIR}/PacpusLib
25 ${SRC_BINARY_DIR}/PacpusTools
26 ${SRC_BINARY_DIR}/RoadTime
27)
28
29################################################################################
30# FILES
31set(PROJECT_HDRS
32 ${EXPORT_HDR}
33 ProducerExample.h
34 ConsumerExample.h
35 XML/${PROJECT_NAME}.xml
36 XML/${PROJECT_NAME}_d.xml
37)
38set(PROJECT_SRCS
39 ${PLUGIN_CPP}
40 ProducerExample.cpp
41 ConsumerExample.cpp
42)
43
44set(FILES_TO_MOC
45 ${PLUGIN_HDR}
46 ProducerExample.h
47 ConsumerExample.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
72list(APPEND PACPUS_LIBRARIES
73 optimized PacpusLib debug PacpusLib_d
74)
75if(WIN32)
76 list(APPEND PACPUS_LIBRARIES
77 optimized ROAD_TIME debug ROAD_TIME_d
78 )
79endif()
80#message(STATUS "\${PACPUS_LIBRARIES} = ${PACPUS_LIBRARIES}")
81#message(STATUS "\${PACPUS_DEPENDENCIES_LIB} = ${PACPUS_DEPENDENCIES_LIB}")
82# LIBS
83set(LIBS
84 ${PACPUS_LIBRARIES}
85 ${PACPUS_DEPENDENCIES_LIB}
86 #${OpenCV_LIBRARIES}
87 ${QT_LIBRARIES}
88)
89
90# LINK
91target_link_libraries(${PROJECT_NAME} ${LIBS})
92
93################################################################################
94# FOLDERS
95pacpus_folder(${PROJECT_NAME} "examples")
96
97################################################################################
98# INSTALL
99pacpus_install(${PROJECT_NAME})
100
101# Installation of the headers
102#install(DIRECTORY ${PACPUSCITYVIP_INCLUDE_DIR} DESTINATION "${PACPUS_ROOT}")
Note: See TracBrowser for help on using the repository browser.