source: pacpussensors/trunk/StereoVisionDisparity/CMakeLists.txt@ 62

Last change on this file since 62 was 53, checked in by phudelai, 10 years ago

StereoVisionDisparity updated

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