-
Notifications
You must be signed in to change notification settings - Fork 9
/
CMakeLists.txt
160 lines (143 loc) · 3.76 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
cmake_minimum_required(VERSION 3.1)
project(Dragon)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}")
set (CMAKE_BUILD_TYPE "Release")
set (CMAKE_BINARY_DIR "./app")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
cmake_policy(SET CMP0072 OLD)
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
find_package(GLEW REQUIRED)
include_directories(${GLUT_INCLUDE_DIRS})
include_directories(${OPENGL_INCLUDE_DIRS})
include_directories(3rdparty/Eigen)
include_directories(3rdparty/tinyply/source)
include_directories(3rdparty/tinyobjloader)
include_directories(3rdparty/imgui)
include_directories(3rdparty/nanoflann/include)
include_directories(3rdparty/glfw/include)
include_directories(3rdparty/cnpy)
include_directories(src)
#message("tinyobjloader")
file(GLOB_RECURSE Geometry_SRC
"src/Geometry/*.cpp"
"src/Geometry/*.h"
"src/Geometry/*.hpp"
)
file(GLOB Reconstruction_SRC
"src/Reconstruction/*.cpp"
"src/Reconstruction/*.h"
)
file(GLOB_RECURSE Visualization_SRC
"src/Visualization/Shaders/*.h"
"src/Visualization/*.cpp"
"src/Visualization/*.h"
)
file(GLOB Tool_SRC
"src/Tool/*.cpp"
"src/Tool/*.h"
)
file(GLOB Objloader_SRC
"3rdparty/tinyobjloader/*.c"
"3rdparty/tinyobjloader/*.cpp"
"3rdparty/tinyobjloader/*.cc"
"3rdparty/tinyobjloader/*.h"
)
file(GLOB TinyPly_SRC
"3rdparty/tinyply/source/tinyply.h"
"3rdparty/tinyply/source/tinyply.cpp"
)
file(GLOB IO_SRC
"src/IO/*.cpp"
"src/IO/*.h"
)
add_subdirectory(3rdparty/glfw)
add_subdirectory(3rdparty/imgui)
add_subdirectory(3rdparty/cnpy)
add_library(tinyply SHARED ${TinyPly_SRC})
add_library(objloader SHARED ${Objloader_SRC})
add_library(dragon SHARED ${Geometry_SRC} ${Reconstruction_SRC}
${Visualization_SRC} ${IO_SRC} ${Tool_SRC})
set(CMAKE_CXX_FLAGS " -std=c++11 ")
set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -O0 -g -Wall -fopenmp -Wno-maybe-uninitialized")
# if you want a double-precision
set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -DUSING_FLOAT64")
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(THIRD_LIB
tinyply
objloader
imgui
glfw
cnpy
${GLUT_LIBRARIES}
${GLEW_LIBRARIES}
${OPENGL_LIBRARIES}
)
add_executable(ReadMesh "app/ReadPLYMesh.cpp")
# for test
# add_executable(GenerateMinimalSurface "app/GenerateMinimalSurface.cpp")
add_executable(MeanCurvature "app/MeanCurvature.cpp")
# add_executable(GaussCurvature "app/GaussCurvature.cpp")
add_executable(DragonView3D "app/DragonView.cpp")
add_executable(DragonView2D "app/DragonView2D.cpp")
add_executable(SpiderMan "app/SpiderMan.cpp")
add_executable(RBFTest "app/RBFTest.cpp")
add_executable(PoissonTest "app/PoissonTest.cpp")
add_executable(Mesh2SDFTest "app/Mesh2SDFTest.cpp")
add_executable(Mesh2Indicator "app/Mesh2Indicator.cpp")
add_executable(CenterLine2SDF "app/CenterLine2SDF.cpp")
add_executable(CenterLine2SurfacePoints "app/CenterLine2SurfacePoints.cpp")
add_executable(CenterLineAgreeMesh "app/CenterLineAgreeMesh.cpp")
add_executable(VesselSegment "app/VesselSegment.cpp")
target_link_libraries(ReadMesh
dragon
${THIRD_LIB}
)
target_link_libraries(MeanCurvature
dragon
${THIRD_LIB}
)
target_link_libraries(DragonView3D
dragon
${THIRD_LIB}
)
target_link_libraries(DragonView2D
dragon
${THIRD_LIB}
)
target_link_libraries(SpiderMan
dragon
${THIRD_LIB}
)
target_link_libraries(RBFTest
dragon
${THIRD_LIB}
)
target_link_libraries(PoissonTest
dragon
${THIRD_LIB}
)
target_link_libraries(Mesh2SDFTest
dragon
${THIRD_LIB}
)
target_link_libraries(Mesh2Indicator
dragon
${THIRD_LIB}
)
target_link_libraries(CenterLine2SDF
dragon
${THIRD_LIB}
)
target_link_libraries(CenterLine2SurfacePoints
dragon
${THIRD_LIB}
)
target_link_libraries(CenterLineAgreeMesh
dragon
${THIRD_LIB}
)
target_link_libraries(VesselSegment
dragon
${THIRD_LIB}
)