-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
37 lines (30 loc) · 1.16 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
cmake_minimum_required(VERSION 3.18)
project(test)
set(CMAKE_CXX_STANDARD 17)
# dependencies
find_package(OpenMP)
find_package(pybind11 REQUIRED)
# OpenMesh
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_subdirectory(OpenMesh EXCLUDE_FROM_ALL)
# core library
add_library(trimem SHARED src/mesh.cpp
src/mesh_properties.cpp
src/energy.cpp
src/flips.cpp
src/flip_utils.cpp
src/omp_guard.cpp
src/nlists/nlist.cpp
src/util.cpp)
target_include_directories(trimem PUBLIC src OpenMesh/src)
target_link_libraries(trimem PUBLIC OpenMeshCore
OpenMP::OpenMP_CXX)
# python module
pybind11_add_module(core MODULE src/bindings.cpp
src/mesh_py.cpp)
target_link_libraries(core PRIVATE trimem)
install(TARGETS core trimem OpenMeshCore DESTINATION .)
set_target_properties(core trimem PROPERTIES INSTALL_RPATH
"$ORIGIN/${CMAKE_INSTALL_LIBDIR}")
# c++ debug app
add_subdirectory(src/debug)