-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
71 lines (57 loc) · 1.85 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
cmake_minimum_required(VERSION 3.9)
project(mouve LANGUAGES CXX VERSION 1.0)
# Set CMake modules path
list(APPEND CMAKE_MODULE_PATH "${mouve_SOURCE_DIR}/cmake")
include(mouve)
option(MOUVE_USE_PRECOMPILED_HEADERS "Use precompiled headers." ON)
option(MOUVE_USE_VISUAL_LEAK_DETECTOR "Use Visual Leak Detector in debug build." OFF)
if(MOUVE_USE_PRECOMPILED_HEADERS)
include(cotire)
endif()
# Show folders in MSVC
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
if(NOT BUILD_SHARED_LIBS)
set(Boost_USE_STATIC_LIBS ON)
endif()
find_package(Boost 1.55.0 REQUIRED)
find_package(OpenCV 2.4 REQUIRED
COMPONENTS
opencv_core
opencv_imgproc
opencv_highgui
opencv_video
opencv_features2d
opencv_nonfree
opencv_flann
opencv_calib3d
)
find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets OpenGL)
set(OpenGL_GL_PREFERENCE GLVND)
find_package(OpenGL REQUIRED)
find_package(Threads REQUIRED)
find_package(TBB QUIET)
set(JAI_DYNAMIC TRUE)
find_package(JAI)
if(MOUVE_USE_VISUAL_LEAK_DETECTOR)
find_package(VLD)
endif()
find_package(AMDTActivityLogger)
# OpenCV devs acknowledge only Debug and Release configurations
# We need to manually map the other two to Release.
# Otherwise CMake will try to link with Debug binaries when building
# with MinSizeRel and RelWithDebInfo config causing ABI mismatch with MSVCRT
set_target_properties(${OpenCV_LIBS} PROPERTIES
MAP_IMPORTED_CONFIG_RELWITHDEBINFO Release
MAP_IMPORTED_CONFIG_MINSIZEREL Release
)
add_subdirectory(external/clw EXCLUDE_FROM_ALL)
add_subdirectory(Kommon)
add_subdirectory(Logic)
add_subdirectory(Console)
add_subdirectory(UI)
add_subdirectory(Plugin.AMP)
add_subdirectory(Plugin.BRISK)
add_subdirectory(Plugin.Kuwahara)
add_subdirectory(Plugin.ShiTomasi)
add_subdirectory(Plugin.Template)
set_directory_properties(PROPERTIES VS_STARTUP_PROJECT Mouve.UI)