-
Notifications
You must be signed in to change notification settings - Fork 13
/
CMakeLists.txt
70 lines (59 loc) · 2.01 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
message(STATUS "LookingGlass: Building as a Remote VTK module")
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
set(classes
vtkLookingGlassInterface
vtkLookingGlassPass
)
# add OS specic render window implementation
if (VTK_USE_X)
list(APPEND classes vtkXLookingGlassRenderWindow)
elseif (WIN32)
list(APPEND classes vtkWin32LookingGlassRenderWindow)
elseif (VTK_USE_COCOA)
list(APPEND sources vtkCocoaLookingGlassRenderWindow.mm)
list(APPEND headers vtkCocoaLookingGlassRenderWindow.h)
endif()
vtk_module_add_module(VTK::RenderingLookingGlass
CLASSES ${classes}
SOURCES ${sources}
HEADERS ${headers}
)
if (NOT HoloPlayCore_INCLUDE_DIR OR NOT HoloPlayCore_LIBRARY)
# Download HoloPlayCore if it is not set already
include(FetchHoloPlayCore)
endif()
vtk_module_find_package(PACKAGE HoloPlayCore)
vtk_module_link(VTK::RenderingLookingGlass
PUBLIC HoloPlayCore::HoloPlayCore)
if (APPLE)
vtk_module_link(VTK::RenderingLookingGlass
PRIVATE "-framework IOKit")
endif ()
# Copy the FindHoloPlayCore.cmake file to the build directory
if (DEFINED vtk_cmake_build_dir)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/FindHoloPlayCore.cmake"
"${vtk_cmake_build_dir}/FindHoloPlayCore.cmake"
COPYONLY)
endif ()
# Workaround limitation of VTK build-system preventing export module specific CMake variables
# in module config files.
if (DEFINED vtk_cmake_destination AND VTK_BINARY_DIR)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/FindHoloPlayCore.cmake"
"${VTK_BINARY_DIR}/${vtk_cmake_destination}/FindHoloPlayCore.cmake"
COPYONLY)
endif ()
if (DEFINED vtk_cmake_destination)
install(
FILES "${CMAKE_CURRENT_SOURCE_DIR}/FindHoloPlayCore.cmake"
DESTINATION "${vtk_cmake_destination}"
COMPONENT "development")
endif ()
if (VTK_WHEEL_BUILD)
# Need to install the HoloPlayCore_RUNTIME_LIBRARY
# FIXME: can we find a way to NOT set the DESTINATION manually?
install(
FILES "${HoloPlayCore_RUNTIME_LIBRARY}"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/vtkmodules")
endif()