From 5da7db5571520a31684a9b093ae6b501fcc8a628 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Tue, 1 Sep 2009 16:01:55 -0400
Subject: [PATCH] RunBuildTest.cmake definitely needs the separate_arguments()
 command, else when you pass in a command string with command-line arguments,
 RunBuildTest.cmake attempts to search for a program whose filename is the
 entire command line. Uncommented separate_arguments(). Added
 SHARED_LIB_STAGING_DIR to LL_ADD_INTEGRATION_TEST LD_LIBRARY_PATH.

---
 indra/cmake/LLAddBuildTest.cmake | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index fac0c9d955c..e6ef4f1f6be 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -210,9 +210,15 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
     LIST(INSERT test_command test_exe_pos "${TEST_EXE}")
   ENDIF (test_exe_pos LESS 0)
 
+  IF(WINDOWS)
+    set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
+  ELSE(WINDOWS)
+    set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}:/usr/lib)
+  ENDIF(WINDOWS)
+
   SET(TEST_SCRIPT_CMD 
     ${CMAKE_COMMAND} 
-    -DLD_LIBRARY_PATH=${ARCH_PREBUILT_DIRS}:/usr/lib
+    -DLD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
     -DTEST_CMD:STRING="${test_command}" 
     -P ${CMAKE_SOURCE_DIR}/cmake/RunBuildTest.cmake
     )
-- 
GitLab