-
Notifications
You must be signed in to change notification settings - Fork 12
/
CMakeLists.txt
78 lines (63 loc) · 3.13 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
cmake_minimum_required(VERSION 3.1)
project(unblending CXX)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_BUILD_TYPE Release)
if(APPLE AND EXISTS /usr/local/opt/qt)
list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt")
endif()
if(APPLE AND EXISTS /usr/local/opt/qt5)
list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt5")
endif()
######################################################################
# Options
######################################################################
option(UNBLENDING_BUILD_CLI_APP "Build CLI app" ON )
option(UNBLENDING_BUILD_GUI_APP "Build GUI app" OFF)
######################################################################
# Add sub-directories for external libraries
######################################################################
set(TINYCOLORMAP_BUILD_TOOLS OFF CACHE INTERNAL "" FORCE)
set(TINYCOLORMAP_WITH_EIGEN OFF CACHE INTERNAL "" FORCE)
set(TINYCOLORMAP_WITH_QT5 OFF CACHE INTERNAL "" FORCE)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/tinycolormap)
set(TIMER_BUILD_TEST OFF CACHE INTERNAL "" FORCE)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/timer)
set(PARALLELUTIL_BUILD_TESTS OFF CACHE INTERNAL "" FORCE)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/parallel-util)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/nlopt-util)
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "" FORCE)
set(NLOPT_GUILE OFF CACHE INTERNAL "" FORCE)
set(NLOPT_LINK_PYTHON OFF CACHE INTERNAL "" FORCE)
set(NLOPT_MATLAB OFF CACHE INTERNAL "" FORCE)
set(NLOPT_OCTAVE OFF CACHE INTERNAL "" FORCE)
set(NLOPT_PYTHON OFF CACHE INTERNAL "" FORCE)
set(NLOPT_SWIG OFF CACHE INTERNAL "" FORCE)
set(NLOPT_TESTS OFF CACHE INTERNAL "" FORCE)
set(NLOPT_CXX ON CACHE INTERNAL "" FORCE)
set(NLOPT_FORTRAN OFF CACHE INTERNAL "" FORCE)
set(WITH_THREADLOCAL OFF CACHE INTERNAL "" FORCE)
set(INSTALL_BIN_DIR "bin" CACHE INTERNAL "" FORCE)
set(INSTALL_CMAKE_DIR "lib/cmake/nlopt" CACHE INTERNAL "" FORCE)
set(INSTALL_DATA_DIR "share/nlopt" CACHE INTERNAL "" FORCE)
set(INSTALL_INCLUDE_DIR "include" CACHE INTERNAL "" FORCE)
set(INSTALL_LIB_DIR "lib" CACHE INTERNAL "" FORCE)
set(INSTALL_MAN_DIR "share/man" CACHE INTERNAL "" FORCE)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/nlopt)
set(JSON11_BUILD_TESTS OFF CACHE INTERNAL "" FORCE)
set(JSON11_ENABLE_DR1467_CANARY ON CACHE INTERNAL "" FORCE)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/json11)
set(CXXOPTS_BUILD_EXAMPLES OFF CACHE INTERNAL "" FORCE)
set(CXXOPTS_BUILD_TESTS OFF CACHE INTERNAL "" FORCE)
set(CXXOPTS_CMAKE_DIR "lib/cmake/cxxopts" CACHE INTERNAL "" FORCE)
set(CXXOPTS_USE_UNICODE_HELP OFF CACHE INTERNAL "" FORCE)
add_subdirectory(external/cxxopts)
######################################################################
# Add sub-directories
######################################################################
add_subdirectory(unblending)
if(UNBLENDING_BUILD_CLI_APP)
add_subdirectory(unblending-cli)
endif()
if(UNBLENDING_BUILD_GUI_APP)
add_subdirectory(unblending-gui)
endif()