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

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

Minor fixes. Clean-up.

File size: 2.9 KB
Line 
1project(ProducerConsumerExample)
2
3# ========================================
4# Basic Definitions
5# ========================================
6set(${PROJECT_NAME}_VERSION_MAJOR 0)
7set(${PROJECT_NAME}_VERSION_MINOR 1)
8
9create_export(EXPORT_HDR ${PROJECT_NAME})
10pacpus_plugin(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME})
11
12# ========================================
13# Compiler definitions
14# ========================================
15add_definitions(${QT_DEFINITIONS})
16
17# ========================================
18# Include directories
19# ========================================
20include_directories(
21 ${PACPUSCITYVIP_INCLUDE_DIR}
22 ${PROJECT_BINARY_DIR}
23 ${QT_INCLUDE_DIR}
24)
25
26# ========================================
27# Link directories
28# ========================================
29set(SRC_BINARY_DIR "${PROJECT_BINARY_DIR}/../../src")
30get_filename_component(SRC_BINARY_DIR "${SRC_BINARY_DIR}" ABSOLUTE)
31#message("\${SRC_BINARY_DIR} = ${SRC_BINARY_DIR}")
32link_directories(
33 ${SRC_BINARY_DIR}/PacpusLib
34 ${SRC_BINARY_DIR}/PacpusTools
35 ${SRC_BINARY_DIR}/RoadTime
36)
37
38# ========================================
39# List of sources
40# ========================================
41set(PROJECT_HDRS
42 ProducerExample.h
43 ConsumerExample.h
44 ${PROJECT_NAME}.xml
45 ${EXPORT_HDR}
46)
47set(PROJECT_SRCS
48 ${PLUGIN_CPP}
49 ProducerExample.cpp
50 ConsumerExample.cpp
51)
52
53# ========================================
54# Files to MOC
55# ========================================
56set(FILES_TO_MOC
57 ${PLUGIN_H}
58 ProducerExample.h
59 ConsumerExample.h
60)
61
62set(UI_FILES
63)
64
65# ========================================
66# Call MOC
67# ========================================
68qt_wrap_cpp(
69 PROJECT_MOC_SRCS
70 ${FILES_TO_MOC}
71 )
72
73qt_wrap_ui(
74 PROJECT_UI_SRCS
75 ${UI_FILES}
76)
77
78# ========================================
79# Build a library
80# ========================================
81pacpus_add_library(
82 ${PROJECT_NAME} SHARED
83 ${PROJECT_HDRS}
84 ${PROJECT_SRCS}
85 ${PROJECT_MOC_SRCS}
86 ${PROJECT_UI_SRCS}
87)
88list(APPEND PACPUS_LIBRARIES
89 optimized PacpusLib debug PacpusLib_d
90)
91if(WIN32)
92 list(APPEND PACPUS_LIBRARIES
93 optimized road_time debug road_time_d
94 )
95endif()
96#message("\${PACPUS_LIBRARIES} = ${PACPUS_LIBRARIES}")
97#message("\${PACPUS_DEPENDENCIES_LIB} = ${PACPUS_DEPENDENCIES_LIB}")
98
99# ========================================
100# Libraries
101# ========================================
102# All the platform
103target_link_libraries(${PROJECT_NAME}
104 ${PACPUS_LIBRARIES}
105 ${PACPUS_DEPENDENCIES_LIB}
106 ${QT_LIBRARIES}
107 #${OpenCV_LIBRARIES}
108)
109
110# ========================================
111# Install
112# ========================================
113pacpus_install(${PROJECT_NAME})
114
115# Installation of the headers
116#install(DIRECTORY ${PACPUSCITYVIP_INCLUDE_DIR} DESTINATION "${PACPUS_ROOT}")
117
118# ========================================
119# Folder
120# ========================================
121pacpus_folder(${PROJECT_NAME} "examples")
Note: See TracBrowser for help on using the repository browser.