From 35469b04a0cc9225788c71f341a7d44937d880e8 Mon Sep 17 00:00:00 2001
From: brad kittenbrink <brad@lindenlab.com>
Date: Mon, 2 Nov 2009 13:52:44 -0500
Subject: [PATCH] Implemented mac staging for DEV-41722 normalizing shared lib
 staging. also added a bunch of comments.

---
 indra/cmake/Copy3rdPartyLibs.cmake | 38 ++++++++++++++++++++++++++++--
 1 file changed, 36 insertions(+), 2 deletions(-)

diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index e7b5d097d37..9eb19b35471 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -6,6 +6,9 @@
 
 include(CMakeCopyIfDifferent)
 
+###################################################################
+# set up platform specific lists of files that need to be copied
+###################################################################
 if(WINDOWS)
     set(SHARED_LIB_STAGING_DIR_DEBUG            "${SHARED_LIB_STAGING_DIR}/Debug")
     set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO   "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo")
@@ -26,6 +29,7 @@ if(WINDOWS)
     # Misc shared libs 
 
     # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
+    # or ARCH_PREBUILT_DIRS
     set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
     set(debug_files
         openjpegd.dll
@@ -36,6 +40,7 @@ if(WINDOWS)
         )
 
     # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
+    # or ARCH_PREBUILT_DIRS
     set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
     set(release_files
         openjpeg.dll
@@ -127,16 +132,37 @@ if (MSVC80)
 endif (MSVC80)
 
 elseif(DARWIN)
+    set(SHARED_LIB_STAGING_DIR_DEBUG            "${SHARED_LIB_STAGING_DIR}/Debug")
+    set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO   "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo")
+    set(SHARED_LIB_STAGING_DIR_RELEASE          "${SHARED_LIB_STAGING_DIR}/Release")
+
     set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/universal-darwin")
     set(vivox_files
+        SLVoice
+        libalut.dylib
+        libopenal.dylib
+        libortp.dylib
+        libvivoxsdk.dylib
        )
     # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
-    set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib/debug")
+    # or ARCH_PREBUILT_DIRS
+    set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib_debug")
     set(debug_files
        )
     # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
-    set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib/release")
+    # or ARCH_PREBUILT_DIRS
+    set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib_release")
     set(release_files
+        libapr-1.0.3.7.dylib
+        libapr-1.0.3.8.dylib
+        libapr-1.dylib
+        libaprutil-1.0.3.8.dylib
+        libaprutil-1.0.3.9.dylib
+        libaprutil-1.dylib
+        libexpat.0.5.0.dylib
+        libexpat.dylib
+        libllqtwebkit.dylib
+        libndofdev.dylib
        )
 
     # fmod is statically linked on darwin
@@ -162,10 +188,12 @@ elseif(LINUX)
     set(vivox_files
        )
     # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
+    # or ARCH_PREBUILT_DIRS
     set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/debug")
     set(debug_files
        )
     # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
+    # or ARCH_PREBUILT_DIRS
     set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/release")
     set(release_files
        )
@@ -194,9 +222,11 @@ else(WINDOWS)
     set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux")
     set(vivox_files "")
     # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
+    # or ARCH_PREBUILT_DIRS
     set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/debug")
     set(debug_files "")
     # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
+    # or ARCH_PREBUILT_DIRS
     set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/release")
     set(release_files "")
 
@@ -210,6 +240,10 @@ else(WINDOWS)
 endif(WINDOWS)
 
 
+################################################################
+# Done building the file lists, now set up the copy commands.
+################################################################
+
 copy_if_different(
     ${vivox_src_dir}
     "${SHARED_LIB_STAGING_DIR_DEBUG}"
-- 
GitLab