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