-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
68 lines (54 loc) · 2.51 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
cmake_minimum_required(VERSION 2.8)
project(OpenCVDisparityTuner)
set(OpenCVDisparityTuner_VERSION_MAJOR 1)
set(OpenCVDisparityTuner_VERSION_MINOR 0)
set(OpenCVDisparityTuner_VERSION_PATCH 0)
# Instruct CMake to run moc automatically when needed.
set( CMAKE_AUTOMOC ON )
# OpenCV library
find_package( OpenCV REQUIRED)
include_directories( ${OpenCV_INCLUDE_DIRS} )
# Find the QtWidgets library
set( QT5_COMPONENTS Core Widgets Xml Gui Sql)
find_package( Qt5 COMPONENTS ${QT5_COMPONENTS})
include_directories(${CMAKE_BINARY_DIR})
set( OpenCVDisparityTuner_SRCS
main.cxx
OpenCVDisparityTuner.cxx
cqtopencvviewergl.cxx
)
qt5_wrap_ui(OpenCVDisparityTuner_UI OpenCVDisparityTuner.ui)
add_executable( OpenCVDisparityTuner ${OpenCVDisparityTuner_SRCS} ${OpenCVDisparityTuner_UI} )
target_link_libraries(OpenCVDisparityTuner ${OpenCV_LIBS} Qt5::Widgets opengl32.lib)
# Installation
include( CMake/DeployQt5.cmake )
install_qt5_lib( bin ${QT5_COMPONENTS} )
install_qt5_icu( bin )
install_qt5_platform( bin )
install_qt5_dbdrivers( bin )
install (TARGETS OpenCVDisparityTuner DESTINATION bin)
# build a CPack driven installer package
include (InstallRequiredSystemLibraries)
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set (CPACK_PACKAGE_VERSION_MAJOR "${OpenCVDisparityTuner_VERSION_MAJOR}")
set (CPACK_PACKAGE_VERSION_MINOR "${OpenCVDisparityTuner_VERSION_MINOR}")
set (CPACK_PACKAGE_VERSION_PATCH "${OpenCVDisparityTuner_VERSION_PATCH}")
set (CPACK_PACKAGE_CONTACT "julien.jomier at kitware.com")
set (CPACK_PACKAGE_VENDOR "Julien Jomier")
if(WIN32 AND NOT UNIX)
#set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\OpenCVDisparityTuner.ico")
#set(CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\OpenCVDisparityTuner.ico")
# set the package header icon for MUI
#set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\OpenCVDisparityTuner.ico")
#set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\OpenCVDisparityTuner.exe")
set(CPACK_NSIS_DISPLAY_NAME "OpenCVDisparityTuner ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_NSIS_HELP_LINK "http:\\\\\\\\julien.jomier.com")
set(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.jomier.com")
set(CPACK_NSIS_CONTACT "julien.jomier at kitware.com")
# set(CPACK_NSIS_MODIFY_PATH ON)
set (CPACK_NSIS_MENU_LINKS "bin\\\\OpenCVDisparityTuner.exe" "OpenCVDisparityTuner" )
else()
set(CPACK_STRIP_FILES "bin/OpenCVDisparityTuner")
set(CPACK_SOURCE_STRIP_FILES "")
endif()
include (CPack)