-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
68 lines (60 loc) · 1.72 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
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 17)
if (APPLE)
set(CMAKE_OSX_ARCHITECTURES arm64)
endif ()
project(VTKCommonUtility)
add_definitions(-DCMAKE_SOURCE_DIR="${CMAKE_SOURCE_DIR}")
find_package(VTK COMPONENTS
CommonColor
CommonCore
CommonComputationalGeometry
CommonDataModel
FiltersCore
FiltersGeneral
IOGeometry
IOImage
IOLegacy
IOPLY
IOXML
InteractionImage
InteractionStyle
InteractionWidgets
RenderingAnnotation
RenderingContextOpenGL2
RenderingCore
RenderingFreeType
RenderingGL2PSOpenGL2
RenderingOpenGL2
)
if (NOT VTK_FOUND)
message(FATAL_ERROR "VTKCommonUtility: Unable to find the VTK build folder.")
endif ()
# Prevent a "command line is too long" failure in Windows.
set(CMAKE_NINJA_FORCE_RESPONSE_FILE "ON" CACHE BOOL "Force Ninja to use response files.")
add_executable(${PROJECT_NAME} MACOSX_BUNDLE main.cpp
CollisionDetection/CollisionDetectionUtil.cpp
CollisionDetection/TriTriIntersection.cpp
Common/Color.h
Common/CommonUtil.cpp
IO/IOUtil.cpp
Mesh/GeometricObjectUtil.cpp
Mesh/MeshUtil.cpp
MeshFeature/MeshFeature.cpp
MeshFeature/MeshFeatureUtil.cpp
Polygon/PolygonUtil.cpp
Rendering/RenderingUtil.cpp
Test/MeshFeatureTest.cpp
Test/TestUtil.cpp
Transformation/TransformUtil.cpp
Visualization/VisualizationUtil.cpp
)
target_link_libraries(${PROJECT_NAME}
PRIVATE
${VTK_LIBRARIES}
)
# vtk_module_autoinit is needed
vtk_module_autoinit(
TARGETS ${PROJECT_NAME}
MODULES ${VTK_LIBRARIES}
)