CMake: library path reference for PLATFORM_ENV_BUILD on unix & macos

The value used for the the library path was being evaluated by CMake
instead of forwarding the value to the shell expression (as intended).

This meant any build-time binaries that depended on the environments
library-path would failed to run.
This commit is contained in:
Campbell Barton
2024-08-15 21:49:40 +10:00
parent bda4c8a220
commit b0ec4bba70
2 changed files with 3 additions and 3 deletions
@@ -533,7 +533,7 @@ if(PLATFORM_BUNDLED_LIBRARIES)
# Environment variables to run precompiled executables that needed libraries.
list(JOIN PLATFORM_BUNDLED_LIBRARY_DIRS ":" _library_paths)
set(PLATFORM_ENV_BUILD "DYLD_LIBRARY_PATH=\"${_library_paths};$DYLD_LIBRARY_PATH\"")
set(PLATFORM_ENV_BUILD "DYLD_LIBRARY_PATH=\"${_library_paths};\$DYLD_LIBRARY_PATH\"")
set(PLATFORM_ENV_INSTALL "DYLD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/Blender.app/Contents/Resources/lib/;$DYLD_LIBRARY_PATH")
unset(_library_paths)
endif()
@@ -1146,10 +1146,10 @@ if(PLATFORM_BUNDLED_LIBRARIES)
# Environment variables to run precompiled executables that needed libraries.
list(JOIN PLATFORM_BUNDLED_LIBRARY_DIRS ":" _library_paths)
set(PLATFORM_ENV_BUILD
"LD_LIBRARY_PATH=\"${_library_paths}:$LD_LIBRARY_PATH\""
"LD_LIBRARY_PATH=\"${_library_paths}:\$LD_LIBRARY_PATH\""
)
set(PLATFORM_ENV_INSTALL
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/lib/;$LD_LIBRARY_PATH"
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/lib/;\$LD_LIBRARY_PATH"
)
unset(_library_paths)
else()