-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·63 lines (40 loc) · 2.24 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
################################################################################
cmake_minimum_required(VERSION 3.1)
project(WildMeshingRhino)
################################################################################
option(FLOAT_TETWILD_WITH_EXACT_ENVELOPE "Use exact envelope" ON)
set(THIRD_PARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# Prepend function
# include(PrependCurrentPath)
# Use C++11/14
include(CXXFeatures)
# Sort projects inside the solution
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Generate position independent code by default
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
################################################################################
set(WILDMESHING_EXTERNAL ${THIRD_PARTY_DIR})
# Download and update 3rdparty libraries
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
list(REMOVE_DUPLICATES CMAKE_MODULE_PATH)
include(DownloadExternal)
wildmeshing_download_bindings()
# add_subdirectory(${THIRD_PARTY_DIR}/bindings)
wildmeshing_download_tetwild()
add_subdirectory(${THIRD_PARTY_DIR}/tetwild)
################################################################################
# Subdirectories
################################################################################
add_library(wildmeshing-rhino SHARED
${THIRD_PARTY_DIR}/bindings/src/Utils.cpp ${THIRD_PARTY_DIR}/bindings/src/Utils.hpp
# ${THIRD_PARTY_DIR}/bindings/src/triangulate_data.hpp ${THIRD_PARTY_DIR}/bindings/src/triangulate_data.cpp
# ${THIRD_PARTY_DIR}/bindings/src/triangulate.cpp ${THIRD_PARTY_DIR}/bindings/src/triangulate.hpp
${THIRD_PARTY_DIR}/bindings/src/tetrahedralize.cpp ${THIRD_PARTY_DIR}/bindings/src/tetrahedralize.hpp)
target_sources(wildmeshing-rhino PRIVATE src/Rhino-Binding.cpp src/Rhino-Binding.hpp)
target_include_directories(wildmeshing-rhino PRIVATE ${THIRD_PARTY_DIR}/bindings/src)
# target_include_directories(wildmeshing-rhino PRIVATE ${THIRD_PARTY_DIR}/bindings/triwild/src)
target_compile_features(wildmeshing-rhino PUBLIC cxx_std_14)
target_compile_definitions(wildmeshing-rhino PUBLIC WILDMESHING_SKIP_BINDINGS)
# target_link_libraries(wildmeshing-rhino PRIVATE triwild_lib)
target_link_libraries(wildmeshing-rhino PRIVATE FloatTetwild)