CMake: library path reference for PLATFORM_ENV_BUILD unix/macos (#2)
Correct fix from [0].
The previous fix seemed to work but on further testing the environment
wasn't properly expanded. Using "$$" prefix resolves the problem.
[0]: b0ec4bba70
This commit is contained in:
@@ -533,8 +533,9 @@ 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_INSTALL "DYLD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/Blender.app/Contents/Resources/lib/;$DYLD_LIBRARY_PATH")
|
||||
# Intentionally double "$$" which expands into "$" when instantiated.
|
||||
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()
|
||||
|
||||
|
||||
@@ -1149,11 +1149,12 @@ if(PLATFORM_BUNDLED_LIBRARIES)
|
||||
|
||||
# Environment variables to run precompiled executables that needed libraries.
|
||||
list(JOIN PLATFORM_BUNDLED_LIBRARY_DIRS ":" _library_paths)
|
||||
# Intentionally double "$$" which expands into "$" when instantiated.
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user