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

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

Ajout CameraPlayer

File size: 3.1 KB
RevLine 
[147]1#########################quick start############################################
2#cmake ../ -G "CodeBlocks - Unix Makefiles"
3#make
4#make install
5#make clean
6################################################################################
7project(CameraPlayer)
8set(${PROJECT_NAME}_VERSION_MAJOR 0)
9set(${PROJECT_NAME}_VERSION_MINOR 1)
10add_definitions( -DCAMERAPLAYER_EXPORTS )
11
12
13################################################################################
14create_export(EXPORT_HDR ${PROJECT_NAME})
15pacpus_plugin(PLUGIN_CPP PLUGIN_HDR ${PROJECT_NAME})
16add_definitions (${QT_DEFINITIONS})
17
18find_package(Qt5Network REQUIRED)
19
20find_package(OpenCV REQUIRED)
21
22# Check for OpenCV
23if(NOT OpenCV_FOUND)
24 message(FATAL_ERROR "Project ${PROJECT_NAME} requires OpenCV library")
25endif()
26################################################################################
27# DIRECTORIES
28include_directories(
29 ${PROJECT_BINARY_DIR}
30 ${QT_INCLUDE_DIR}
31 ${OpenCV_INCLUDE_DIRS}
32 ${PACPUS_INCLUDE_DIR}
33 ${PACPUS_INCLUDE_DIR}/Pacpus/
34)
35
36# ========================================
37# Link directories
38# ========================================
39link_directories(
40 ${PACPUS_LIB_DIR}
41)
42
43
44################################################################################
45# FILES
46set(PROJECT_HDRS
47 ${EXPORT_HDR}
48 CameraPlayerConfig.h
49 DbtPlyOpenCVManager.h
50)
51set(PROJECT_SRCS
52 ${PLUGIN_CPP}
53 DbtPlyOpenCVManager.cpp
54)
55
56set(FILES_TO_MOC
57 ${PLUGIN_HDR}
58 DbtPlyOpenCVManager.h
59)
60
61set(UI_FILES
62)
63
64################################################################################
65# Qt: call moc, uic
66qt_wrap_cpp(PROJECT_MOC_SRCS
67 ${FILES_TO_MOC}
68)
69
70qt_wrap_ui(PROJECT_UI_SRCS
71 ${UI_FILES}
72)
73
74################################################################################
75# BUILD and LINK
76pacpus_add_library(${PROJECT_NAME} SHARED
77 ${PROJECT_HDRS}
78 ${PROJECT_SRCS}
79 ${PROJECT_MOC_SRCS}
80 ${PROJECT_UI_SRCS}
81)
82
83target_compile_definitions(${PROJECT_NAME} PUBLIC OPENCV_MAJOR=${OpenCV_VERSION_MAJOR})
84
85# ========================================
86# Libraries
87# ========================================
88set(LIBS
89 optimized FileLib debug FileLib_d
90 optimized PacpusLib debug PacpusLib_d
91 optimized PacpusTools debug PacpusTools_d
92
93 #optimized NMEA0183LIB debug NMEA0183LIB_d
94
95)
96if (WIN32)
97 list(APPEND LIBS
98 optimized ROAD_TIME debug ROAD_TIME_d
99 )
100endif()
101# LINK
102target_link_libraries(${PROJECT_NAME}
103 ${PACPUS_LIBRARIES}
104 ${PACPUS_DEPENDENCIES_LIB}
105 ${LIBS}
106 ${QT_LIBRARIES}
107 ${OpenCV_LIBS}
108
109 #optimized NMEA0183LIB debug NMEA0183LIB_d
110 )
111qt5_use_modules(${PROJECT_NAME} Network)
112################################################################################
113# FOLDERS
114pacpus_folder(${PROJECT_NAME} "components")
115################################################################################
116# INSTALL
117pacpus_install(${PROJECT_NAME})
118
119# install headers
120install(
121 DIRECTORY
122 ${StdDbtPlayerComponents_SOURCE_DIR}
123 DESTINATION
124 ${PACPUS_INSTALL_DIR}/include
125 FILES_MATCHING PATTERN "*.h"
126)
Note: See TracBrowser for help on using the repository browser.