diff --git a/indra/cmake/FindGLH.cmake b/indra/cmake/FindGLH.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..3d16adaf03d399784f6bb1478472ead07d9b1dd4
--- /dev/null
+++ b/indra/cmake/FindGLH.cmake
@@ -0,0 +1,30 @@
+# -*- cmake -*-
+
+# - Find GLH
+# Find the Graphic Library Helper includes.
+# This module defines
+#  GLH_INCLUDE_DIR, where to find glh/glh_linear.h.
+#  GLH_FOUND, If false, do not try to use GLH.
+
+find_path(GLH_INCLUDE_DIR glh/glh_linear.h
+    NO_SYSTEM_ENVIRONMENT_PATH
+    )
+
+if (GLH_INCLUDE_DIR)
+  set(GLH_FOUND "YES")
+else (GLH_INCLUDE_DIR)
+  set(GLH_FOUND "NO")
+endif (GLH_INCLUDE_DIR)
+
+if (GLH_FOUND)
+  if (NOT GLH_FIND_QUIETLY)
+    message(STATUS "Found GLH: ${GLH_INCLUDE_DIR}")
+    set(GLH_FIND_QUIETLY TRUE) # Only alert us the first time
+  endif (NOT GLH_FIND_QUIETLY)
+else (GLH_FOUND)
+  if (GLH_FIND_REQUIRED)
+    message(FATAL_ERROR "Could not find GLH")
+  endif (GLH_FIND_REQUIRED)
+endif (GLH_FOUND)
+
+mark_as_advanced(GLH_INCLUDE_DIR)
diff --git a/indra/cmake/GLH.cmake b/indra/cmake/GLH.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..911dbe4017172caf71f7bb7afb92d0b2df59f71c
--- /dev/null
+++ b/indra/cmake/GLH.cmake
@@ -0,0 +1,11 @@
+# -*- cmake -*-
+include(Prebuilt)
+
+set(GLH_FIND_REQUIRED TRUE)
+set(GLH_FIND_QUIETLY TRUE)
+
+if (STANDALONE)
+  include(FindGLH)
+else (STANDALONE)
+  use_prebuilt_binary(glh_linear)
+endif (STANDALONE)
diff --git a/indra/cmake/LLRender.cmake b/indra/cmake/LLRender.cmake
index c47e8878e95e74fbd55c95ffaf7dbf4702c65518..8427928151dfe48cf65c71e769e660e979982c43 100644
--- a/indra/cmake/LLRender.cmake
+++ b/indra/cmake/LLRender.cmake
@@ -1,9 +1,11 @@
 # -*- cmake -*-
 
 include(FreeType)
+include(GLH)
 
 set(LLRENDER_INCLUDE_DIRS
     ${LIBS_OPEN_DIR}/llrender
+    ${GLH_INCLUDE_DIR}
     )
 
 if (SERVER AND LINUX)
diff --git a/indra/cmake/LLSharedLibs.cmake b/indra/cmake/LLSharedLibs.cmake
index e29076c73882ddd43cab6b18845bdc6fbde313e2..cafaf1ca3fc796eb68d5eb8d60a13cbacef28aed 100644
--- a/indra/cmake/LLSharedLibs.cmake
+++ b/indra/cmake/LLSharedLibs.cmake
@@ -38,18 +38,17 @@ endmacro(ll_deploy_sharedlibs_command)
 # ll_stage_sharedlib
 # Performs config and adds a copy command for a sharedlib target.
 macro(ll_stage_sharedlib DSO_TARGET)
-  if(SHARED_LIB_STAGING_DIR)
-    # target gets written to the DLL staging directory.
-    # Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
-    set_target_properties(${DSO_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
-    if(NOT WINDOWS)
-      get_target_property(DSO_PATH ${DSO_TARGET} LOCATION)
-      get_filename_component(DSO_FILE ${DSO_PATH} NAME)
-      if(DARWIN)
-        set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources)
-      else(DARWIN)
-        set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
-      endif(DARWIN)
+  # target gets written to the DLL staging directory.
+  # Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
+  set_target_properties(${DSO_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
+  if(NOT WINDOWS)
+	get_target_property(DSO_PATH ${DSO_TARGET} LOCATION)
+	get_filename_component(DSO_FILE ${DSO_PATH} NAME)
+	if(DARWIN)
+	  set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources)
+	else(DARWIN)
+	  set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
+	endif(DARWIN)
 
       # *TODO - maybe make this a symbolic link? -brad
       add_custom_command(
@@ -63,7 +62,6 @@ macro(ll_stage_sharedlib DSO_TARGET)
           COMMENT "Copying llcommon to the staging folder."
         )
     endif(NOT WINDOWS)
-  endif(SHARED_LIB_STAGING_DIR)
 
   if (DARWIN)
     set_target_properties(${DSO_TARGET} PROPERTIES
diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake
index 07db6ab257eab7735bbf57896379afd2241ca55b..c5f9e2c57911298aa37a712c91ad04e12ce6e37a 100644
--- a/indra/cmake/Linking.cmake
+++ b/indra/cmake/Linking.cmake
@@ -2,22 +2,19 @@
 
 include(Variables)
 
-
-if (NOT STANDALONE)
-  set(ARCH_PREBUILT_DIRS ${AUTOBUILD_INSTALL_DIR}/lib)
-  set(ARCH_PREBUILT_DIRS_RELEASE ${AUTOBUILD_INSTALL_DIR}/lib/release)
-  set(ARCH_PREBUILT_DIRS_DEBUG ${AUTOBUILD_INSTALL_DIR}/lib/debug)
-  if (WINDOWS)
-    set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
-    set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
-  elseif (LINUX)
-    set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/lib)
-    set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/bin)
-  elseif (DARWIN)
-    set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
-    set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs/\$(CONFIGURATION)")
-  endif (WINDOWS)
-endif (NOT STANDALONE)
+set(ARCH_PREBUILT_DIRS ${AUTOBUILD_INSTALL_DIR}/lib)
+set(ARCH_PREBUILT_DIRS_RELEASE ${AUTOBUILD_INSTALL_DIR}/lib/release)
+set(ARCH_PREBUILT_DIRS_DEBUG ${AUTOBUILD_INSTALL_DIR}/lib/debug)
+if (WINDOWS)
+  set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
+  set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
+elseif (LINUX)
+  set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/lib)
+  set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/bin)
+elseif (DARWIN)
+  set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
+  set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs/\$(CONFIGURATION)")
+endif (WINDOWS)
 
 # Autobuild packages must provide 'release' versions of libraries, but may provide versions for
 # specific build types.  AUTOBUILD_LIBS_INSTALL_DIRS lists first the build type directory and then
diff --git a/indra/linux_crash_logger/CMakeLists.txt b/indra/linux_crash_logger/CMakeLists.txt
index ab62a0d0af1b7323c395a7b227a0a7c2a6cd02cf..98ebdc748739f0ffcba0265e138a5293d8d08a83 100644
--- a/indra/linux_crash_logger/CMakeLists.txt
+++ b/indra/linux_crash_logger/CMakeLists.txt
@@ -3,6 +3,7 @@
 project(linux_crash_logger)
 
 include(00-Common)
+include(GLH)
 include(LLCommon)
 include(LLCrashLogger)
 include(LLMath)