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