-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
65 lines (46 loc) · 1.46 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
# usage:
# cd nomacs/root/dir
# mkdir build
# cd build
# cmake ../ImageLounge -DCMAKE_INSTALL_PREFIX=../release -DCMAKE_BUILD_TYPE=debug (or release, by default)
# on windows there should be -G "generator name" required as well...
# make
# make install
#
#
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
PROJECT(ViennaMS)
#include cmakes
include("cmake/Utils.cmake")
include("cmake/ViennaMS.cmake")
set(VIENNAMS_VERSION 0.0.l)
add_definitions(-DVIENNAMS_VERSION="${VIENNAMS_VERSION}")
# load paths from the user file if exists
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/CMakeUser.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/CMakeUser.cmake)
endif()
if (CMAKE_BUILD_TYPE STREQUAL "debug" OR CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "DEBUG")
message(STATUS "A debug build. -DDEBUG is defined")
add_definitions(-DDEBUG)
elseif (NOT MSVC) # debug and release need qt debug outputs on windows
message(STATUS "A release build (non-debug). Debugging outputs are silently ignored.")
endif ()
NMC_POLICY()
# ask for plugin to be built
OPTION (ENABLE_PLUGIN "Compile as nomacs Plugin" OFF)
NMC_FIND_OPENCV()
if (ENABLE_PLUGIN)
NMC_PREPARE_PLUGIN()
NMC_FINDQT()
if(CMAKE_CL_64)
SET(PLUGIN_ARCHITECTURE "x64")
else()
SET(PLUGIN_ARCHITECTURE "x86")
endif()
set(BUILDING_MULTIPLE_PLUGINS true)
MAKE_ViennaMS()
add_subdirectory(DkPlugin)
else(ENABLE_PLUGIN)
find_package(OpenCV REQUIRED ml)
MAKE_ViennaMS_exe()
endif (ENABLE_PLUGIN)