Fix T90418: macOS codesign fails with dylib next to executable
Change the dylib folder relative to `Blender` executable to be the same as before rB652fbc200500497a67bd11d18b786587ba34e3d9 and same as bpy.so : `@loader_path/../Resources/${BLENDER_VERSION}/lib`
This commit is contained in:
@@ -500,17 +500,10 @@ endif()
|
|||||||
# makesdna, tests, etc.), we add an rpath to the OpenMP library dir through
|
# makesdna, tests, etc.), we add an rpath to the OpenMP library dir through
|
||||||
# CMAKE_BUILD_RPATH. This avoids having to make many copies of the dylib next to each binary.
|
# CMAKE_BUILD_RPATH. This avoids having to make many copies of the dylib next to each binary.
|
||||||
#
|
#
|
||||||
# For the installed Blender executable, CMAKE_INSTALL_RPATH will be used
|
# For the installed Python module and installed Blender executable, CMAKE_INSTALL_RPATH
|
||||||
# to locate the dylibs at @executable_path, next to the Blender executable.
|
# is modified to find the dylib in an adjacent folder. Install step puts the libraries there.
|
||||||
#
|
|
||||||
# For the installed Python module, CMAKE_INSTALL_RPATH is modified to find the
|
|
||||||
# dylib in an adjacent folder.
|
|
||||||
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||||
list(APPEND CMAKE_BUILD_RPATH "${OpenMP_LIBRARY_DIR}")
|
list(APPEND CMAKE_BUILD_RPATH "${OpenMP_LIBRARY_DIR}")
|
||||||
|
|
||||||
set(CMAKE_SKIP_INSTALL_RPATH FALSE)
|
set(CMAKE_SKIP_INSTALL_RPATH FALSE)
|
||||||
list(APPEND CMAKE_INSTALL_RPATH "@executable_path")
|
|
||||||
|
|
||||||
if(WITH_PYTHON_MODULE)
|
|
||||||
list(APPEND CMAKE_INSTALL_RPATH "@loader_path/../Resources/${BLENDER_VERSION}/lib")
|
list(APPEND CMAKE_INSTALL_RPATH "@loader_path/../Resources/${BLENDER_VERSION}/lib")
|
||||||
endif()
|
|
||||||
|
@@ -345,13 +345,10 @@ elseif(APPLE)
|
|||||||
set(TARGETDIR_VER "${PYTHON_LIBPATH}/Resources/${BLENDER_VERSION}")
|
set(TARGETDIR_VER "${PYTHON_LIBPATH}/Resources/${BLENDER_VERSION}")
|
||||||
set(INSTALL_BPY_TO_SITE_PACKAGES ON)
|
set(INSTALL_BPY_TO_SITE_PACKAGES ON)
|
||||||
endif()
|
endif()
|
||||||
# Dylibs folder for bpy.so.
|
|
||||||
set(MAC_BLENDER_TARGET_DYLIBS_DIR "${TARGETDIR_VER}/lib")
|
|
||||||
else()
|
else()
|
||||||
set(TARGETDIR_VER Blender.app/Contents/Resources/${BLENDER_VERSION})
|
set(TARGETDIR_VER Blender.app/Contents/Resources/${BLENDER_VERSION})
|
||||||
# Dylibs folder for Blender executable. @executable_path is an rpath.
|
|
||||||
set(MAC_BLENDER_TARGET_DYLIBS_DIR "$<TARGET_FILE_DIR:blender>")
|
|
||||||
endif()
|
endif()
|
||||||
|
set(MAC_BLENDER_TARGET_DYLIBS_DIR "${TARGETDIR_VER}/lib")
|
||||||
# Skip relinking on cpack / install
|
# Skip relinking on cpack / install
|
||||||
set_target_properties(blender PROPERTIES BUILD_WITH_INSTALL_RPATH true)
|
set_target_properties(blender PROPERTIES BUILD_WITH_INSTALL_RPATH true)
|
||||||
endif()
|
endif()
|
||||||
|
Reference in New Issue
Block a user