Skip to content

Commit

Permalink
COMP: Fix macOS linking
Browse files Browse the repository at this point in the history
This commit works around issue https://gitlab.kitware.com/vtk/vtk/-/issues/18032
and fixes the following link error:

  [ 14%] Linking CXX shared library /Users/jcfr/Projects/SLG-rwdi/lib/Slicer-4.13/libvtkRenderingLookingGlass.dylib
  Undefined symbols for architecture x86_64:
    "vtkCocoaLookingGlassRenderWindow::SetLGDeviceIndex(int)", referenced from:
        vtkLookingGlassInterface::CreateLookingGlassRenderWindow(int) in vtkLookingGlassInterface.cxx.o
    "vtkCocoaLookingGlassRenderWindow::New()", referenced from:
        vtkLookingGlassInterface::CreateLookingGlassRenderWindow(int) in vtkLookingGlassInterface.cxx.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)

Fixes #2

Co-authored-by: Samuel Gerber <samuel.gerber@kitware.com>
  • Loading branch information
jcfr and samuelgerber committed Oct 16, 2020
1 parent 611545f commit e47e3ad
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions SuperBuild/External_vtkRenderingLookingGlass.cmake
Expand Up @@ -36,6 +36,13 @@ if(NOT DEFINED ${proj}_DIR AND NOT ${SUPERBUILD_TOPLEVEL_PROJECT}_USE_SYSTEM_${p
)
endif()

if(APPLE)
list(APPEND EXTERNAL_PROJECT_OPTIONAL_CMAKE_CACHE_ARGS
# Workaround https://gitlab.kitware.com/vtk/vtk/-/issues/18032
-DVTK_USE_COCOA:BOOL=ON
)
endif()

ExternalProject_SetIfNotDefined(
${SUPERBUILD_TOPLEVEL_PROJECT}_${proj}_GIT_REPOSITORY
"${EP_GIT_PROTOCOL}://github.com/jcfr/LookingGlassVTKModule.git"
Expand Down

0 comments on commit e47e3ad

Please sign in to comment.