forked from sgsellan/botsch-kobbelt-remesher-libigl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
62 lines (47 loc) · 1.31 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
cmake_minimum_required(VERSION 3.10)
project(Remesher
DESCRIPTION
"Botsch-Kobbelt Remesher libigl implementation"
)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_BUILD_TYPE "Release")
#set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(EXT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ext)
find_package(Threads REQUIRED)
find_package(Eigen3 REQUIRED)
include_directories(
# libigl
${EXT_DIR}/libigl/include
)
list(APPEND CMAKE_MODULE_PATH ${EXT_DIR}/numpyeigen/cmake)
include(numpyeigen)
add_library(remesh
SHARED
# Headers
src/collapse_edges.h
src/equalize_valences.h
src/remesh_botsch.h
src/split_edges.h
src/split_edges_until_bound.h
src/tangential_relaxation.h
# Source
src/collapse_edges.cpp
src/equalize_valences.cpp
src/remesh_botsch.cpp
src/split_edges.cpp
src/split_edges_until_bound.cpp
src/tangential_relaxation.cpp
)
target_link_libraries(remesh Threads::Threads Eigen3::Eigen)
add_executable(remeshmesh remeshmesh.cpp)
target_link_libraries(remeshmesh remesh)
npe_add_module(pyremesh
BINDING_SOURCES
src/bindings.cpp
)
target_include_directories(pyremesh PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
target_link_libraries(pyremesh PUBLIC remesh)
# Copyt setpath file
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setpath.sh
${CMAKE_CURRENT_BINARY_DIR}/setpath.sh COPYONLY)