1 | project(StereoVisionDisparity)
|
---|
2 | ################################################################################
|
---|
3 | add_definitions(-DSTEREOVISIONDISPARITY_EXPORTS)
|
---|
4 |
|
---|
5 | # ========================================
|
---|
6 | # Configure qt4
|
---|
7 | # ========================================
|
---|
8 | if(QT4_FOUND)
|
---|
9 | set(QT_USE_QTXML true)
|
---|
10 | set(QT_USE_QTNETWORK true)
|
---|
11 | include(${QT_USE_FILE})
|
---|
12 | else()
|
---|
13 | message(ERROR "Qt4 needed")
|
---|
14 | endif()
|
---|
15 |
|
---|
16 | # ========================================
|
---|
17 | # Find dependencies
|
---|
18 | # ========================================
|
---|
19 | find_package(OpenCV REQUIRED)
|
---|
20 | if(OpenCV_FOUND)
|
---|
21 | list(APPEND OpenCV_LIBS ${OpenCV_LIBRARIES})
|
---|
22 | list(APPEND OpenCV_INCLUDE_DIR ${OpenCV_INCLUDE_DIRS})
|
---|
23 | include_directories(${OpenCV_INCLUDE_DIR})
|
---|
24 | endif(OpenCV_FOUND)
|
---|
25 |
|
---|
26 | # ========================================
|
---|
27 | # Compiler definitions
|
---|
28 | # ========================================
|
---|
29 | add_definitions(
|
---|
30 | ${QT_DEFINITIONS}
|
---|
31 | )
|
---|
32 |
|
---|
33 | # ========================================
|
---|
34 | # Include directories
|
---|
35 | # ========================================
|
---|
36 | include_directories(
|
---|
37 | ${PROJECT_BINARY_DIR}
|
---|
38 | ${QT_INCLUDE_DIR}
|
---|
39 | )
|
---|
40 |
|
---|
41 | # ========================================
|
---|
42 | # Link directories
|
---|
43 | # ========================================
|
---|
44 | link_directories(
|
---|
45 | )
|
---|
46 |
|
---|
47 | pacpus_plugin(PLUGIN_CPP PLUGIN_H ${PROJECT_NAME} )
|
---|
48 |
|
---|
49 | # ========================================
|
---|
50 | # List of sources
|
---|
51 | # ========================================
|
---|
52 | set(
|
---|
53 | PROJECT_SRCS
|
---|
54 | VDisparity.cpp
|
---|
55 | VDisparity.h
|
---|
56 | UDisparity.cpp
|
---|
57 | UDisparity.h
|
---|
58 | DisparityMap.cpp
|
---|
59 | DisparityMap.h
|
---|
60 | StereoVisionDisparityExp.h
|
---|
61 | ObstacleDetectionComponent.cpp
|
---|
62 | ObstacleDetectionComponent.h
|
---|
63 | ${PLUGIN_CPP}
|
---|
64 | )
|
---|
65 |
|
---|
66 | # ========================================
|
---|
67 | # Files to MOC
|
---|
68 | # ========================================
|
---|
69 | set(
|
---|
70 | FILES_TO_MOC
|
---|
71 | VDisparity.h
|
---|
72 | UDisparity.h
|
---|
73 | DisparityMap.h
|
---|
74 | ObstacleDetectionComponent.h
|
---|
75 | ${PLUGIN_H}
|
---|
76 | )
|
---|
77 |
|
---|
78 | set(
|
---|
79 | UI_FILES
|
---|
80 |
|
---|
81 | )
|
---|
82 |
|
---|
83 | # ========================================
|
---|
84 | # Call MOC
|
---|
85 | # ========================================
|
---|
86 | qt4_wrap_cpp(
|
---|
87 | PROJECT_MOC_SRCS
|
---|
88 | ${FILES_TO_MOC}
|
---|
89 | )
|
---|
90 |
|
---|
91 | qt4_wrap_ui(
|
---|
92 | PROJECT_UI_SRCS
|
---|
93 | ${UI_FILES}
|
---|
94 | )
|
---|
95 |
|
---|
96 | # ========================================
|
---|
97 | # Build a library
|
---|
98 | # ========================================
|
---|
99 | pacpus_add_library(
|
---|
100 | ${PROJECT_NAME} SHARED
|
---|
101 | ${PROJECT_SRCS}
|
---|
102 | ${PROJECT_MOC_SRCS}
|
---|
103 | ${PROJECT_UI_SRCS}
|
---|
104 | )
|
---|
105 |
|
---|
106 | # ========================================
|
---|
107 | # Libraries
|
---|
108 | # ========================================
|
---|
109 | # All the platform
|
---|
110 | target_link_libraries(
|
---|
111 | ${PROJECT_NAME}
|
---|
112 | ${PACPUS_LIBRARIES}
|
---|
113 | ${QT_LIBRARIES}
|
---|
114 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
115 | ${OpenCV_LIBS}
|
---|
116 | )
|
---|
117 |
|
---|
118 | # ========================================
|
---|
119 | # Install
|
---|
120 | # ========================================
|
---|
121 | pacpus_install(${PROJECT_NAME})
|
---|
122 |
|
---|