Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.4] COMP: Fix extension packaging on macOS accounting for synthetic firmlink #7182

Commits on Aug 21, 2023

  1. COMP: Fix extension packaging on macOS accounting for synthetic firmlink

    (cherry picked from commit 858c195)
    
    Since the output of "otool -L" reports paths with synthetic firmlinks
    resolved (see GetPrerequisitesWithRPath), we are using the REAL_PATH
    file command to also resolve Slicer_SUPERBUILD_DIR and ensure that
    the test in "SlicerExtensionCPackBundleFixup.cmake.in" checking if
    "${key}_ITEM" is a library built in Slicer itself work as expected.
    
    To illustrate, copied below is the content of the ImageMaker extension
    package before/after implementing the fix.
    
    $ pwd
    /D/P/S-0-E-b/ImageMaker-build/_CPack_Packages/Darwin/TGZ/32140-macosx-amd64-ImageMaker-git6293f99-2017-07-03/Slicer.app/Contents
    
    Before:
    
    $ find .
    .
    ./Extensions-32140
    ./Extensions-32140/ImageMaker
    ./Extensions-32140/ImageMaker/lib
    ./Extensions-32140/ImageMaker/lib/Slicer-5.5
    ./Extensions-32140/ImageMaker/lib/Slicer-5.5/cli-modules
    ./Extensions-32140/ImageMaker/lib/Slicer-5.5/cli-modules/ImageMaker
    ./Extensions-32140/ImageMaker/lib/Slicer-5.5/cli-modules/libImageMakerLib.dylib
    ./Extensions-32140/ImageMaker/lib/Slicer-5.5/cli-modules/ImageMaker.xml
    ./Extensions-32140/ImageMaker/share
    ./Extensions-32140/ImageMaker/share/Slicer-5.5
    ./Extensions-32140/ImageMaker/share/Slicer-5.5/ImageMaker.s4ext
    ./lib
    ./lib/Slicer-5.5
    ./lib/Slicer-5.5/libitkopenjpeg-5.3.1.dylib
    ./lib/Slicer-5.5/libvtkfreetype-9.2.1.dylib
    ./lib/Slicer-5.5/libITKznz-5.3.1.dylib
    ./lib/Slicer-5.5/libITKIOJPEG-5.3.1.dylib
    [...]
    ./lib/Slicer-5.5/libvtkglew-9.2.1.dylib
    ./lib/Slicer-5.5/libITKDeformableMesh-5.3.1.dylib
    ./lib/Slicer-5.5/libITKTransformFactory-5.3.1.dylib
    ./lib/Slicer-5.5/libvtkFiltersHybrid-9.2.1.dylib
    ./lib/Slicer-5.5/libitkhdf5_cpp-shared-5.3.1.dylib
    
    After:
    
    $ find .
    .
    ./Extensions-32140
    ./Extensions-32140/ImageMaker
    ./Extensions-32140/ImageMaker/lib
    ./Extensions-32140/ImageMaker/lib/Slicer-5.5
    ./Extensions-32140/ImageMaker/lib/Slicer-5.5/cli-modules
    ./Extensions-32140/ImageMaker/lib/Slicer-5.5/cli-modules/ImageMaker
    ./Extensions-32140/ImageMaker/lib/Slicer-5.5/cli-modules/libImageMakerLib.dylib
    ./Extensions-32140/ImageMaker/lib/Slicer-5.5/cli-modules/ImageMaker.xml
    ./Extensions-32140/ImageMaker/share
    ./Extensions-32140/ImageMaker/share/Slicer-5.5
    ./Extensions-32140/ImageMaker/share/Slicer-5.5/ImageMaker.s4ext
    jcfr committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    423cca3 View commit details
    Browse the repository at this point in the history