Skip to content

Commit

Permalink
ENH: Copy and install OpenXRRemoting libraries along side VTK libraries
Browse files Browse the repository at this point in the history
This requires VTK MR-10449 (see [1]) backported to Slicer/VTK through
the Slicer PR-7190 (see [2]).

[1] https://gitlab.kitware.com/vtk/vtk/-/merge_requests/10449
[2] Slicer/Slicer#7190

(cherry picked from commit KitwareMedical/SlicerMixedReality@5d5db0b)
  • Loading branch information
jcfr committed Jan 11, 2024
1 parent ede25ff commit 5730098
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,34 @@ if(SlicerVirtualReality_HAS_OPENXRREMOTING_SUPPORT)
if(Slicer_USE_PYTHONQT)
list(APPEND EXTENSION_CPACK_INSTALL_CMAKE_PROJECTS "${vtkRenderingOpenXRRemoting_DIR};vtkRenderingOpenXRRemoting;python;/")
endif()

# OpenXRRemoting: RemotingXR.json and companion files are copied or installed along side the
# vtkRenderingRemotingOpenXR library so that "vtkOpenXRManagerRemoteConnection::Initialize()"
# can locate the files and set the XR_RUNTIME_JSON env. variable
set(OpenXRRemoting_FILES )
if(WIN32)
set(OpenXRRemoting_FILES
Microsoft.Holographic.AppRemoting.OpenXr.dll
Microsoft.Holographic.AppRemoting.OpenXr.SU.dll
PerceptionDevice.dll
RemotingXR.json
)
endif()
set(_dest ${CMAKE_BINARY_DIR}/${Slicer_THIRDPARTY_BIN_DIR})
foreach(file IN LISTS OpenXRRemoting_FILES)
# Copy
message(STATUS "Copying ${file} to ${_dest}")
file(COPY ${OpenXRRemoting_BIN_DIR}/${file}
DESTINATION ${_dest}
USE_SOURCE_PERMISSIONS
)
# Install
install(FILES ${OpenXRRemoting_BIN_DIR}/${file}
DESTINATION ${Slicer_INSTALL_THIRDPARTY_LIB_DIR}
COMPONENT RuntimeLibraries
)
endforeach()

endif()

set(${EXTENSION_NAME}_CPACK_INSTALL_CMAKE_PROJECTS "${EXTENSION_CPACK_INSTALL_CMAKE_PROJECTS}" CACHE STRING "List of external projects to install" FORCE)
Expand Down

0 comments on commit 5730098

Please sign in to comment.