-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
35 lines (25 loc) · 945 Bytes
/
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.9)
project(anurbs)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Filesystem REQUIRED COMPONENTS Final Experimental)
include_directories(
"${PROJECT_SOURCE_DIR}/include"
"${PROJECT_SOURCE_DIR}/external_libraries"
"${PROJECT_SOURCE_DIR}/external_libraries/pybind11/include"
)
add_subdirectory(external_libraries/pybind11)
add_definitions(
-DEIGEN_DEFAULT_TO_ROW_MAJOR
-DANURBS_VERSION="${ANURBS_VERSION}"
)
pybind11_add_module(anurbs ${SOURCES}
"${PROJECT_SOURCE_DIR}/src/Module.cc"
"${PROJECT_SOURCE_DIR}/external_libraries/ClipperLib/clipper.cpp"
)
target_link_libraries(anurbs PRIVATE std::filesystem)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
target_compile_options(anurbs PUBLIC -fsized-deallocation)
endif()
install(TARGETS anurbs DESTINATION bin)