source: pacpussensors/trunk/Vislab/CMakeLists.txt@ 133

Last change on this file since 133 was 131, checked in by ldecherf, 8 years ago

Comments

File size: 2.7 KB
Line 
1project(VislabComponent)
2
3add_definitions( -DVISLAB_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 ${PACPUS_INCLUDE_DIR}
27 ${PACPUS_INCLUDE_DIR}/Pacpus/
28 "C:/Program Files (x86)/lib3dv/include/lib3dv"
29)
30
31# ========================================
32# Link directories
33# ========================================
34link_directories(
35 ${PACPUS_LIB_DIR}
36)
37
38################################################################################
39# FILES
40set(PROJECT_HDRS
41 ${EXPORT_HDR}
42 VislabComponent.hpp
43 VislabCamera.hpp
44 DiskWriter.h
45 Display.h
46 VislabImageProcessor.h
47)
48set(PROJECT_SRCS
49 ${PLUGIN_CPP}
50 VislabComponent.cpp
51 VislabCamera.cpp
52 DiskWriter.cpp
53 Display.cpp
54 VislabImageProcessor.cpp
55)
56
57
58set(FILES_TO_MOC
59 ${PLUGIN_HDR}
60 VislabComponent.hpp
61 Display.h
62)
63
64set(UI_FILES
65)
66
67################################################################################
68# Qt: call moc, uic
69qt_wrap_cpp(PROJECT_MOC_SRCS
70 ${FILES_TO_MOC}
71)
72
73qt_wrap_ui(PROJECT_UI_SRCS
74 ${UI_FILES}
75)
76
77################################################################################
78# BUILD and LINK
79pacpus_add_library(${PROJECT_NAME} SHARED
80 ${PROJECT_HDRS}
81 ${PROJECT_SRCS}
82 ${PROJECT_MOC_SRCS}
83 ${PROJECT_UI_SRCS}
84)
85
86
87# ========================================
88# Libraries
89# ========================================
90set(LIBS
91 optimized FileLib debug FileLib_d
92 optimized PacpusLib debug PacpusLib_d
93 optimized PacpusTools debug PacpusTools_d
94)
95if (WIN32)
96 list(APPEND LIBS
97 optimized ROAD_TIME debug ROAD_TIME_d
98 )
99endif()
100# LINK
101target_link_libraries(${PROJECT_NAME}
102 ${PACPUS_LIBRARIES}
103 ${PACPUS_DEPENDENCIES_LIB}
104 ${LIBS}
105 ${QT_LIBRARIES}
106 ${OpenCV_LIBS}
107 "C:/Program Files (x86)/lib3dv/lib/3dv.lib"
108 )
109################################################################################
110# FOLDERS
111pacpus_folder(${PROJECT_NAME} "components")
112################################################################################
113# INSTALL
114pacpus_install(${PROJECT_NAME})
Note: See TracBrowser for help on using the repository browser.