-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
101 lines (92 loc) · 2.35 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
project(arif)
cmake_minimum_required(VERSION 3.9)
include(FindPkgConfig)
include(CheckSymbolExists)
macro(set_prefixed varname string)
set(${varname})
foreach(name ${ARGN})
set( ${varname} ${${varname}} ${string}${name} )
endforeach(name)
endmacro(set_prefixed)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(Qt5 REQUIRED COMPONENTS
Core Gui Widgets Network Svg Concurrent PrintSupport LinguistTools)
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Network Qt5::Svg Qt5::Concurrent Qt5::PrintSupport)
find_package(OpenCV REQUIRED)
pkg_check_modules(PKGCONFS REQUIRED qarv-3 libswscale libavcodec libavutil tclap)
pkg_check_modules(GIO REQUIRED gio-2.0)
find_package(Boost COMPONENTS system REQUIRED)
find_package(Threads REQUIRED)
string(REPLACE ";" " " PKGCONFS_CFLAGS "${PKGCONFS_CFLAGS}")
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall ${PKGCONFS_CFLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3")
include_directories(${GIO_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/src)
set_prefixed(arif_videosources_SRC videosources/
interfaces.cpp
rawvideo.cpp
images.cpp
aravis.cpp
qarvvideo.cpp
)
set_prefixed(arif_videosources_MOC videosources/
interfaces.h
rawvideo.h
images.h
aravis.h
qarvvideo.h
)
set_prefixed(arif_UI_pre src/
arifmainwindow.ui
)
set_prefixed(arif_SRC src/
${arif_videosources_SRC}
main.cpp
glvideowidget.cpp
arifmainwindow.cpp
foreman.cpp
processing.cpp
sourceselectionwindow.cpp
qcustomplot.cpp
plotwidgets.cpp
)
set_prefixed(arif_MOC src/
${arif_videosources_MOC}
glvideowidget.h
arifmainwindow.h
foreman.h
sourceselectionwindow.h
qcustomplot.h
plotwidgets.h
)
qt5_wrap_ui(arif_UI
${arif_UI_pre}
)
qt5_wrap_cpp(arif_MOC_MOCD
${arif_MOC}
)
qt5_add_resources(arif_QRC res/icons/icons.qrc)
add_executable(arif
${arif_SRC}
${arif_MOC_MOCD}
${arif_UI}
${arif_QRC}
)
target_link_libraries(arif
${QT_LIBRARIES}
${SWSCALE_LIB}
${QARV_LIB}
${PKGCONFS_LDFLAGS}
${OpenCV_LIBS}
${Boost_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
)
install(TARGETS arif
RUNTIME DESTINATION bin/
LIBRARY DESTINATION lib/)
install(FILES res/arif.desktop
DESTINATION share/applications/)
install(FILES res/icons/arif.svgz
RENAME application-x-arif.svgz
DESTINATION share/icons/)