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

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

Programme détection d'obstacles amélioré

File size: 2.5 KB
Line 
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 DisparityMap.cpp
55 DisparityMap.h
56 StereoVisionDisparityExp.h
57 ObstacleDetectionComponent.cpp
58 ObstacleDetectionComponent.h
59 ${PLUGIN_CPP}
60)
61
62# ========================================
63# Files to MOC
64# ========================================
65set(
66 FILES_TO_MOC
67 DisparityMap.h
68 ObstacleDetectionComponent.h
69 ${PLUGIN_H}
70)
71
72set(
73 UI_FILES
74
75)
76
77# ========================================
78# Call MOC
79# ========================================
80qt4_wrap_cpp(
81 PROJECT_MOC_SRCS
82 ${FILES_TO_MOC}
83)
84
85qt4_wrap_ui(
86 PROJECT_UI_SRCS
87 ${UI_FILES}
88)
89
90# ========================================
91# Build a library
92# ========================================
93pacpus_add_library(
94 ${PROJECT_NAME} SHARED
95 ${PROJECT_SRCS}
96 ${PROJECT_MOC_SRCS}
97 ${PROJECT_UI_SRCS}
98)
99
100# ========================================
101# Libraries
102# ========================================
103# All the platform
104target_link_libraries(
105 ${PROJECT_NAME}
106 ${PACPUS_LIBRARIES}
107 ${QT_LIBRARIES}
108 ${PACPUS_DEPENDENCIES_LIB}
109 ${OpenCV_LIBS}
110)
111
112# ========================================
113# Install
114# ========================================
115pacpus_install(${PROJECT_NAME})
116
Note: See TracBrowser for help on using the repository browser.