forked from Forceflow/trimesh2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
98 lines (81 loc) · 2.93 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
cmake_minimum_required(VERSION 3.15)
# Add project_options v0.24.1
# https://github.com/aminya/project_options
# Change the version in the following URL to update the package (watch the releases of the repository for future updates)
include(FetchContent)
FetchContent_Declare(_project_options URL https://github.com/aminya/project_options/archive/refs/tags/v0.24.1.zip)
FetchContent_MakeAvailable(_project_options)
include(${_project_options_SOURCE_DIR}/Index.cmake)
# install vcpkg dependencies: - should be called before defining project()
#run_vcpkg()
project(TriMesh VERSION 2022.1)
# specify the C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Initialize project_options variable related to this project
# This overwrites `project_options` and sets `project_warnings`
# uncomment to enable the options. Some of them accept one or more inputs:
project_options(
ENABLE_CACHE
${ENABLE_CPPCHECK}
${ENABLE_CLANG_TIDY}
ENABLE_VS_ANALYSIS
# ENABLE_CONAN
# ENABLE_INTERPROCEDURAL_OPTIMIZATION
# ENABLE_NATIVE_OPTIMIZATION
${ENABLE_DOXYGEN}
${ENABLE_COVERAGE}
${ENABLE_SANITIZER_ADDRESS}
${ENABLE_SANITIZER_UNDEFINED_BEHAVIOR}
# ENABLE_SANITIZER_THREAD
# ENABLE_SANITIZER_MEMORY
# ENABLE_PCH
# PCH_HEADERS
# WARNINGS_AS_ERRORS
# ENABLE_INCLUDE_WHAT_YOU_USE
# ENABLE_USER_LINKER
# ENABLE_BUILD_WITH_TIME_TRACE
# ENABLE_UNITY
# CONAN_PROFILE ${profile_path} # passes a profile to conan: see https://docs.conan.io/en/latest/reference/profiles.html
)
#disable CRT Warnings (use _getv _putenv etc ...)
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
find_package(fmt REQUIRED)
#INFRA MODULE
set(SRC_DIR "src")
set(LOCALITF_DIR "LocalInterfaces")
set(TRIMESH_SHARED_ITF_DIR "SharedInterfaces/")
#file(GLOB SOURCES ${SRC_DIR}/*.cpp)
set(SOURCES
${TRIMESH_SHARED_ITF_DIR}/Box.h
${TRIMESH_SHARED_ITF_DIR}/TriMesh.h
${SRC_DIR}/conn_comps.cpp
${SRC_DIR}/diffuse.cpp
${SRC_DIR}/edgeflip.cpp
${SRC_DIR}/faceflip.cpp
${SRC_DIR}/filter.cpp
${SRC_DIR}/ICP.cpp
${SRC_DIR}/KDtree.cpp
${SRC_DIR}/make.cpp
${SRC_DIR}/merge.cpp
${SRC_DIR}/overlap.cpp
${SRC_DIR}/remove.cpp
${SRC_DIR}/reorder_verts.cpp
${SRC_DIR}/subdiv.cpp
${SRC_DIR}/TriMesh_bounding.cpp
${SRC_DIR}/TriMesh_connectivity.cpp
${SRC_DIR}/TriMesh_curvature.cpp
${SRC_DIR}/TriMesh_grid.cpp
${SRC_DIR}/TriMesh_io.cpp
${SRC_DIR}/TriMesh_normals.cpp
${SRC_DIR}/TriMesh_pointareas.cpp
${SRC_DIR}/TriMesh_stats.cpp
${SRC_DIR}/TriMesh_tstrips.cpp
${SRC_DIR}/umbrella.cpp
)
include_directories( ${TRIMESH_SHARED_ITF_DIR} )
add_library( ${PROJECT_NAME} STATIC ${SOURCES})
set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON)
target_link_libraries(${PROJECT_NAME} PRIVATE fmt::fmt project_options project_warnings)