-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
executable file
·35 lines (29 loc) · 1.19 KB
/
CMakeLists.txt
File metadata and controls
executable file
·35 lines (29 loc) · 1.19 KB
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
# CMakeList.txt : Top-level CMake project file, do global configuration
# and include sub-projects here.
#
cmake_minimum_required (VERSION 3.8)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_OSX_ARCHITECTURES x86_64)
project ("palette")
set(BUILD_EXAMPLES OFF CACHE BOOL "")
# Prevent CMake from automatically adding rpaths
set(CMAKE_SKIP_BUILD_RPATH TRUE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH "")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
# Prevent full paths from being embedded in binaries
# Remap source paths to relative paths in debug info
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
get_filename_component(PROJECT_SOURCE_DIR_ABS "${CMAKE_SOURCE_DIR}" ABSOLUTE)
# Remap absolute source directory to a relative path
add_compile_options(-fdebug-prefix-map="${PROJECT_SOURCE_DIR_ABS}"=.)
# Also remap build directory
get_filename_component(PROJECT_BINARY_DIR_ABS "${CMAKE_BINARY_DIR}" ABSOLUTE)
add_compile_options(-fdebug-prefix-map="${PROJECT_BINARY_DIR_ABS}"=.)
endif()
add_subdirectory(palette/pybind11)
# Include sub-projects.
add_subdirectory ("palette")
if (${BUILD_EXAMPLES})
add_subdirectory ("standalone")
endif ()