summaryrefslogtreecommitdiffstats
path: root/Modules/GetPrerequisites.cmake
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2013-11-13 23:38:08 (GMT)
committerBrad King <brad.king@kitware.com>2013-11-14 16:26:23 (GMT)
commite130b9ebaab1ed620d5d0fc0cac2b84eb527129b (patch)
tree95f3fb5ab1691308920992eb7d51e85ebd115d0e /Modules/GetPrerequisites.cmake
parentd592fc48cd24653ada365a3026e5d7f928955eb5 (diff)
downloadCMake-e130b9ebaab1ed620d5d0fc0cac2b84eb527129b.zip
CMake-e130b9ebaab1ed620d5d0fc0cac2b84eb527129b.tar.gz
CMake-e130b9ebaab1ed620d5d0fc0cac2b84eb527129b.tar.bz2
GetPrerequisites: Preserve search path order from caller.
Diffstat (limited to 'Modules/GetPrerequisites.cmake')
-rw-r--r--Modules/GetPrerequisites.cmake6
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()