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

Last change on this file since 145 was 141, checked in by ldecherf, 8 years ago

Ajout du composant CameraViewer (input pour le composant Vislab)

File size: 2.5 KB
Line 
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
78
79# ========================================
80# Libraries
81# ========================================
82set(LIBS
83 optimized FileLib debug FileLib_d
84 optimized PacpusLib debug PacpusLib_d
85 optimized PacpusTools debug PacpusTools_d
86)
87if (WIN32)
88 list(APPEND LIBS
89 optimized ROAD_TIME debug ROAD_TIME_d
90 )
91endif()
92# LINK
93target_link_libraries(${PROJECT_NAME}
94 ${PACPUS_LIBRARIES}
95 ${PACPUS_DEPENDENCIES_LIB}
96 ${LIBS}
97 ${QT_LIBRARIES}
98 ${OpenCV_LIBS}
99
100 )
101################################################################################
102# FOLDERS
103pacpus_folder(${PROJECT_NAME} "components")
104################################################################################
105# INSTALL
106pacpus_install(${PROJECT_NAME})
Note: See TracBrowser for help on using the repository browser.