-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
221 lines (178 loc) · 10.6 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
cmake_minimum_required(VERSION 3.8.2)
project(cpp_geodesics CXX)
find_package(Threads)
# Build the geodcircles application that uses VCGLIB and computes geodesic circle stats and/or geodesic mean distances.
set(SOURCE_FILES_COMMON_VCG third_party/vcglib/wrap/ply/plylib.cpp)
set(SOURCE_FILES_GEODCIRCLES_VCG src/geodcircles/main.cpp ${SOURCE_FILES_COMMON_VCG})
add_executable(geodcircles ${SOURCE_FILES_GEODCIRCLES_VCG})
target_include_directories(geodcircles PUBLIC include src/common_vcg)
target_include_directories(geodcircles PUBLIC include src/common)
target_include_directories(geodcircles PUBLIC include third_party/libfs)
target_include_directories(geodcircles PUBLIC include third_party/vcglib)
target_include_directories(geodcircles PUBLIC include third_party/vcglib/eigenlib)
target_include_directories(geodcircles PUBLIC include third_party/spline)
target_include_directories(geodcircles PUBLIC include third_party/tinycolormap)
set_property(TARGET geodcircles PROPERTY CXX_STANDARD 11)
set_property(TARGET geodcircles PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET geodcircles PROPERTY CXX_EXTENSIONS OFF)
find_package(OpenMP)
if(OpenMP_CXX_FOUND)
target_link_libraries(geodcircles PUBLIC OpenMP::OpenMP_CXX)
endif()
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang|GNU" )
target_compile_options( geodcircles PRIVATE -Wall -Wextra)
endif()
if( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
target_compile_options( geodcircles PRIVATE /W3 /WX )
target_compile_definitions(geodcircles PRIVATE _CRT_SECURE_NO_WARNINGS) # Disable MSVCC non-standard warnings/errors about fopen, strcpy, etc.
endif()
# Build the demo_vcglibbrain application that uses VCGLIB.
set(SOURCE_FILES_DEMO_VCGLIB src/demo_vcglib/main.cpp ${SOURCE_FILES_COMMON_VCG})
add_executable(demo_vcglibbrain ${SOURCE_FILES_DEMO_VCGLIB})
target_include_directories(demo_vcglibbrain PUBLIC include src/common_vcg)
target_include_directories(demo_vcglibbrain PUBLIC include src/common)
target_include_directories(demo_vcglibbrain PUBLIC include third_party/libfs)
target_include_directories(demo_vcglibbrain PUBLIC include third_party/vcglib)
target_include_directories(demo_vcglibbrain PUBLIC include third_party/vcglib/eigenlib)
target_include_directories(demo_vcglibbrain PUBLIC include third_party/spline)
target_include_directories(demo_vcglibbrain PUBLIC include third_party/tinycolormap)
set_property(TARGET demo_vcglibbrain PROPERTY CXX_STANDARD 11)
set_property(TARGET demo_vcglibbrain PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET demo_vcglibbrain PROPERTY CXX_EXTENSIONS OFF)
find_package(OpenMP)
if(OpenMP_CXX_FOUND)
target_link_libraries(demo_vcglibbrain PUBLIC OpenMP::OpenMP_CXX)
endif()
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang|GNU" )
target_compile_options( demo_vcglibbrain PRIVATE -Wall -Wextra)
endif()
if( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
target_compile_options( demo_vcglibbrain PRIVATE /W3 /WX )
target_compile_definitions(demo_vcglibbrain PRIVATE _CRT_SECURE_NO_WARNINGS) # Disable MSVCC non-standard warnings/errors about fopen, strcpy, etc.
endif()
# Build the export_brainmesh application that uses VCGLIB.
set(SOURCE_FILES_EXPORT_BRAINMESH src/export_brainmesh/main.cpp ${SOURCE_FILES_COMMON_VCG})
add_executable(export_brainmesh ${SOURCE_FILES_EXPORT_BRAINMESH})
target_include_directories(export_brainmesh PUBLIC include src/common_vcg)
target_include_directories(export_brainmesh PUBLIC include src/common)
target_include_directories(export_brainmesh PUBLIC include third_party/libfs)
target_include_directories(export_brainmesh PUBLIC include third_party/vcglib)
target_include_directories(export_brainmesh PUBLIC include third_party/vcglib/eigenlib)
target_include_directories(export_brainmesh PUBLIC include third_party/spline)
target_include_directories(export_brainmesh PUBLIC include third_party/tinycolormap)
set_property(TARGET export_brainmesh PROPERTY CXX_STANDARD 11)
set_property(TARGET export_brainmesh PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET export_brainmesh PROPERTY CXX_EXTENSIONS OFF)
find_package(OpenMP)
if(OpenMP_CXX_FOUND)
target_link_libraries(export_brainmesh PUBLIC OpenMP::OpenMP_CXX)
endif()
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang|GNU" )
target_compile_options( export_brainmesh PRIVATE -Wall -Wextra)
endif()
if( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
target_compile_options( export_brainmesh PRIVATE /W3 /WX )
target_compile_definitions(export_brainmesh PRIVATE _CRT_SECURE_NO_WARNINGS) # Disable MSVCC non-standard warnings/errors about fopen, strcpy, etc.
endif()
# Build the meshneigh_edge application that uses VCGLIB.
set(SOURCE_FILES_MESHNEIGH_EDGE src/meshneigh_edge/main_meshneigh_edge.cpp ${SOURCE_FILES_COMMON_VCG})
add_executable(meshneigh_edge ${SOURCE_FILES_MESHNEIGH_EDGE})
target_include_directories(meshneigh_edge PUBLIC include src/common_vcg)
target_include_directories(meshneigh_edge PUBLIC include src/common)
target_include_directories(meshneigh_edge PUBLIC include third_party/libfs)
target_include_directories(meshneigh_edge PUBLIC include third_party/vcglib)
target_include_directories(meshneigh_edge PUBLIC include third_party/vcglib/eigenlib)
target_include_directories(meshneigh_edge PUBLIC include third_party/spline)
target_include_directories(meshneigh_edge PUBLIC include third_party/libnpy)
set_property(TARGET meshneigh_edge PROPERTY CXX_STANDARD 11)
set_property(TARGET meshneigh_edge PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET meshneigh_edge PROPERTY CXX_EXTENSIONS OFF)
find_package(OpenMP)
if(OpenMP_CXX_FOUND)
target_link_libraries(meshneigh_edge PUBLIC OpenMP::OpenMP_CXX)
endif()
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang|GNU" )
target_compile_options( meshneigh_edge PRIVATE -Wall -Wextra)
endif()
if( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
target_compile_options( meshneigh_edge PRIVATE /W3 /WX )
target_compile_definitions(meshneigh_edge PRIVATE _CRT_SECURE_NO_WARNINGS) # Disable MSVCC non-standard warnings/errors about fopen, strcpy, etc.
endif()
# Build the meshneigh_geod application that uses VCGLIB.
set(SOURCE_FILES_MESHNEIGH_GEOD src/meshneigh_geod/main_meshneigh_geod.cpp ${SOURCE_FILES_COMMON_VCG})
add_executable(meshneigh_geod ${SOURCE_FILES_MESHNEIGH_GEOD})
target_include_directories(meshneigh_geod PUBLIC include src/common_vcg)
target_include_directories(meshneigh_geod PUBLIC include src/common)
target_include_directories(meshneigh_geod PUBLIC include third_party/libfs)
target_include_directories(meshneigh_geod PUBLIC include third_party/vcglib)
target_include_directories(meshneigh_geod PUBLIC include third_party/vcglib/eigenlib)
target_include_directories(meshneigh_geod PUBLIC include third_party/spline)
target_include_directories(meshneigh_geod PUBLIC include third_party/libnpy)
set_property(TARGET meshneigh_geod PROPERTY CXX_STANDARD 11)
set_property(TARGET meshneigh_geod PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET meshneigh_geod PROPERTY CXX_EXTENSIONS OFF)
find_package(OpenMP)
if(OpenMP_CXX_FOUND)
target_link_libraries(meshneigh_geod PUBLIC OpenMP::OpenMP_CXX)
endif()
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang|GNU" )
target_compile_options( meshneigh_geod PRIVATE -Wall -Wextra)
endif()
if( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
target_compile_options( meshneigh_geod PRIVATE /W3 /WX )
target_compile_definitions(meshneigh_geod PRIVATE _CRT_SECURE_NO_WARNINGS) # Disable MSVCC non-standard warnings/errors about fopen, strcpy, etc.
endif()
# Build the demo_geolibbrain demo app that uses the the 'geodesic' lib
set(SOURCE_FILES_DEMO_GEOLIB src/demo_geolib/main_geo.cpp)
add_executable(demo_geolibbrain ${SOURCE_FILES_DEMO_GEOLIB})
target_include_directories(demo_geolibbrain PUBLIC include third_party/libfs)
target_include_directories(demo_geolibbrain PUBLIC include third_party/geodesic )
set_property(TARGET demo_geolibbrain PROPERTY CXX_STANDARD 11)
set_property(TARGET demo_geolibbrain PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET demo_geolibbrain PROPERTY CXX_EXTENSIONS OFF)
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang|GNU" )
target_compile_options( demo_geolibbrain PRIVATE -Wall -Wextra)
endif()
if( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
target_compile_options( demo_geolibbrain PRIVATE /W3 /WX )
target_compile_definitions(demo_geolibbrain PRIVATE _CRT_SECURE_NO_WARNINGS) # Disable MSVCC non-standard warnings/errors about fopen, strcpy, etc.
endif()
# Build the geodpath app that uses the the 'geodesic' lib
set(SOURCE_FILES_GEODPATH src/geodpath/main_geodpath.cpp)
add_executable(geodpath ${SOURCE_FILES_GEODPATH})
target_include_directories(geodpath PUBLIC include third_party/libfs)
target_include_directories(geodpath PUBLIC include third_party/geodesic )
set_property(TARGET geodpath PROPERTY CXX_STANDARD 11)
set_property(TARGET geodpath PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET geodpath PROPERTY CXX_EXTENSIONS OFF)
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang|GNU" )
target_compile_options( geodpath PRIVATE -Wall -Wextra)
endif()
if( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
target_compile_options( geodpath PRIVATE /W3 /WX )
target_compile_definitions(geodpath PRIVATE _CRT_SECURE_NO_WARNINGS) # Disable MSVCC non-standard warnings/errors about fopen, strcpy, etc.
endif()
# Build the unit tests, they mainly test functions combining libfs and VCGLIB.
set(SOURCE_FILES_TESTS src/tests/main.cpp src/tests/cpp_geodesic_tests.cpp ${SOURCE_FILES_COMMON_VCG})
add_executable(cpp_geodesic_tests ${SOURCE_FILES_TESTS})
target_include_directories(cpp_geodesic_tests PUBLIC include src/common_vcg)
target_include_directories(cpp_geodesic_tests PUBLIC include src/common)
target_include_directories(cpp_geodesic_tests PUBLIC include third_party/libfs)
target_include_directories(cpp_geodesic_tests PUBLIC include third_party/vcglib)
target_include_directories(cpp_geodesic_tests PUBLIC include third_party/vcglib/eigenlib)
target_include_directories(cpp_geodesic_tests PUBLIC include third_party/spline)
target_include_directories(cpp_geodesic_tests PUBLIC include third_party/catch)
set_property(TARGET cpp_geodesic_tests PROPERTY CXX_STANDARD 11)
set_property(TARGET cpp_geodesic_tests PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET cpp_geodesic_tests PROPERTY CXX_EXTENSIONS OFF)
find_package(OpenMP)
if(OpenMP_CXX_FOUND)
target_link_libraries(cpp_geodesic_tests PUBLIC OpenMP::OpenMP_CXX)
endif()
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang|GNU" )
target_compile_options( cpp_geodesic_tests PRIVATE -Wall -Wextra)
endif()
if( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
target_compile_options( cpp_geodesic_tests PRIVATE /W3 /WX )
target_compile_definitions(cpp_geodesic_tests PRIVATE _CRT_SECURE_NO_WARNINGS) # Disable MSVCC non-standard warnings/errors about fopen, strcpy, etc.
endif()