-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
87 lines (79 loc) · 3.48 KB
/
CMakeLists.txt
File metadata and controls
87 lines (79 loc) · 3.48 KB
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
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
SET(CMAKE_BUILD_TYPE "Debug")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g2 -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
project(AnnotationTools)
set(AnnotationTools_VERSION_MAJOR 1)
set(AnnotationTools_VERSION_MINOR 0)
find_package(VTK COMPONENTS
vtkCommonColor
vtkCommonCore
vtkCommonDataModel
vtkFiltersSources
vtkIOImage
vtkInteractionImage
vtkInteractionStyle
vtkRenderingContextOpenGL2
vtkRenderingCore
vtkRenderingFreeType
vtkRenderingGL2PSOpenGL2
vtkRenderingOpenGL2 QUIET)
if (NOT VTK_FOUND)
message("Skipping AnnotationTools: ${VTK_NO_FOUND_MESSAGE}")
return ()
endif()
message(STATUS "VTK_VERSION: ${VTK_VERSION}")
message(STATUS "VTK_LIBRARIES: ${VTK_LIBRARIES}")
include_directories(./DataLoader)
add_subdirectory(DataLoader)
include_directories(./Core)
add_subdirectory(Core)
if (VTK_VERSION VERSION_LESS "8.90.0")
# old system
include(${VTK_USE_FILE})
add_executable(AnnotationTools DataLoader/PointCloudDataLoader.cxx)
add_executable(PNGReader DataLoader/ImageDataLoader.cxx)
add_executable(Actor2D Actors/Actor2D.cxx)
add_executable(AreaPicking Pickers/AreaPicking.cxx)
add_executable(RubberBandPicker Pickers/RubberBandPicker.cxx)
add_executable(KeypressEvents Callbacks/KeypressEvents.cxx )
add_executable(BoxWidgets Widgets/BoxWidgets.cxx)
add_executable(MultipleWindows ViewPorts/MultipleWindows.cxx)
add_executable(ImageView ViewPorts/ImageView.cxx)
add_executable(Test Tests/test.cxx)
target_link_libraries(AnnotationTools PRIVATE ${VTK_LIBRARIES})
target_link_libraries(PNGReader PRIVATE ${VTK_LIBRARIES})
target_link_libraries(Actor2D PRIVATE ${VTK_LIBRARIES})
target_link_libraries(AreaPicking PRIVATE ${VTK_LIBRARIES})
target_link_libraries(RubberBandPicker PRIVATE ${VTK_LIBRARIES} AnnotationCore)
target_link_libraries(KeypressEvents PRIVATE ${VTK_LIBRARIES})
target_link_libraries(BoxWidgets PRIVATE ${VTK_LIBRARIES})
target_link_libraries(MultipleWindows PRIVATE ${VTK_LIBRARIES})
target_link_libraries(ImageView PRIVATE ${VTK_LIBRARIES})
target_link_libraries(Test AnnotationCore)
else()
add_executable(Test Tests/test.cxx)
add_executable(AnnotationTools DataLoader/PointCloudDataLoader.cxx)
add_executable(PNGReader DataLoader/ImageDataLoader.cxx)
add_executable(Actor2D Actors/Actor2D.cxx)
add_executable(AreaPicking Pickers/AreaPicking.cxx)
add_executable(RubberBandPicker Pickers/RubberBandPicker.cxx)
add_executable(KeypressEvents Callbacks/KeypressEvents.cxx )
add_executable(BoxWidgets Widgets/BoxWidgets.cxx)
add_executable(MultipleWindows ViewPorts/MultipleWindows.cxx)
add_executable(ImageView ViewPorts/ImageView.cxx)
target_link_libraries(Test AnnotationCore)
target_link_libraries(AnnotationTools PRIVATE ${VTK_LIBRARIES})
target_link_libraries(PNGReader PRIVATE ${VTK_LIBRARIES})
target_link_libraries(Actor2D PRIVATE ${VTK_LIBRARIES})
target_link_libraries(AreaPicking PRIVATE ${VTK_LIBRARIES})
target_link_libraries(RubberBandPicker PRIVATE ${VTK_LIBRARIES})
target_link_libraries(KeypressEvents PRIVATE ${VTK_LIBRARIES})
target_link_libraries(BoxWidgets PRIVATE ${VTK_LIBRARIES})
target_link_libraries(MultipleWindows PRIVATE ${VTK_LIBRARIES})
target_link_libraries(ImageView PRIVATE ${VTK_LIBRARIES})
vtk_module_autoinit(
TARGETS AnnotationTools
MODULES ${VTK_LIBRARIES}
)
endif()