1 | project(VislabComponent)
|
---|
2 |
|
---|
3 | set(${PROJECT_NAME}_VERSION_MAJOR 0)
|
---|
4 | set(${PROJECT_NAME}_VERSION_MINOR 1)
|
---|
5 | # Create a DLL
|
---|
6 |
|
---|
7 | find_package(OpenCV REQUIRED)
|
---|
8 |
|
---|
9 | # Check for OpenCV
|
---|
10 | if(NOT OpenCV_FOUND)
|
---|
11 | message(FATAL_ERROR "Project ${PROJECT_NAME} requires OpenCV library")
|
---|
12 | endif()
|
---|
13 |
|
---|
14 | ################################################################################
|
---|
15 | create_export(EXPORT_HDR ${PROJECT_NAME})
|
---|
16 | pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME})
|
---|
17 | add_definitions (${QT_DEFINITIONS})
|
---|
18 |
|
---|
19 | ################################################################################
|
---|
20 | # DIRECTORIES
|
---|
21 | include_directories(
|
---|
22 | ${PROJECT_BINARY_DIR}
|
---|
23 | ${QT_INCLUDE_DIR}
|
---|
24 | ${PACPUS_INCLUDE_DIR}
|
---|
25 | ${PACPUS_INCLUDE_DIR}/Pacpus/
|
---|
26 | C:/Users/ldecherf/Documents/Visual Studio 2015/Projects/dev/pacpus/pacpussensors/Vislab/lib3dv-1.2.0/lib3dv
|
---|
27 | )
|
---|
28 |
|
---|
29 | # ========================================
|
---|
30 | # Link directories
|
---|
31 | # ========================================
|
---|
32 | link_directories(
|
---|
33 | ${PACPUS_LIB_DIR}
|
---|
34 | )
|
---|
35 |
|
---|
36 | ################################################################################
|
---|
37 | # FILES
|
---|
38 | set(PROJECT_HDRS
|
---|
39 | ${EXPORT_HDR}
|
---|
40 | VislabComponent.hpp
|
---|
41 | VislabCamera.hpp
|
---|
42 | DiskWriter.h
|
---|
43 | Display.h
|
---|
44 | VislabImageProcessor.h
|
---|
45 | )
|
---|
46 | set(PROJECT_SRCS
|
---|
47 | ${PLUGIN_CPP}
|
---|
48 | VislabComponent.cpp
|
---|
49 | VislabCamera.cpp
|
---|
50 | DiskWriter.cpp
|
---|
51 | Display.cpp
|
---|
52 | VislabImageProcessor.cpp
|
---|
53 | )
|
---|
54 |
|
---|
55 |
|
---|
56 | set(FILES_TO_MOC
|
---|
57 | ${PLUGIN_HDR}
|
---|
58 | VislabComponent.hpp
|
---|
59 | VislabCamera.hpp
|
---|
60 | Display.h
|
---|
61 | )
|
---|
62 |
|
---|
63 | set(UI_FILES
|
---|
64 | )
|
---|
65 |
|
---|
66 | ################################################################################
|
---|
67 | # Qt: call moc, uic
|
---|
68 | qt_wrap_cpp(PROJECT_MOC_SRCS
|
---|
69 | ${FILES_TO_MOC}
|
---|
70 | )
|
---|
71 |
|
---|
72 | qt_wrap_ui(PROJECT_UI_SRCS
|
---|
73 | ${UI_FILES}
|
---|
74 | )
|
---|
75 |
|
---|
76 | ################################################################################
|
---|
77 | # BUILD and LINK
|
---|
78 | pacpus_add_library(${PROJECT_NAME} SHARED
|
---|
79 | ${PROJECT_HDRS}
|
---|
80 | ${PROJECT_SRCS}
|
---|
81 | ${PROJECT_MOC_SRCS}
|
---|
82 | ${PROJECT_UI_SRCS}
|
---|
83 | )
|
---|
84 |
|
---|
85 |
|
---|
86 | # ========================================
|
---|
87 | # Libraries
|
---|
88 | # ========================================
|
---|
89 | set(LIBS
|
---|
90 | optimized FileLib debug FileLib_d
|
---|
91 | optimized PacpusLib debug PacpusLib_d
|
---|
92 | optimized PacpusTools debug PacpusTools_d
|
---|
93 | )
|
---|
94 | if (WIN32)
|
---|
95 | list(APPEND LIBS
|
---|
96 | optimized ROAD_TIME debug ROAD_TIME_d
|
---|
97 | )
|
---|
98 | endif()
|
---|
99 | # LINK
|
---|
100 | target_link_libraries(${PROJECT_NAME}
|
---|
101 | ${PACPUS_LIBRARIES}
|
---|
102 | ${PACPUS_DEPENDENCIES_LIB}
|
---|
103 | ${LIBS}
|
---|
104 | ${QT_LIBRARIES}
|
---|
105 | ${OpenCV_LIBS}
|
---|
106 | 3dv
|
---|
107 | )
|
---|
108 | ################################################################################
|
---|
109 | # FOLDERS
|
---|
110 | pacpus_folder(${PROJECT_NAME} "components")
|
---|
111 | ################################################################################
|
---|
112 | # INSTALL
|
---|
113 | pacpus_install(${PROJECT_NAME})
|
---|