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