Skip to content

COMP: Ensure full path ID for macOS libraries installed for fix-up#7537

Merged
jcfr merged 1 commit intoSlicer:mainfrom
jcfr:ensure-full-path-id-for-macos-libraries-installed-for-fix-up
Jan 12, 2024
Merged

COMP: Ensure full path ID for macOS libraries installed for fix-up#7537
jcfr merged 1 commit intoSlicer:mainfrom
jcfr:ensure-full-path-id-for-macos-libraries-installed-for-fix-up

Conversation

@jcfr
Copy link
Member

@jcfr jcfr commented Jan 12, 2024

This commit resolves an issue in Slicer's fix-up process, specifically when updating the installed executable and plugins using @rpath. To align with this process, both the installed libraries and their dependent libraries must have a full path. Consequently, we consistently clear CMAKE_INSTALL_NAME_TOOL in all external projects. This adjustment is crucial due to the lack of an explicit option in CMake to skip the "install_name_tool" call unless the variable is cleared. Please refer to cmInstallTargetGenerator::AddInstallNamePatchRule C++ function found in the CMake source code for a comprehensive understanding.

For historical context, the forceful setting of CMAKE_INSTALL_NAME_TOOL to an empty value was originally introduced in commit 4c441a2 (COMP: Fix MacOSX packaging fixup associated with loadable module, 2012-10-25). Subsequently, the comment "XXX Probably not needed anymore" was added in commit d276165 (BUG: Extension packaging: Ensure @rpath is not applied at build time, 2016-06-10) and is now removed, as forcing the value is indispensable to support packaging of external projects like VTK modules built externally.

This commit resolves an issue in Slicer's fix-up process, specifically when
updating the installed executable and plugins using `@rpath`. To align with
this process, both the installed libraries and their dependent libraries must
have a full path. Consequently, we consistently clear `CMAKE_INSTALL_NAME_TOOL`
in all external projects. This adjustment is crucial due to the lack of an
explicit option in CMake to skip the "install_name_tool" call unless the variable
is cleared. Please refer to `cmInstallTargetGenerator::AddInstallNamePatchRule`
C++ function found in the CMake source code for a comprehensive understanding.

For historical context, the forceful setting of `CMAKE_INSTALL_NAME_TOOL` to an
empty value was originally introduced in commit 4c441a2 ("COMP: Fix MacOSX
packaging fixup associated with loadable module", 2012-10-25). Subsequently, the
comment "XXX Probably not needed anymore" was added in commit d276165 ("BUG:
Extension packaging: Ensure @rpath is not applied at build time", 2016-06-10) and
is now removed, as forcing the value is indispensable to support packaging of
external projects like VTK modules built externally.
@jcfr
Copy link
Member Author

jcfr commented Jan 12, 2024

Changes have been locally tested ✅

Once integrated, the macOS build for the Slicer packages of both the core and the extensions will be monitored.

@jcfr jcfr merged commit 52b238d into Slicer:main Jan 12, 2024
@jcfr jcfr deleted the ensure-full-path-id-for-macos-libraries-installed-for-fix-up branch January 12, 2024 04:25
@jcfr jcfr added the backport:5.x Identify pull request expected to be backported to the current 5.x release branch. label Jan 12, 2024
@jcfr jcfr removed the backport:5.x Identify pull request expected to be backported to the current 5.x release branch. label Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant