From 62c898f2e026f25e533db951e40972ac1d1a56b8 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 30 Aug 2023 17:00:02 +0200 Subject: [PATCH] Fix (DY)LD_LIBRARY_PATH ignored for oslc and shader builder in build Accidentally used CMake instead of environment variable. Pull Request: https://projects.blender.org/blender/blender/pulls/111234 --- build_files/cmake/platform/platform_apple.cmake | 6 +----- build_files/cmake/platform/platform_unix.cmake | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake index 263f3a0d4e5..f5bbc67bc6f 100644 --- a/build_files/cmake/platform/platform_apple.cmake +++ b/build_files/cmake/platform/platform_apple.cmake @@ -517,11 +517,7 @@ if(PLATFORM_BUNDLED_LIBRARIES) # Environment variables to run precompiled executables that needed libraries. list(JOIN PLATFORM_BUNDLED_LIBRARY_DIRS ":" _library_paths) - if(DEFINED DYLD_LIBRARY_PATH) - set(PLATFORM_ENV_BUILD "DYLD_LIBRARY_PATH=\"${_library_paths};${DYLD_LIBRARY_PATH}\"") - else() - set(PLATFORM_ENV_BUILD "DYLD_LIBRARY_PATH=\"${_library_paths}\"") - endif() + 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() diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index 9c22b124470..cfd0503e5da 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -1066,11 +1066,7 @@ if(PLATFORM_BUNDLED_LIBRARIES) # Environment variables to run precompiled executables that needed libraries. list(JOIN PLATFORM_BUNDLED_LIBRARY_DIRS ":" _library_paths) - if(DEFINED LD_LIBRARY_PATH) - set(PLATFORM_ENV_BUILD "LD_LIBRARY_PATH=\"${_library_paths}:${LD_LIBRARY_PATH}\"") - else() - set(PLATFORM_ENV_BUILD "LD_LIBRARY_PATH=\"${_library_paths}\"") - endif() + set(PLATFORM_ENV_BUILD "LD_LIBRARY_PATH=\"${_library_paths}:$LD_LIBRARY_PATH\"") set(PLATFORM_ENV_INSTALL "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/lib/;$LD_LIBRARY_PATH") unset(_library_paths) endif()