diff options
author | Brad King <brad.king@kitware.com> | 2013-11-14 16:28:34 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-11-14 16:28:34 (GMT) |
commit | 5084cac09f424affdb179e5d5430576b3062ac79 (patch) | |
tree | 6e8583b41df69f2ed88b87f6a46a2a402ac52e54 | |
parent | 3993300ad3e674f9e05241872487c10c7fe2fe43 (diff) | |
parent | e130b9ebaab1ed620d5d0fc0cac2b84eb527129b (diff) | |
download | CMake-5084cac09f424affdb179e5d5430576b3062ac79.zip CMake-5084cac09f424affdb179e5d5430576b3062ac79.tar.gz CMake-5084cac09f424affdb179e5d5430576b3062ac79.tar.bz2 |
Merge topic 'gp-ld_library_path'
e130b9e GetPrerequisites: Preserve search path order from caller.
-rw-r--r-- | Modules/GetPrerequisites.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index bd899e2..ac649e9 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -738,9 +738,11 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa if("${gp_tool}" STREQUAL "ldd") set(old_ld_env "$ENV{LD_LIBRARY_PATH}") - foreach(dir ${exepath} ${dirs}) - set(ENV{LD_LIBRARY_PATH} "${dir}:$ENV{LD_LIBRARY_PATH}") + set(new_ld_env "${exepath}") + foreach(dir ${dirs}) + set(new_ld_env "${new_ld_env}:${dir}") endforeach() + set(ENV{LD_LIBRARY_PATH} "${new_ld_env}:$ENV{LD_LIBRARY_PATH}") endif() |