source: pacpussensors/trunk/CameraViewer/CMakeLists.txt@ 148

Last change on this file since 148 was 147, checked in by ldecherf, 8 years ago

Ajout CameraPlayer

File size: 2.5 KB
RevLine 
[141]1project(CameraViewer)
2
3add_definitions( -DCAMERA_VIEWER_COMPONENT_EXPORTS )
4
5set(${PROJECT_NAME}_VERSION_MAJOR 0)
6set(${PROJECT_NAME}_VERSION_MINOR 1)
7# Create a DLL
8
9find_package(OpenCV REQUIRED)
10
11# Check for OpenCV
12if(NOT OpenCV_FOUND)
13 message(FATAL_ERROR "Project ${PROJECT_NAME} requires OpenCV library")
14endif()
15
16################################################################################
17create_export(EXPORT_HDR ${PROJECT_NAME})
18pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME})
19add_definitions (${QT_DEFINITIONS})
20
21################################################################################
22# DIRECTORIES
23include_directories(
24 ${PROJECT_BINARY_DIR}
25 ${QT_INCLUDE_DIR}
26 ${OpenCV_INCLUDE_DIRS}
27 ${PACPUS_INCLUDE_DIR}
28 ${PACPUS_INCLUDE_DIR}/Pacpus/
29
30)
31
32# ========================================
33# Link directories
34# ========================================
35link_directories(
36 ${PACPUS_LIB_DIR}
37)
38
39################################################################################
40# FILES
41set(PROJECT_HDRS
42 ${EXPORT_HDR}
43 CameraViewerComponent.hpp
44)
45set(PROJECT_SRCS
46 ${PLUGIN_CPP}
47 CameraViewerComponent.cpp
48)
49
50
51set(FILES_TO_MOC
52 ${PLUGIN_HDR}
53 CameraViewerComponent.hpp
54)
55
56set(UI_FILES
57)
58
59################################################################################
60# Qt: call moc, uic
61qt_wrap_cpp(PROJECT_MOC_SRCS
62 ${FILES_TO_MOC}
63)
64
65qt_wrap_ui(PROJECT_UI_SRCS
66 ${UI_FILES}
67)
68
69################################################################################
70# BUILD and LINK
71pacpus_add_library(${PROJECT_NAME} SHARED
72 ${PROJECT_HDRS}
73 ${PROJECT_SRCS}
74 ${PROJECT_MOC_SRCS}
75 ${PROJECT_UI_SRCS}
76)
77
[147]78target_compile_definitions(${PROJECT_NAME} PUBLIC OPENCV_MAJOR=${OpenCV_VERSION_MAJOR})
[141]79
[147]80
[141]81# ========================================
82# Libraries
83# ========================================
84set(LIBS
85 optimized FileLib debug FileLib_d
86 optimized PacpusLib debug PacpusLib_d
87 optimized PacpusTools debug PacpusTools_d
88)
89if (WIN32)
90 list(APPEND LIBS
91 optimized ROAD_TIME debug ROAD_TIME_d
92 )
93endif()
94# LINK
95target_link_libraries(${PROJECT_NAME}
96 ${PACPUS_LIBRARIES}
97 ${PACPUS_DEPENDENCIES_LIB}
98 ${LIBS}
99 ${QT_LIBRARIES}
100 ${OpenCV_LIBS}
101
102 )
103################################################################################
104# FOLDERS
105pacpus_folder(${PROJECT_NAME} "components")
106################################################################################
107# INSTALL
108pacpus_install(${PROJECT_NAME})
Note: See TracBrowser for help on using the repository browser.