From f0009f3501b689cc706e2c673aae351547195643 Mon Sep 17 00:00:00 2001 From: Alex Fuller Date: Sat, 16 Dec 2023 19:39:52 +1100 Subject: [PATCH] Fix for successfully reading external library environment variables --- src/cmake/external_libs.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmake/external_libs.cmake b/src/cmake/external_libs.cmake index 45d580208..5c9c616e0 100644 --- a/src/cmake/external_libs.cmake +++ b/src/cmake/external_libs.cmake @@ -915,7 +915,7 @@ if(WIN32) set(PLATFORM_LIB_INSTALL_DIR ".") # Environment variables to run precompiled executables that needed libraries. list(JOIN PLATFORM_BUNDLED_LIBRARY_DIRS "\;" _library_paths) - set(PLATFORM_ENV_BUILD_DIRS "${_library_paths}\;${PATH}") + set(PLATFORM_ENV_BUILD_DIRS "${_library_paths}\;$ENV{PATH}") set(PLATFORM_ENV_BUILD "PATH=${PLATFORM_ENV_BUILD_DIRS}") unset(_library_paths) elseif(APPLE) @@ -930,7 +930,7 @@ elseif(APPLE) # 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};$ENV{DYLD_LIBRARY_PATH}\"") unset(_library_paths) elseif(UNIX) set(PLATFORM_LIB_INSTALL_DIR "lib") @@ -944,6 +944,6 @@ elseif(UNIX) # 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}\"") + set(PLATFORM_ENV_BUILD "LD_LIBRARY_PATH=\"${_library_paths}:$ENV{LD_LIBRARY_PATH}\"") unset(_library_paths) endif() -- 2.30.2