source: pacpusframework/branches/0.1.x/examples/ProducerConsumerExample/CMakeLists.txt@ 249

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

Added: test component from PacpusCityVIP.
Added: PACPUS_BUILD_EXAMPLES variable.

File size: 2.8 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)
46set(PROJECT_SRCS
47 ${PLUGIN_CPP}
48 ProducerExample.cpp
49 ConsumerExample.cpp
50)
51
52# ========================================
53# Files to MOC
54# ========================================
55set(FILES_TO_MOC
56 ${PLUGIN_H}
57 ProducerExample.h
58 ConsumerExample.h
59)
60
61set(UI_FILES
62)
63
64# ========================================
65# Call MOC
66# ========================================
67qt_wrap_cpp(
68 PROJECT_MOC_SRCS
69 "${FILES_TO_MOC}"
70 )
71
72qt_wrap_ui(
73 PROJECT_UI_SRCS
74 "${UI_FILES}"
75)
76
77# ========================================
78# Build a library
79# ========================================
80pacpus_add_library(
81 ${PROJECT_NAME} SHARED
82 ${PROJECT_HDRS}
83 ${PROJECT_SRCS}
84 ${PROJECT_MOC_SRCS}
85 ${PROJECT_UI_SRCS}
86)
87list(APPEND PACPUS_LIBRARIES
88 optimized PacpusLib debug PacpusLib_d
89)
90if(WIN32)
91 list(APPEND PACPUS_LIBRARIES
92 optimized road_time debug road_time_d
93 )
94endif()
95#message("\${PACPUS_LIBRARIES} = ${PACPUS_LIBRARIES}")
96#message("\${PACPUS_DEPENDENCIES_LIB} = ${PACPUS_DEPENDENCIES_LIB}")
97
98# ========================================
99# Libraries
100# ========================================
101# All the platform
102target_link_libraries(${PROJECT_NAME}
103 ${PACPUS_LIBRARIES}
104 ${PACPUS_DEPENDENCIES_LIB}
105 ${QT_LIBRARIES}
106 #${OpenCV_LIBRARIES}
107)
108
109# ========================================
110# Install
111# ========================================
112pacpus_install(${PROJECT_NAME})
113
114# Installation of the headers
115#install(DIRECTORY ${PACPUSCITYVIP_INCLUDE_DIR} DESTINATION "${PACPUS_ROOT}")
116
117# ========================================
118# Folder
119# ========================================
120pacpus_folder(${PROJECT_NAME} "examples")
Note: See TracBrowser for help on using the repository browser.