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