-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathCMakeLists.txt
35 lines (27 loc) · 1.24 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
cmake_minimum_required(VERSION 3.21)
project(resolvo LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(FeatureSummary)
option(RESOLVO_BUILD_TESTING "Build tests" OFF)
add_feature_info(RESOLVO_BUILD_TESTING RESOLVO_BUILD_TESTING
"configure whether to build the test suite")
include(CTest)
set(RESOLVO_IS_TOPLEVEL_BUILD TRUE)
# Place all compiled examples into the same bin directory on Windows, where
# we'll also put the dll
if(WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin/debug)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin/release)
elseif(APPLE)
# On macOS, the resolvo_cpp.dylib's install_name uses @rpath. CMake doesn't
# set BUILD_RPATH for imported targets though, so include the directory here
# by hand in the rpath used to build binaries in the build tree (such as our
# examples or tests).
set(CMAKE_BUILD_RPATH ${CMAKE_BINARY_DIR}/cpp)
endif()
add_subdirectory(cpp/)
feature_summary(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
feature_summary(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:")