-
Notifications
You must be signed in to change notification settings - Fork 121
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
37 lines (28 loc) · 1019 Bytes
/
CMakeLists.txt
File metadata and controls
37 lines (28 loc) · 1019 Bytes
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
cmake_minimum_required(VERSION 3.10)
# Make sure this matches ./NAM/version.h!
project(NAM VERSION 0.4.0)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED OFF)
set(CMAKE_CXX_EXTENSIONS OFF)
# Use libc++ on macOS, system default on Linux
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
include_directories(SYSTEM /usr/local/include)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
link_libraries(stdc++fs)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
add_compile_definitions(NOMINMAX WIN32_LEAN_AND_MEAN)
else()
message(FATAL_ERROR "Unrecognized Platform!")
endif()
set(NAM_DEPS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies")
include_directories(SYSTEM "${NAM_DEPS_PATH}/eigen")
add_subdirectory(tools)
#file(MAKE_DIRECTORY build/tools)
#add_custom_target(copy_tools ALL
# ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:tools>" tools/
# DEPENDS tools
#)