From c9ab9590aa1d44ea139b16e7ffcb1461d928bdd5 Mon Sep 17 00:00:00 2001
From: Don Kjer <don@lindenlab.com>
Date: Thu, 4 Oct 2012 03:12:48 +0000
Subject: [PATCH] Removing server-related cmake cruft.  Fixing libGLU warnings
 on linux.

---
 autobuild.xml                                 |   8 +-
 indra/CMakeLists.txt                          | 121 ++++++++-------
 indra/cmake/00-Common.cmake                   |  53 ++-----
 indra/cmake/APR.cmake                         |   4 +-
 indra/cmake/CMakeLists.txt                    |  49 ++++--
 indra/cmake/CSharpMacros.cmake                | 142 ------------------
 indra/cmake/CopyBackToSource.cmake            |  16 --
 indra/cmake/DirectX.cmake                     |   4 +-
 indra/cmake/DragDrop.cmake                    |  27 ++--
 indra/cmake/Externals.cmake                   |  34 -----
 indra/cmake/FindELFIO.cmake                   |  48 ------
 indra/cmake/FindLLQtWebkit.cmake              |  62 --------
 indra/cmake/FindMT.cmake                      |  15 --
 indra/cmake/FindMono.cmake                    |  68 ---------
 indra/cmake/FindMySQL.cmake                   |  48 ------
 indra/cmake/FindSVN.cmake                     |  34 -----
 indra/cmake/GLEXT.cmake                       |   8 +
 indra/cmake/LLDatabase.cmake                  |  10 --
 indra/cmake/LLRender.cmake                    |   6 +-
 indra/cmake/LLScene.cmake                     |   7 -
 indra/cmake/LLWindow.cmake                    |  12 +-
 indra/cmake/LLXUIXML.cmake                    |   7 -
 indra/cmake/MonoDeps.cmake                    |  48 ------
 indra/cmake/MonoEmbed.cmake                   |  57 -------
 indra/cmake/MySQL.cmake                       |  26 ----
 indra/cmake/OpenGL.cmake                      |  17 ++-
 indra/cmake/Variables.cmake                   |  24 ---
 indra/cmake/VisualLeakDetector.cmake          |  15 +-
 indra/llrender/CMakeLists.txt                 |   2 +-
 indra/llrender/llgl.cpp                       |   2 +-
 indra/llvfs/CMakeLists.txt                    |   4 +-
 indra/llwindow/CMakeLists.txt                 |  20 ++-
 indra/media_plugins/base/CMakeLists.txt       |   2 +-
 indra/media_plugins/example/CMakeLists.txt    |   2 +-
 .../media_plugins/gstreamer010/CMakeLists.txt |   2 +-
 indra/media_plugins/quicktime/CMakeLists.txt  |   2 +-
 indra/media_plugins/webkit/CMakeLists.txt     |   2 +-
 indra/newview/CMakeLists.txt                  |   2 +-
 indra/test_apps/llplugintest/CMakeLists.txt   |   2 +-
 39 files changed, 181 insertions(+), 831 deletions(-)
 delete mode 100644 indra/cmake/CSharpMacros.cmake
 delete mode 100644 indra/cmake/CopyBackToSource.cmake
 delete mode 100644 indra/cmake/Externals.cmake
 delete mode 100644 indra/cmake/FindELFIO.cmake
 delete mode 100644 indra/cmake/FindLLQtWebkit.cmake
 delete mode 100644 indra/cmake/FindMT.cmake
 delete mode 100644 indra/cmake/FindMono.cmake
 delete mode 100644 indra/cmake/FindMySQL.cmake
 delete mode 100644 indra/cmake/FindSVN.cmake
 create mode 100644 indra/cmake/GLEXT.cmake
 delete mode 100644 indra/cmake/LLDatabase.cmake
 delete mode 100644 indra/cmake/LLScene.cmake
 delete mode 100644 indra/cmake/LLXUIXML.cmake
 delete mode 100644 indra/cmake/MonoDeps.cmake
 delete mode 100644 indra/cmake/MonoEmbed.cmake
 delete mode 100644 indra/cmake/MySQL.cmake

diff --git a/autobuild.xml b/autobuild.xml
index 49bc2ce2076..ca5c2aba62c 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1254,9 +1254,9 @@
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>3ef196fd77fc65bd1f52690dc6713034</string>
+              <string>f9e8a8d77da1849f928ed4ab80423e55</string>
               <key>url</key>
-              <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/265418/arch/Linux/installer/llappearanceutility_source-0.1-linux-20121002.tar.bz2</string>
+              <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/265525/arch/Linux/installer/llappearanceutility_source-0.1-linux-20121004.tar.bz2</string>
             </map>
             <key>name</key>
             <string>linux</string>
@@ -1432,9 +1432,9 @@
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>bdfb275b9bfa071397fb5633a0f5d360</string>
+              <string>335655570cf6cfeb889c9f8c59bd6392</string>
               <key>url</key>
-              <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-mesa/rev/265010/arch/Linux/installer/mesa-7.11.1-linux-20120920.tar.bz2</string>
+              <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-mesa/rev/265524/arch/Linux/installer/mesa-7.11.1-linux-20121004.tar.bz2</string>
             </map>
             <key>name</key>
             <string>linux</string>
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index f5ed9632fab..9ea611df6c4 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -63,73 +63,70 @@ if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
 endif (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
 
 add_custom_target(viewer)
-if (VIEWER)
-  add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger)
-  add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
-  add_subdirectory(${LIBS_OPEN_PREFIX}llui)
-  add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components)
-
-  # Legacy C++ tests. Build always, run if LL_TESTS is true.
-  add_subdirectory(${VIEWER_PREFIX}test)
-
-  # viewer media plugins
-  add_subdirectory(${LIBS_OPEN_PREFIX}media_plugins)
-
-  # llplugin testbed code (is this the right way to include it?)
-  if (LL_TESTS AND NOT LINUX)
-    add_subdirectory(${VIEWER_PREFIX}test_apps/llplugintest)
-  endif (LL_TESTS AND NOT LINUX)
-
-  if (LINUX)
-    add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
-    add_subdirectory(${VIEWER_PREFIX}linux_updater)
-    if (INSTALL_PROPRIETARY)
-        include(LLAppearanceUtility)
-        add_subdirectory(${LLAPPEARANCEUTILITY_SRC_DIR} ${LLAPPEARANCEUTILITY_BIN_DIR})
-    endif (INSTALL_PROPRIETARY)
-    add_dependencies(viewer linux-crash-logger-strip-target linux-updater)
-  elseif (DARWIN)
-    add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
-    add_subdirectory(${VIEWER_PREFIX}mac_updater)
-    add_dependencies(viewer mac-updater mac-crash-logger)
-  elseif (WINDOWS)
-    add_subdirectory(${VIEWER_PREFIX}win_crash_logger)
-    # cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
-    if (EXISTS ${VIEWER_DIR}win_setup)
-      add_subdirectory(${VIEWER_DIR}win_setup)
-    endif (EXISTS ${VIEWER_DIR}win_setup)
-    add_subdirectory(${VIEWER_PREFIX}win_updater)
-    # add_dependencies(viewer windows-updater windows-setup windows-crash-logger)
-    add_dependencies(viewer windows-updater windows-crash-logger)
-  elseif (SOLARIS)
-    add_subdirectory(solaris_crash_logger)
-    add_dependencies(viewer solaris-crash-logger)
-  endif (LINUX)
-
-  add_subdirectory(${VIEWER_PREFIX}newview)
-  add_dependencies(viewer secondlife-bin)
-endif (VIEWER)
+add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger)
+add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
+add_subdirectory(${LIBS_OPEN_PREFIX}llui)
+add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components)
+
+# Legacy C++ tests. Build always, run if LL_TESTS is true.
+add_subdirectory(${VIEWER_PREFIX}test)
+
+# viewer media plugins
+add_subdirectory(${LIBS_OPEN_PREFIX}media_plugins)
+
+# llplugin testbed code (is this the right way to include it?)
+if (LL_TESTS AND NOT LINUX)
+  add_subdirectory(${VIEWER_PREFIX}test_apps/llplugintest)
+endif (LL_TESTS AND NOT LINUX)
+
+if (LINUX)
+  add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
+  add_subdirectory(${VIEWER_PREFIX}linux_updater)
+  if (INSTALL_PROPRIETARY)
+      include(LLAppearanceUtility)
+      add_subdirectory(${LLAPPEARANCEUTILITY_SRC_DIR} ${LLAPPEARANCEUTILITY_BIN_DIR})
+  endif (INSTALL_PROPRIETARY)
+  add_dependencies(viewer linux-crash-logger-strip-target linux-updater)
+elseif (DARWIN)
+  add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
+  add_subdirectory(${VIEWER_PREFIX}mac_updater)
+  add_dependencies(viewer mac-updater mac-crash-logger)
+elseif (WINDOWS)
+  add_subdirectory(${VIEWER_PREFIX}win_crash_logger)
+  # cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
+  if (EXISTS ${VIEWER_DIR}win_setup)
+    add_subdirectory(${VIEWER_DIR}win_setup)
+  endif (EXISTS ${VIEWER_DIR}win_setup)
+  add_subdirectory(${VIEWER_PREFIX}win_updater)
+  # add_dependencies(viewer windows-updater windows-setup windows-crash-logger)
+  add_dependencies(viewer windows-updater windows-crash-logger)
+elseif (SOLARIS)
+  add_subdirectory(solaris_crash_logger)
+  add_dependencies(viewer solaris-crash-logger)
+endif (LINUX)
+
+add_subdirectory(${VIEWER_PREFIX}newview)
+add_dependencies(viewer secondlife-bin)
 
 # Linux builds the viewer and server in 2 separate projects
 # In order for build server to work on linux, 
 # the viewer project needs a server target.
 # This is not true for mac and windows.
-if (LINUX) 
-  add_custom_target(server)
-endif (LINUX)
-if (SERVER)
-  if (NOT LINUX)
-    add_custom_target(server)
-  endif (NOT LINUX)
-  include(${SERVER_PREFIX}Server.cmake)
-endif (SERVER)
-
-# Windows builds include tools like VFS tool
-if (SERVER)
-  if (WINDOWS)
-    add_subdirectory(${SERVER_PREFIX}tools)
-  endif (WINDOWS)
-endif (SERVER)
+# *TODO: Do something like this for BAKING?
+#if (LINUX) 
+#  add_custom_target(server)
+#endif (LINUX)
+#if (SERVER)
+#  if (NOT LINUX)
+#    add_custom_target(server)
+#  endif (NOT LINUX)
+#  include(${SERVER_PREFIX}Server.cmake)
+#
+#  # Windows builds include tools like VFS tool
+#  if (WINDOWS)
+#    add_subdirectory(${SERVER_PREFIX}tools)
+#  endif (WINDOWS)
+#endif (SERVER)
 
 if (LL_TESTS)
   # Define after the custom viewer and server targets are created so
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 21cb87237dd..87fa4cf55ae 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -150,41 +150,21 @@ if (LINUX)
       -pthread
       )
 
-  if (SERVER)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-60")
-    if (EXISTS /etc/debian_version)
-      FILE(READ /etc/debian_version DEBIAN_VERSION)
-    else (EXISTS /etc/debian_version)
-      set(DEBIAN_VERSION "")
-    endif (EXISTS /etc/debian_version)
-
-    if (NOT DEBIAN_VERSION STREQUAL "3.1")
-      add_definitions(-DCTYPE_WORKAROUND)
-    endif (NOT DEBIAN_VERSION STREQUAL "3.1")
-
-    if (EXISTS /usr/lib/mysql4/mysql)
-      link_directories(/usr/lib/mysql4/mysql)
-    endif (EXISTS /usr/lib/mysql4/mysql)
-
-  endif (SERVER)
-
-  if (VIEWER)
-    add_definitions(-DAPPID=secondlife)
-    add_definitions(-fvisibility=hidden)
-    # don't catch SIGCHLD in our base application class for the viewer - some of our 3rd party libs may need their *own* SIGCHLD handler to work.  Sigh!  The viewer doesn't need to catch SIGCHLD anyway.
-    add_definitions(-DLL_IGNORE_SIGCHLD)
-    if (WORD_SIZE EQUAL 32)
-      add_definitions(-march=pentium4)
-    endif (WORD_SIZE EQUAL 32)
-    add_definitions(-mfpmath=sse)
-    #add_definitions(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2
-    if (NOT STANDALONE)
-      # this stops us requiring a really recent glibc at runtime
-      add_definitions(-fno-stack-protector)
-      # linking can be very memory-hungry, especially the final viewer link
-      set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory")
-    endif (NOT STANDALONE)
-  endif (VIEWER)
+  add_definitions(-DAPPID=secondlife)
+  add_definitions(-fvisibility=hidden)
+  # don't catch SIGCHLD in our base application class for the viewer - some of our 3rd party libs may need their *own* SIGCHLD handler to work.  Sigh!  The viewer doesn't need to catch SIGCHLD anyway.
+  add_definitions(-DLL_IGNORE_SIGCHLD)
+  if (WORD_SIZE EQUAL 32)
+    add_definitions(-march=pentium4)
+  endif (WORD_SIZE EQUAL 32)
+  add_definitions(-mfpmath=sse)
+  #add_definitions(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2
+  if (NOT STANDALONE)
+    # this stops us requiring a really recent glibc at runtime
+    add_definitions(-fno-stack-protector)
+    # linking can be very memory-hungry, especially the final viewer link
+    set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory")
+  endif (NOT STANDALONE)
 
   set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}")
   set(CMAKE_CXX_FLAGS_RELEASE "-O2 ${CMAKE_CXX_FLAGS_RELEASE}")
@@ -254,6 +234,3 @@ else (STANDALONE)
       )
 endif (STANDALONE)
 
-if(SERVER)
-  include_directories(${LIBS_PREBUILT_DIR}/include/havok)
-endif(SERVER)
diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake
index daafa00fe27..492ba2adea1 100644
--- a/indra/cmake/APR.cmake
+++ b/indra/cmake/APR.cmake
@@ -49,9 +49,7 @@ else (STANDALONE)
   set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/apr-1)
 
   if (LINUX)
-    if (VIEWER)
-      list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} uuid)
-    endif (VIEWER)
+    list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} uuid)
     list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} rt)
   endif (LINUX)
 endif (STANDALONE)
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index 5935eeb1920..bee7a1b7c36 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -14,49 +14,65 @@ set(cmake_SOURCE_FILES
     Boost.cmake
     BuildVersion.cmake
     CARes.cmake
-    CURL.cmake
     CMakeCopyIfDifferent.cmake
+    CURL.cmake
     Copy3rdPartyLibs.cmake
-    CSharpMacros.cmake
     DBusGlib.cmake
+    DeploySharedLibs.cmake
     DirectX.cmake
+    DragDrop.cmake
     EXPAT.cmake
+    ExamplePlugin.cmake
+    FMOD.cmake
     FindAPR.cmake
+    FindAutobuild.cmake
     FindBerkeleyDB.cmake
     FindCARes.cmake
-    FindELFIO.cmake
     FindFMOD.cmake
+    FindGLH.cmake
+    FindGoogleBreakpad.cmake
     FindGooglePerfTools.cmake
-    FindMono.cmake
-    FindMySQL.cmake
+    FindHUNSPELL.cmake
+    FindJsonCpp.cmake
+    FindNDOF.cmake
     FindOpenJPEG.cmake
+    FindSCP.cmake
     FindXmlRpcEpi.cmake
     FindZLIB.cmake
-    FMOD.cmake
     FreeType.cmake
+    GLEXT.cmake
+    GLH.cmake
     GLOD.cmake
     GStreamer010Plugin.cmake
+    GetPrerequisites_2_8.cmake
+    Glui.cmake
+    Glut.cmake
+    GoogleBreakpad.cmake
+    GoogleMock.cmake
     GooglePerfTools.cmake
+    Havok.cmake
     Hunspell.cmake
     JPEG.cmake
+    JsonCpp.cmake
     LLAddBuildTest.cmake
     LLAppearance.cmake
+    LLAppearanceUtility.cmake
     LLAudio.cmake
     LLCharacter.cmake
     LLCommon.cmake
     LLCrashLogger.cmake
-    LLDatabase.cmake
     LLImage.cmake
     LLImageJ2COJ.cmake
     LLInventory.cmake
     LLKDU.cmake
+    LLLogin.cmake
     LLMath.cmake
     LLMessage.cmake
+    LLPhysicsExtensions.cmake
     LLPlugin.cmake
     LLPrimitive.cmake
-    LLPhysicsExtensions.cmake
     LLRender.cmake
-    LLScene.cmake
+    LLSharedLibs.cmake
     LLTestCommand.cmake
     LLUI.cmake
     LLVFS.cmake
@@ -64,21 +80,26 @@ set(cmake_SOURCE_FILES
     LLXML.cmake
     LScript.cmake
     Linking.cmake
-    MonoEmbed.cmake
-    MySQL.cmake
+    MediaPluginBase.cmake
     NDOF.cmake
     OPENAL.cmake
     OpenGL.cmake
     OpenJPEG.cmake
     OpenSSL.cmake
     PNG.cmake
-    Python.cmake
+    PluginAPI.cmake
     Prebuilt.cmake
+    PulseAudio.cmake
+    Python.cmake
+    QuickTimePlugin.cmake
     TemplateCheck.cmake
     Tut.cmake
     UI.cmake
     UnixInstall.cmake
     Variables.cmake
+    ViewerMiscLibs.cmake
+    VisualLeakDetector.cmake
+    WebKitLibPlugin.cmake
     XmlRpcEpi.cmake
     ZLIB.cmake
     )
@@ -89,10 +110,6 @@ set(master_SOURCE_FILES
     ../CMakeLists.txt
     )
 
-if (SERVER)
-  list(APPEND master_SOURCE_FILES ../Server.cmake)
-endif (SERVER)
-
 source_group("Master Rules" FILES ${master_SOURCE_FILES})
 
 set_source_files_properties(${cmake_SOURCE_FILES} ${master_SOURCE_FILES}
diff --git a/indra/cmake/CSharpMacros.cmake b/indra/cmake/CSharpMacros.cmake
deleted file mode 100644
index a4dd8150430..00000000000
--- a/indra/cmake/CSharpMacros.cmake
+++ /dev/null
@@ -1,142 +0,0 @@
-# - This is a support module for easy Mono/C# handling with CMake
-# It defines the following macros:
-#
-# ADD_CS_LIBRARY (<target> <source>)
-# ADD_CS_EXECUTABLE (<target> <source>)
-# INSTALL_GAC (<target>)
-#
-# Note that the order of the arguments is important.
-#
-# You can optionally set the variable CS_FLAGS to tell the macros whether
-# to pass additional flags to the compiler. This is particularly useful to
-# set assembly references, unsafe code, etc... These flags are always reset
-# after the target was added so you don't have to care about that.
-#
-# copyright (c) 2007 Arno Rehn arno@arnorehn.de
-#
-# Redistribution and use is allowed according to the terms of the GPL license.
-
-
-# ----- support macros -----
-MACRO(GET_CS_LIBRARY_TARGET_DIR)
-        IF (NOT LIBRARY_OUTPUT_PATH)
-                SET(CS_LIBRARY_TARGET_DIR ${CMAKE_CURRENT_BINARY_DIR})
-        ELSE (NOT LIBRARY_OUTPUT_PATH)
-                SET(CS_LIBRARY_TARGET_DIR ${LIBRARY_OUTPUT_PATH})
-        ENDIF (NOT LIBRARY_OUTPUT_PATH)
-ENDMACRO(GET_CS_LIBRARY_TARGET_DIR)
-
-MACRO(GET_CS_EXECUTABLE_TARGET_DIR)
-        IF (NOT EXECUTABLE_OUTPUT_PATH)
-                SET(CS_EXECUTABLE_TARGET_DIR ${CMAKE_CURRENT_BINARY_DIR})
-        ELSE (NOT EXECUTABLE_OUTPUT_PATH)
-                SET(CS_EXECUTABLE_TARGET_DIR ${EXECUTABLE_OUTPUT_PATH})
-        ENDIF (NOT EXECUTABLE_OUTPUT_PATH)
-ENDMACRO(GET_CS_EXECUTABLE_TARGET_DIR)
-
-MACRO(MAKE_PROPER_FILE_LIST)
-        FOREACH(file ${ARGN})
-                # first assume it's a relative path
-                FILE(GLOB globbed ${CMAKE_CURRENT_SOURCE_DIR}/${file})
-                IF(globbed)
-                        FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${file} native)
-                ELSE(globbed)
-                        FILE(TO_NATIVE_PATH ${file} native)
-                ENDIF(globbed)
-                SET(proper_file_list ${proper_file_list} ${native})
-                SET(native "")
-        ENDFOREACH(file)
-ENDMACRO(MAKE_PROPER_FILE_LIST)
-# ----- end support macros -----
-
-MACRO(ADD_CS_LIBRARY target)
-        GET_CS_LIBRARY_TARGET_DIR()
-        
-        SET(target_DLL "${CS_LIBRARY_TARGET_DIR}/${target}.dll")
-        MAKE_PROPER_FILE_LIST(${ARGN})
-        FILE(RELATIVE_PATH relative_path ${CMAKE_BINARY_DIR} ${target_DLL})
-        
-        SET(target_KEY "${CMAKE_CURRENT_SOURCE_DIR}/${target}.key")
-        SET(target_CS_FLAGS "${CS_FLAGS}")
-        IF(${target}_CS_FLAGS)
-                LIST(APPEND target_CS_FLAGS ${${target}_CS_FLAGS})
-        ENDIF(${target}_CS_FLAGS)
-        IF(EXISTS ${target_KEY})
-                LIST(APPEND target_CS_FLAGS -keyfile:${target_KEY})
-        ENDIF(EXISTS ${target_KEY})
-
-        FOREACH(ref ${${target}_REFS})
-                SET(ref_DLL ${CMAKE_CURRENT_BINARY_DIR}/${ref}.dll)
-                IF(EXISTS ${ref_DLL})
-                        LIST(APPEND target_CS_FLAGS -r:${ref_DLL})
-                ELSE(EXISTS ${ref_DLL})
-                        LIST(APPEND target_CS_FLAGS -r:${ref})
-                ENDIF(EXISTS ${ref_DLL})
-        ENDFOREACH(ref ${${target}_REFS})
-
-        ADD_CUSTOM_COMMAND (OUTPUT ${target_DLL}
-                COMMAND ${MCS_EXECUTABLE} ${target_CS_FLAGS} -out:${target_DLL} -target:library ${proper_file_list}
-                MAIN_DEPENDENCY ${proper_file_list}
-                DEPENDS ${ARGN}
-                COMMENT "Building ${relative_path}")
-        ADD_CUSTOM_TARGET (${target} ALL DEPENDS ${target_DLL})
-
-        FOREACH(ref ${${target}_REFS})
-                GET_TARGET_PROPERTY(is_target ${ref} TYPE)
-                IF(is_target)
-                        ADD_DEPENDENCIES(${target} ${ref})
-                ENDIF(is_target)
-        ENDFOREACH(ref ${${target}_REFS})
-
-        SET(relative_path "")
-        SET(proper_file_list "")
-ENDMACRO(ADD_CS_LIBRARY)
-
-MACRO(ADD_CS_EXECUTABLE target)
-        GET_CS_EXECUTABLE_TARGET_DIR()
-        
-        # Seems like cmake doesn't like the ".exe" ending for custom commands.
-        # If we call it ${target}.exe, 'make' will later complain about a missing rule.
-        # Create a fake target instead.
-        SET(target_EXE "${CS_EXECUTABLE_TARGET_DIR}/${target}.exe")
-        SET(target_TOUCH "${CS_EXECUTABLE_TARGET_DIR}/${target}.exe-built")
-        GET_DIRECTORY_PROPERTY(clean ADDITIONAL_MAKE_CLEAN_FILES)
-        LIST(APPEND clean ${target}.exe)
-        SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${clean}")
-        MAKE_PROPER_FILE_LIST(${ARGN})
-        FILE(RELATIVE_PATH relative_path ${CMAKE_BINARY_DIR} ${target_EXE})
-        SET(target_CS_FLAGS "${CS_FLAGS}")
-        
-        FOREACH(ref ${${target}_REFS})
-                SET(ref_DLL ${CMAKE_CURRENT_SOURCE_DIR}/${ref}.dll)
-                IF(EXISTS ${ref_DLL})
-                        LIST(APPEND target_CS_FLAGS -r:${ref_DLL})
-                ELSE(EXISTS ${ref_DLL})
-                        LIST(APPEND target_CS_FLAGS -r:${ref})
-                ENDIF(EXISTS ${ref_DLL})
-        ENDFOREACH(ref ${${target}_REFS})
-
-        ADD_CUSTOM_COMMAND (OUTPUT "${target_TOUCH}"
-                COMMAND ${MCS_EXECUTABLE} ${target_CS_FLAGS} -out:${target_EXE} ${proper_file_list}
-                COMMAND ${CMAKE_COMMAND} -E touch ${target_TOUCH}
-                MAIN_DEPENDENCY ${ARGN}
-                DEPENDS ${ARGN}
-                COMMENT "Building ${relative_path}")
-        ADD_CUSTOM_TARGET ("${target}" ALL DEPENDS "${target_TOUCH}")
-
-        FOREACH(ref ${${target}_REFS})
-                GET_TARGET_PROPERTY(is_target ${ref} TYPE)
-                IF(is_target)
-                        ADD_DEPENDENCIES(${target} ${ref})
-                ENDIF(is_target)
-        ENDFOREACH(ref ${${target}_REFS})
-
-        SET(relative_path "")
-        SET(proper_file_list "")
-ENDMACRO(ADD_CS_EXECUTABLE)
-
-MACRO(INSTALL_GAC target)
-        GET_CS_LIBRARY_TARGET_DIR()
-        
-        INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${GACUTIL_EXECUTABLE} -i ${CS_LIBRARY_TARGET_DIR}/${target}.dll -package 2.0)")
-ENDMACRO(INSTALL_GAC target)
diff --git a/indra/cmake/CopyBackToSource.cmake b/indra/cmake/CopyBackToSource.cmake
deleted file mode 100644
index d217df9aecf..00000000000
--- a/indra/cmake/CopyBackToSource.cmake
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- cmake -*-
-# Copies a binary back to the source directory
-
-MACRO(COPY_BACK_TO_SOURCE target)
-   GET_TARGET_PROPERTY(FROM ${target} LOCATION)
-   SET(TO ${CMAKE_CURRENT_SOURCE_DIR})
-   #MESSAGE("TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${FROM} ${TO}")
-   ADD_CUSTOM_COMMAND(
-        TARGET ${target} POST_BUILD
-        COMMAND ${CMAKE_COMMAND} -E copy ${FROM} ${TO}
-        DEPENDS ${FROM}
-        COMMENT "Copying ${target} to ${CMAKE_CURRENT_BINARY_DIR}"
-        )
-ENDMACRO(COPY_BACK_TO_SOURCE)
-
-
diff --git a/indra/cmake/DirectX.cmake b/indra/cmake/DirectX.cmake
index 8cae6068484..25163d03226 100644
--- a/indra/cmake/DirectX.cmake
+++ b/indra/cmake/DirectX.cmake
@@ -1,6 +1,6 @@
 # -*- cmake -*-
 
-if (VIEWER AND WINDOWS)
+if (WINDOWS)
   find_path(DIRECTX_INCLUDE_DIR dxdiag.h
             "$ENV{DXSDK_DIR}/Include"
             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Include"
@@ -45,4 +45,4 @@ if (VIEWER AND WINDOWS)
     message(FATAL_ERROR "Could not find DirectX SDK Libraries")
   endif (DIRECTX_LIBRARY_DIR)
 
-endif (VIEWER AND WINDOWS)
+endif (WINDOWS)
diff --git a/indra/cmake/DragDrop.cmake b/indra/cmake/DragDrop.cmake
index c0424396e5f..b70aa6b6ee8 100644
--- a/indra/cmake/DragDrop.cmake
+++ b/indra/cmake/DragDrop.cmake
@@ -1,23 +1,20 @@
 # -*- cmake -*-
 
-if (VIEWER)
+set(OS_DRAG_DROP ON CACHE BOOL "Build the viewer with OS level drag and drop turned on or off")
 
-  set(OS_DRAG_DROP ON CACHE BOOL "Build the viewer with OS level drag and drop turned on or off")
+if (OS_DRAG_DROP)
 
-  if (OS_DRAG_DROP)
+  if (WINDOWS)
+    add_definitions(-DLL_OS_DRAGDROP_ENABLED=1)
+  endif (WINDOWS)
 
-    if (WINDOWS)
-      add_definitions(-DLL_OS_DRAGDROP_ENABLED=1)
-    endif (WINDOWS)
+  if (DARWIN)
+    add_definitions(-DLL_OS_DRAGDROP_ENABLED=1)
+  endif (DARWIN)
 
-    if (DARWIN)
-      add_definitions(-DLL_OS_DRAGDROP_ENABLED=1)
-    endif (DARWIN)
+  if (LINUX)
+    add_definitions(-DLL_OS_DRAGDROP_ENABLED=0)
+  endif (LINUX)
 
-    if (LINUX)
-      add_definitions(-DLL_OS_DRAGDROP_ENABLED=0)
-    endif (LINUX)
+endif (OS_DRAG_DROP)
 
-  endif (OS_DRAG_DROP)
-
-endif (VIEWER)
diff --git a/indra/cmake/Externals.cmake b/indra/cmake/Externals.cmake
deleted file mode 100644
index 26f3b560493..00000000000
--- a/indra/cmake/Externals.cmake
+++ /dev/null
@@ -1,34 +0,0 @@
-# -*- cmake -*-
-
-include(Python)
-include(FindSVN)
-
-macro (use_svn_external _binary _path _url _rev)
-  if (NOT STANDALONE)
-    if(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed)
-      if(SVN_FOUND)
-        if(DEBUG_EXTERNALS)
-          message("cd ${_path} && ${SVN_EXECUTABLE} checkout -r ${_rev} ${_url} ${_binary}")
-        endif(DEBUG_EXTERNALS)
-        execute_process(COMMAND ${SVN_EXECUTABLE}
-          checkout
-          -r ${_rev}
-          ${_url}
-          ${_binary}
-          WORKING_DIRECTORY ${_path}
-          RESULT_VARIABLE ${_binary}_installed
-          )
-      else(SVN_FOUND)
-        message(FATAL_ERROR "Failed to find SVN_EXECUTABLE")
-      endif(SVN_FOUND)
-      file(WRITE ${CMAKE_BINARY_DIR}/temp/${_binary}_installed "${${_binary}_installed}")
-    else(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed)
-      set(${_binary}_installed 0)
-    endif(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed)
-    if(NOT ${_binary}_installed EQUAL 0)
-      message(FATAL_ERROR
-              "Failed to download or unpack prebuilt '${_binary}'."
-              " Process returned ${${_binary}_installed}.")
-    endif (NOT ${_binary}_installed EQUAL 0)
-  endif (NOT STANDALONE)
-endmacro (use_svn_external _binary _path _url _rev)
diff --git a/indra/cmake/FindELFIO.cmake b/indra/cmake/FindELFIO.cmake
deleted file mode 100644
index 8a5421ab9c8..00000000000
--- a/indra/cmake/FindELFIO.cmake
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- cmake -*-
-
-# - Find ELFIO
-# Find the ELFIO includes and library
-# This module defines
-#  ELFIO_INCLUDE_DIR, where to find elfio.h, etc.
-#  ELFIO_LIBRARIES, the libraries needed to use ELFIO.
-#  ELFIO_FOUND, If false, do not try to use ELFIO.
-# also defined, but not for general use are
-#  ELFIO_LIBRARY, where to find the ELFIO library.
-
-FIND_PATH(ELFIO_INCLUDE_DIR ELFIO/ELFIO.h
-/usr/local/include
-/usr/include
-)
-
-SET(ELFIO_NAMES ${ELFIO_NAMES} ELFIO)
-FIND_LIBRARY(ELFIO_LIBRARY
-  NAMES ${ELFIO_NAMES}
-  PATHS /usr/lib /usr/local/lib
-  )
-
-IF (ELFIO_LIBRARY AND ELFIO_INCLUDE_DIR)
-    SET(ELFIO_LIBRARIES ${ELFIO_LIBRARY})
-    SET(ELFIO_FOUND "YES")
-ELSE (ELFIO_LIBRARY AND ELFIO_INCLUDE_DIR)
-  SET(ELFIO_FOUND "NO")
-ENDIF (ELFIO_LIBRARY AND ELFIO_INCLUDE_DIR)
-
-
-IF (ELFIO_FOUND)
-   IF (NOT ELFIO_FIND_QUIETLY)
-      MESSAGE(STATUS "Found ELFIO: ${ELFIO_LIBRARIES}")
-   ENDIF (NOT ELFIO_FIND_QUIETLY)
-ELSE (ELFIO_FOUND)
-   IF (ELFIO_FIND_REQUIRED)
-      MESSAGE(FATAL_ERROR "Could not find ELFIO library")
-   ENDIF (ELFIO_FIND_REQUIRED)
-ENDIF (ELFIO_FOUND)
-
-# Deprecated declarations.
-SET (NATIVE_ELFIO_INCLUDE_PATH ${ELFIO_INCLUDE_DIR} )
-GET_FILENAME_COMPONENT (NATIVE_ELFIO_LIB_PATH ${ELFIO_LIBRARY} PATH)
-
-MARK_AS_ADVANCED(
-  ELFIO_LIBRARY
-  ELFIO_INCLUDE_DIR
-  )
diff --git a/indra/cmake/FindLLQtWebkit.cmake b/indra/cmake/FindLLQtWebkit.cmake
deleted file mode 100644
index 2f666d3bf01..00000000000
--- a/indra/cmake/FindLLQtWebkit.cmake
+++ /dev/null
@@ -1,62 +0,0 @@
-# -*- cmake -*-
-
-# - Find llqtwebkit
-# Find the llqtwebkit includes and library
-# This module defines
-#  LLQTWEBKIT_INCLUDE_DIR, where to find llqtwebkit.h, etc.
-#  LLQTWEBKIT_LIBRARY, the llqtwebkit library with full path.
-#  LLQTWEBKIT_FOUND, If false, do not try to use llqtwebkit.
-# also defined, but not for general use are
-#  LLQTWEBKIT_LIBRARIES, the libraries needed to use llqtwebkit.
-#  LLQTWEBKIT_LIBRARY_DIRS, where to find the llqtwebkit library.
-#  LLQTWEBKIT_DEFINITIONS - You should add_definitions(${LLQTWEBKIT_DEFINITIONS})
-#      before compiling code that includes llqtwebkit library files.
-
-# Try to use pkg-config first.
-# This allows to have two different libllqtwebkit packages installed:
-# one for viewer 2.x and one for viewer 1.x.
-include(FindPkgConfig)
-if (PKG_CONFIG_FOUND)
-    if (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
-        set(_PACKAGE_ARGS libllqtwebkit>=${LLQtWebkit_FIND_VERSION} REQUIRED)
-    else (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
-        set(_PACKAGE_ARGS libllqtwebkit)
-    endif (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
-    if (NOT "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_LESS "2.8.2")
-      # As virtually nobody will have a pkg-config file for this, do this check always quiet.
-      # Unfortunately cmake 2.8.2 or higher is required for pkg_check_modules to have a 'QUIET'.
-      set(_PACKAGE_ARGS ${_PACKAGE_ARGS} QUIET)
-    endif ()
-    pkg_check_modules(LLQTWEBKIT ${_PACKAGE_ARGS})
-endif (PKG_CONFIG_FOUND)
-set(LLQTWEBKIT_DEFINITIONS ${LLQTWEBKIT_CFLAGS_OTHER})
-
-find_path(LLQTWEBKIT_INCLUDE_DIR llqtwebkit.h NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_INCLUDE_DIRS})
-
-find_library(LLQTWEBKIT_LIBRARY NAMES llqtwebkit NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_LIBRARY_DIRS})
-
-if (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND)   # If pkg-config couldn't find it, pretend we don't have pkg-config.
-   set(LLQTWEBKIT_LIBRARIES llqtwebkit)
-   get_filename_component(LLQTWEBKIT_LIBRARY_DIRS ${LLQTWEBKIT_LIBRARY} PATH)
-endif (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND)
-
-# Handle the QUIETLY and REQUIRED arguments and set LLQTWEBKIT_FOUND
-# to TRUE if all listed variables are TRUE.
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(
-  LLQTWEBKIT
-  DEFAULT_MSG
-  LLQTWEBKIT_LIBRARY
-  LLQTWEBKIT_INCLUDE_DIR
-  LLQTWEBKIT_LIBRARIES
-  LLQTWEBKIT_LIBRARY_DIRS
-  )
-
-mark_as_advanced(
-  LLQTWEBKIT_LIBRARY
-  LLQTWEBKIT_INCLUDE_DIR
-  LLQTWEBKIT_LIBRARIES
-  LLQTWEBKIT_LIBRARY_DIRS
-  LLQTWEBKIT_DEFINITIONS
-  )
-
diff --git a/indra/cmake/FindMT.cmake b/indra/cmake/FindMT.cmake
deleted file mode 100644
index 5239a4c2f5a..00000000000
--- a/indra/cmake/FindMT.cmake
+++ /dev/null
@@ -1,15 +0,0 @@
-#Find the windows manifest tool.
-
-FIND_PROGRAM(HAVE_MANIFEST_TOOL NAMES mt
-                 PATHS
-                 "$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/VC/bin"
-                 "$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/Common7/Tools/Bin"
-                 "$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/SDK/v2.0/Bin")
-IF(HAVE_MANIFEST_TOOL)
-    MESSAGE(STATUS "Found Mainfest Tool. Embedding custom manifests.")
-ELSE(HAVE_MANIFEST_TOOL)
-    MESSAGE(FATAL_ERROR "Manifest tool, mt.exe, can't be found.")
-ENDIF(HAVE_MANIFEST_TOOL)
-
-STRING(REPLACE "/MANIFEST" "/MANIFEST:NO" CMAKE_EXE_LINKER_FLAGS 
-      ${CMAKE_EXE_LINKER_FLAGS})
diff --git a/indra/cmake/FindMono.cmake b/indra/cmake/FindMono.cmake
deleted file mode 100644
index d956c48656a..00000000000
--- a/indra/cmake/FindMono.cmake
+++ /dev/null
@@ -1,68 +0,0 @@
-# - Try to find the mono, mcs, gmcs and gacutil
-#
-# defines
-#
-# MONO_FOUND - system has mono, mcs, gmcs and gacutil
-# MONO_PATH - where to find 'mono'
-# MCS_PATH - where to find 'mcs'
-# GMCS_PATH - where to find 'gmcs'
-# GACUTIL_PATH - where to find 'gacutil'
-#
-# copyright (c) 2007 Arno Rehn arno@arnorehn.de
-#
-# Redistribution and use is allowed according to the terms of the GPL license.
-# Removed the check for gmcs
-
-FIND_PROGRAM (MONO_EXECUTABLE mono
-             "$ENV{PROGRAMFILES}/Mono-1.9.1/bin"
-             "$ENV{PROGRAMFILES}/Mono-1.2.6/bin"
-             /bin
-             /usr/bin
-             /usr/local/bin
-)
-FIND_PROGRAM (MCS_EXECUTABLE mcs
-             "$ENV{PROGRAMFILES}/Mono-1.9.1/bin"
-             "$ENV{PROGRAMFILES}/Mono-1.2.6/bin"
-             /bin
-             /usr/bin
-             /usr/local/bin
-)
-FIND_PROGRAM (GMCS_EXECUTABLE gmcs
-             "$ENV{PROGRAMFILES}/Mono-1.9.1/bin"
-             "$ENV{PROGRAMFILES}/Mono-1.2.6/bin"
-             /bin
-             /usr/bin
-             /usr/local/bin
-)
-FIND_PROGRAM (GACUTIL_EXECUTABLE gacutil
-             "$ENV{PROGRAMFILES}/Mono-1.9.1/bin"
-             "$ENV{PROGRAMFILES}/Mono-1.2.6/bin"
-             /bin
-             /usr/bin
-             /usr/local/bin
-)
-FIND_PROGRAM (ILASM_EXECUTABLE
-             NAMES ilasm.bat ilasm
-             NO_DEFAULT_PATH
-             PATHS "$ENV{PROGRAMFILES}/Mono-1.9.1/bin" "$ENV{PROGRAMFILES}/Mono-1.2.6/bin" /bin /usr/bin /usr/local/bin
-)
-
-SET (MONO_FOUND FALSE)
-
-IF (MONO_EXECUTABLE AND MCS_EXECUTABLE AND GACUTIL_EXECUTABLE)
-        SET (MONO_FOUND TRUE)
-ENDIF (MONO_EXECUTABLE AND MCS_EXECUTABLE AND GACUTIL_EXECUTABLE)
-
-IF (MONO_FOUND)
-        IF (NOT Mono_FIND_QUIETLY)
-                MESSAGE(STATUS "Found mono: ${MONO_EXECUTABLE}")
-                MESSAGE(STATUS "Found mcs: ${MCS_EXECUTABLE}")
-                MESSAGE(STATUS "Found gacutil: ${GACUTIL_EXECUTABLE}")
-        ENDIF (NOT Mono_FIND_QUIETLY)
-ELSE (MONO_FOUND)
-        IF (Mono_FIND_REQUIRED)
-                MESSAGE(FATAL_ERROR "Could not find one or more of the following programs: mono, mcs, gacutil")
-        ENDIF (Mono_FIND_REQUIRED)
-ENDIF (MONO_FOUND)
-
-MARK_AS_ADVANCED(MONO_EXECUTABLE MCS_EXECUTABLE GACUTIL_EXECUTABLE)
diff --git a/indra/cmake/FindMySQL.cmake b/indra/cmake/FindMySQL.cmake
deleted file mode 100644
index 431940328f9..00000000000
--- a/indra/cmake/FindMySQL.cmake
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- cmake -*-
-
-# - Find MySQL
-# Find the MySQL includes and library
-# This module defines
-#  MYSQL_INCLUDE_DIR, where to find mysql.h, etc.
-#  MYSQL_LIBRARIES, the libraries needed to use Mysql.
-#  MYSQL_FOUND, If false, do not try to use Mysql.
-# also defined, but not for general use are
-#  MYSQL_LIBRARY, where to find the Mysql library.
-
-FIND_PATH(MYSQL_INCLUDE_DIR mysql/mysql.h
-/usr/local/include
-/usr/include
-)
-
-SET(MYSQL_NAMES ${MYSQL_NAMES} mysqlclient)
-FIND_LIBRARY(MYSQL_LIBRARY
-  NAMES ${MYSQL_NAMES}
-  PATHS /usr/lib/mysql /usr/lib /usr/local/lib/mysql /usr/local/lib
-  )
-
-IF (MYSQL_LIBRARY AND MYSQL_INCLUDE_DIR)
-    SET(MYSQL_LIBRARIES ${MYSQL_LIBRARY})
-    SET(MYSQL_FOUND "YES")
-ELSE (MYSQL_LIBRARY AND MYSQL_INCLUDE_DIR)
-  SET(MYSQL_FOUND "NO")
-ENDIF (MYSQL_LIBRARY AND MYSQL_INCLUDE_DIR)
-
-
-IF (MYSQL_FOUND)
-   IF (NOT MYSQL_FIND_QUIETLY)
-      MESSAGE(STATUS "Found MySQL: ${MYSQL_LIBRARIES}")
-   ENDIF (NOT MYSQL_FIND_QUIETLY)
-ELSE (MYSQL_FOUND)
-   IF (MYSQL_FIND_REQUIRED)
-      MESSAGE(FATAL_ERROR "Could not find MySQL library")
-   ENDIF (MYSQL_FIND_REQUIRED)
-ENDIF (MYSQL_FOUND)
-
-# Deprecated declarations.
-SET (NATIVE_MYSQL_INCLUDE_PATH ${MYSQL_INCLUDE_DIR} )
-GET_FILENAME_COMPONENT (NATIVE_MYSQL_LIB_PATH ${MYSQL_LIBRARY} PATH)
-
-MARK_AS_ADVANCED(
-  MYSQL_LIBRARY
-  MYSQL_INCLUDE_DIR
-  )
diff --git a/indra/cmake/FindSVN.cmake b/indra/cmake/FindSVN.cmake
deleted file mode 100644
index 3322be4ca92..00000000000
--- a/indra/cmake/FindSVN.cmake
+++ /dev/null
@@ -1,34 +0,0 @@
-# -*- cmake -*-
-#
-# Find the svn executable for exporting old svn:externals.
-#
-# Input variables:
-#   SVN_FIND_REQUIRED - set this if configuration should fail without scp
-#
-# Output variables:
-#
-#   SVN_FOUND - set if svn was found
-#   SVN_EXECUTABLE - path to svn executable
-#   SVN_BATCH_FLAG - how to put svn into batch mode
-
-
-SET(SVN_EXECUTABLE)
-FIND_PROGRAM(SVN_EXECUTABLE NAMES svn svn.exe)
-
-IF (SVN_EXECUTABLE)
-  SET(SVN_FOUND ON)
-ELSE (SVN_EXECUTABLE)
-  SET(SVN_FOUND OFF)
-ENDIF (SVN_EXECUTABLE)
-
-IF (SVN_FOUND)
-  GET_FILENAME_COMPONENT(_svn_name ${SVN_EXECUTABLE} NAME_WE)
-  SET(SVN_BATCH_FLAG --non-interactive)
-ELSE (SVN_FOUND)
-  IF (SVN_FIND_REQUIRED)
-    MESSAGE(FATAL_ERROR "Could not find svn executable")
-  ENDIF (SVN_FIND_REQUIRED)
-ENDIF (SVN_FOUND)
-
-MARK_AS_ADVANCED(SVN_EXECUTABLE SVN_FOUND SVN_BATCH_FLAG)
-
diff --git a/indra/cmake/GLEXT.cmake b/indra/cmake/GLEXT.cmake
new file mode 100644
index 00000000000..0a3dd976b43
--- /dev/null
+++ b/indra/cmake/GLEXT.cmake
@@ -0,0 +1,8 @@
+# -*- cmake -*-
+include(Prebuilt)
+
+if (NOT STANDALONE)
+  use_prebuilt_binary(glext)
+  use_prebuilt_binary(glh_linear)
+  set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
+endif (NOT STANDALONE)
diff --git a/indra/cmake/LLDatabase.cmake b/indra/cmake/LLDatabase.cmake
deleted file mode 100644
index 65261013861..00000000000
--- a/indra/cmake/LLDatabase.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- cmake -*-
-
-include(MySQL)
-
-set(LLDATABASE_INCLUDE_DIRS
-    ${LIBS_SERVER_DIR}/lldatabase
-    ${MYSQL_INCLUDE_DIR}
-    )
-
-set(LLDATABASE_LIBRARIES lldatabase)
diff --git a/indra/cmake/LLRender.cmake b/indra/cmake/LLRender.cmake
index 6695ed6bd91..c2f6fc67cdf 100644
--- a/indra/cmake/LLRender.cmake
+++ b/indra/cmake/LLRender.cmake
@@ -8,15 +8,15 @@ set(LLRENDER_INCLUDE_DIRS
     ${GLH_INCLUDE_DIR}
     )
 
-if ((SERVER OR BAKING) AND LINUX)
+if ((BAKING) AND LINUX)
   set(LLRENDER_LIBRARIES
       llrenderheadless
       )
-else ((SERVER OR BAKING) AND LINUX)
+else ((BAKING) AND LINUX)
 set(LLRENDER_LIBRARIES
     llrender
     )
-endif ((SERVER OR BAKING) AND LINUX)
+endif ((BAKING) AND LINUX)
 
 # mapserver requires certain files to be copied so LL_MESA_HEADLESS can be set
 # differently for different object files.
diff --git a/indra/cmake/LLScene.cmake b/indra/cmake/LLScene.cmake
deleted file mode 100644
index 96ad5085a24..00000000000
--- a/indra/cmake/LLScene.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- cmake -*-
-
-set(LLSCENE_INCLUDE_DIRS
-    ${LIBS_SERVER_DIR}/llscene
-    )
-
-set(LLSCENE_LIBRARIES llscene)
diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake
index 1ee4ca0aaca..81e58b2bea5 100644
--- a/indra/cmake/LLWindow.cmake
+++ b/indra/cmake/LLWindow.cmake
@@ -1,6 +1,6 @@
 # -*- cmake -*-
 
-include(OpenGL)
+include(GLEXT)
 include(Prebuilt)
 
 if (STANDALONE)
@@ -14,12 +14,12 @@ if (STANDALONE)
       )
 else (STANDALONE)
   use_prebuilt_binary(mesa)
-  if (LINUX AND VIEWER)
+  if (LINUX)
     use_prebuilt_binary(SDL)
     set (SDL_FOUND TRUE)
     set (SDL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/i686-linux)
     set (SDL_LIBRARY SDL directfb fusion direct)
-  endif (LINUX AND VIEWER)
+  endif (LINUX)
 endif (STANDALONE)
 
 if (SDL_FOUND AND NOT BAKING)
@@ -37,13 +37,13 @@ set(LLWINDOW_INCLUDE_DIRS
     ${LIBS_OPEN_DIR}/llwindow
     )
 
-if ((SERVER AND LINUX) OR (BAKING AND LINUX))
+if (BAKING AND LINUX)
   set(LLWINDOW_LIBRARIES
       llwindowheadless
       )
   MESSAGE( STATUS "using headless libraries")
-else (SERVER AND LINUX)
+else (BAKING AND LINUX)
   set(LLWINDOW_LIBRARIES
       llwindow
       )
-endif ((SERVER AND LINUX) OR (BAKING AND LINUX))
+endif (BAKING AND LINUX)
diff --git a/indra/cmake/LLXUIXML.cmake b/indra/cmake/LLXUIXML.cmake
deleted file mode 100644
index b8bfe48c776..00000000000
--- a/indra/cmake/LLXUIXML.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- cmake -*-
-
-set(LLXUIXML_INCLUDE_DIRS
-    ${LIBS_OPEN_DIR}/llxuixml
-    )
-
-set(LLXUIXML_LIBRARIES llxuixml)
diff --git a/indra/cmake/MonoDeps.cmake b/indra/cmake/MonoDeps.cmake
deleted file mode 100644
index 52d54915636..00000000000
--- a/indra/cmake/MonoDeps.cmake
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- cmake -*-
-
-set(MONO_PREBUILT_LIBRARIES_DIR ${LIBS_PREBUILT_DIR}/mono/1.0)
-
-set(MONO_PREBUILT_LIBRARIES
-     Iesi.Collections.dll
-     Iesi.Collections.pdb
-     Mono.CompilerServices.SymbolWriter.dll
-     Mono.PEToolkit.dll
-     Mono.PEToolkit.pdb
-     Mono.Security.dll
-     PEAPI.dll
-     RAIL.dll
-     RAIL.pdb
-  )
-  
-  set(MONO_CORE_LIBRARIES
-    System.dll
-    System.Xml.dll
-    mscorlib.dll)
-    
-if(WINDOWS)
-    set(MONO_DEPENDENCIES
-        DomainCreator
-        DomainRegister
-        LslLibrary
-        LslUserScript
-        Script
-        ScriptTypes
-        TestFormat
-        UserScript
-        UThread
-        UThreadInjector
-        )
-else(WINDOWS)
-    set(MONO_DEPENDENCIES
-        DomainCreator_POST_BUILD
-        DomainRegister_POST_BUILD
-        LslLibrary_POST_BUILD
-        LslUserScript_POST_BUILD
-        Script_POST_BUILD
-        ScriptTypes_POST_BUILD
-        TestFormat_POST_BUILD
-        UserScript_POST_BUILD
-        UThread_POST_BUILD
-        UThreadInjector_POST_BUILD
-        )
-endif(WINDOWS)
diff --git a/indra/cmake/MonoEmbed.cmake b/indra/cmake/MonoEmbed.cmake
deleted file mode 100644
index 30890aed217..00000000000
--- a/indra/cmake/MonoEmbed.cmake
+++ /dev/null
@@ -1,57 +0,0 @@
-# -*- cmake -*-
-
-include(Prebuilt)
-use_prebuilt_binary(libmono)
-
-SET(GLIB_2_0 glib-2.0)
-
-if (WINDOWS)
-    SET(MONO_LIB mono) 
-else (WINDOWS)
-    SET(MONO_LIB mono)
-    SET(M_LIBRARIES m)
-    SET(GTHREAD_2_0 gthread-2.0)
-endif(WINDOWS)
-
-
-IF (DARWIN)
-
-  FIND_LIBRARY(MONO_LIBRARY NAMES Mono)
-  # Find_file doesnt work as expected. Hardcode relative to Mono.framework. 
-  #FIND_FILE(GLIB_CONFIG glibconfig.h ${MONO_LIBRARY})
-  #FIND_FILE(MONO_GLIB_LIBRARY glib.h ${MONO_LIBRARY})
-  SET(MONO_GLIB_LIBRARY ${MONO_LIBRARY}/Headers/glib-2.0/)
-  SET(GLIB_CONFIG ${MONO_LIBRARY}/Libraries/glib-2.0/include/)
-  SET(MONO_LIB_DIRECTORY ${MONO_LIBRARY}/Libraries)
-
-  IF (MONO_LIBRARY AND MONO_GLIB_LIBRARY AND GLIB_CONFIG)
-    MESSAGE(STATUS "Found Mono for embedding")
-    INCLUDE_DIRECTORIES(${MONO_GLIB_LIBRARY} ${GLIB_CONFIG})
-    LINK_DIRECTORIES(${MONO_LIB_DIRECTORY})
-  ELSE (MONO_LIBRARY AND MONO_GLIB_LIBRARY AND GLIB_CONFIG)
-    MESSAGE(FATAL_ERROR "Mono not found for embedding")   
-    MESSAGE(${MONO_LIBRARY})
-    MESSAGE(${MONO_GLIB_LIBRARY})
-    MESSAGE(${GLIB_CONFIG})
-  ENDIF (MONO_LIBRARY AND MONO_GLIB_LIBRARY AND GLIB_CONFIG)
-
-ELSE (DARWIN)
-
-  SET(MONO_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)  
-  SET(GLIB_2_0_PLATFORM_INCLUDE_DIR
-    ${LIBS_PREBUILT_DIR}/include/glib-2.0)
-  SET(GLIB_2_0_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/glib-2.0)
-
-  INCLUDE_DIRECTORIES(
-    ${MONO_INCLUDE_DIR} 
-    ${GLIB_2_0_PLATFORM_INCLUDE_DIR} 
-    ${GLIB_2_0_INCLUDE_DIR})
-    
-ENDIF (DARWIN) 
-
-SET(MONO_LIBRARIES 
-    ${MONO_LIB} 
-    ${M_LIBRARIES} 
-    ${GLIB_2_0}
-    ${GTHREAD_2_0} 
-)
diff --git a/indra/cmake/MySQL.cmake b/indra/cmake/MySQL.cmake
deleted file mode 100644
index 218482449dc..00000000000
--- a/indra/cmake/MySQL.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- cmake -*-
-include(Linking)
-include(Prebuilt)
-
-use_prebuilt_binary(mysql)
-
-if (LINUX)
-  if (WORD_SIZE EQUAL 32 OR DEBIAN_VERSION STREQUAL "3.1")
-    set(MYSQL_LIBRARIES mysqlclient)
-    set(MYSQL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
-  else (WORD_SIZE EQUAL 32 OR DEBIAN_VERSION STREQUAL "3.1")
-    # Use the native MySQL library on a 64-bit system.
-    set(MYSQL_FIND_QUIETLY ON)
-    set(MYSQL_FIND_REQUIRED ON)
-    include(FindMySQL)
-  endif (WORD_SIZE EQUAL 32 OR DEBIAN_VERSION STREQUAL "3.1")
-elseif (WINDOWS)
-  set(MYSQL_LIBRARIES mysqlclient)
-  set(MYSQL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
-elseif (DARWIN)
-  set(MYSQL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
-  set(MYSQL_LIBRARIES
-    optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libmysqlclient.a
-    debug ${ARCH_PREBUILT_DIRS_DEBUG}/libmysqlclient.a
-    )
-endif (LINUX)
diff --git a/indra/cmake/OpenGL.cmake b/indra/cmake/OpenGL.cmake
index 0a3dd976b43..bafb2a460f1 100644
--- a/indra/cmake/OpenGL.cmake
+++ b/indra/cmake/OpenGL.cmake
@@ -1,8 +1,15 @@
 # -*- cmake -*-
+
+#if (INSTALL_PROPRIETARY)
+#  set(HEADLESS ON CACHE BOOL "Use headless mesa library.")
+#endif (INSTALL_PROPRIETARY)
+
 include(Prebuilt)
 
-if (NOT STANDALONE)
-  use_prebuilt_binary(glext)
-  use_prebuilt_binary(glh_linear)
-  set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
-endif (NOT STANDALONE)
+if (LINUX AND NOT STANDALONE)
+  use_prebuilt_binary(mesa)
+  SET(OPENGL_glu_LIBRARY GLU)
+endif (LINUX AND NOT STANDALONE)
+
+include(FindOpenGL)
+
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index 4b459f1a486..d570a8cde4d 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -8,11 +8,6 @@
 #   DARWIN  - Mac OS X
 #   LINUX   - Linux
 #   WINDOWS - Windows
-#
-# What to build:
-#
-#   VIEWER - viewer and other viewer-side components
-#   SERVER - simulator and other server-side bits
 
 
 # Relative and absolute paths to subtrees.
@@ -23,9 +18,7 @@ endif(NOT DEFINED COMMON_CMAKE_DIR)
 
 set(LIBS_CLOSED_PREFIX)
 set(LIBS_OPEN_PREFIX)
-set(LIBS_SERVER_PREFIX)
 set(SCRIPTS_PREFIX ../scripts)
-set(SERVER_PREFIX)
 set(VIEWER_PREFIX)
 set(INTEGRATION_TESTS_PREFIX)
 set(LL_TESTS ON CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation")
@@ -43,9 +36,7 @@ else(LIBS_COMMON_DIR)
 endif(LIBS_COMMON_DIR)
 set(LIBS_OPEN_DIR ${LIBS_COMMON_DIR})
 
-set(LIBS_SERVER_DIR ${CMAKE_SOURCE_DIR}/${LIBS_SERVER_PREFIX})
 set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/${SCRIPTS_PREFIX})
-set(SERVER_DIR ${CMAKE_SOURCE_DIR}/${SERVER_PREFIX})
 set(VIEWER_DIR ${CMAKE_SOURCE_DIR}/${VIEWER_PREFIX})
 
 set(AUTOBUILD_INSTALL_DIR ${CMAKE_BINARY_DIR}/packages)
@@ -140,7 +131,6 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
 # Default deploy grid
 set(GRID agni CACHE STRING "Target Grid")
 
-set(VIEWER ON CACHE BOOL "Build Second Life viewer.")
 set(VIEWER_CHANNEL "LindenDeveloper" CACHE STRING "Viewer Channel Name")
 set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for A/B Testing")
 
@@ -153,20 +143,6 @@ set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside")
 set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.")
 set(UNATTENDED OFF CACHE BOOL "Should be set to ON for building with VC Express editions.")
 
-if (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics)
-    set(SERVER ON CACHE BOOL "Build Second Life server software.")
-endif (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics)
-
-if (LINUX AND SERVER AND VIEWER)
-  MESSAGE(FATAL_ERROR "
-The indra source does not currently support building SERVER and VIEWER at the same time.
-Please set one of these values to OFF in your CMake cache file.
-(either by running ccmake or by editing CMakeCache.txt by hand)
-For more information, please see JIRA DEV-14943 - Cmake Linux cannot build both VIEWER and SERVER in one build environment
-  ")
-endif (LINUX AND SERVER AND VIEWER)
-
-
 set(USE_PRECOMPILED_HEADERS ON CACHE BOOL "Enable use of precompiled header directives where supported.")
 
 source_group("CMake Rules" FILES CMakeLists.txt)
diff --git a/indra/cmake/VisualLeakDetector.cmake b/indra/cmake/VisualLeakDetector.cmake
index d3ba554e462..27e93e28bb4 100644
--- a/indra/cmake/VisualLeakDetector.cmake
+++ b/indra/cmake/VisualLeakDetector.cmake
@@ -1,15 +1,12 @@
 # -*- cmake -*-
 
-if (VIEWER)
+set(INCLUDE_VLD_CMAKE OFF CACHE BOOL "Build the Windows viewer with Visual Leak Detector turned on or off")
 
-  set(INCLUDE_VLD_CMAKE OFF CACHE BOOL "Build the Windows viewer with Visual Leak Detector turned on or off")
+if (INCLUDE_VLD_CMAKE)
 
-  if (INCLUDE_VLD_CMAKE)
+  if (WINDOWS)
+    add_definitions(-DINCLUDE_VLD=1)
+  endif (WINDOWS)
 
-    if (WINDOWS)
-      add_definitions(-DINCLUDE_VLD=1)
-    endif (WINDOWS)
+endif (INCLUDE_VLD_CMAKE)
 
-  endif (INCLUDE_VLD_CMAKE)
-
-endif (VIEWER)
diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt
index f31446924fe..3ba27222012 100644
--- a/indra/llrender/CMakeLists.txt
+++ b/indra/llrender/CMakeLists.txt
@@ -3,7 +3,7 @@
 project(llrender)
 
 include(00-Common)
-include(FindOpenGL)
+include(OpenGL)
 include(FreeType)
 include(LLCommon)
 include(LLImage)
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index e28e3157d20..c65d68e64ed 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -389,7 +389,7 @@ PFNGLACTIVETEXTUREARBPROC glActiveTextureARB = NULL;
 PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTextureARB = NULL;
 PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements = NULL;
 #endif // LL_LINUX_NV_GL_HEADERS
-#endif
+#endif // (LL_WINDOWS || LL_LINUX || LL_SOLARIS)  && !LL_MESA_HEADLESS
 
 LLGLManager gGLManager;
 
diff --git a/indra/llvfs/CMakeLists.txt b/indra/llvfs/CMakeLists.txt
index 80d5dd96e63..73d531cfd3c 100644
--- a/indra/llvfs/CMakeLists.txt
+++ b/indra/llvfs/CMakeLists.txt
@@ -42,12 +42,12 @@ if (LINUX)
   LIST(APPEND llvfs_SOURCE_FILES lldir_linux.cpp)
   LIST(APPEND llvfs_HEADER_FILES lldir_linux.h)
 
-  if (VIEWER AND INSTALL)
+  if (INSTALL)
     set_source_files_properties(lldir_linux.cpp
                                 PROPERTIES COMPILE_FLAGS
                                 "-DAPP_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\""
                                 )
-  endif (VIEWER AND INSTALL)
+  endif (INSTALL)
 endif (LINUX)
 
 if (WINDOWS)
diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt
index 4db58be7763..5fef44f9cbe 100644
--- a/indra/llwindow/CMakeLists.txt
+++ b/indra/llwindow/CMakeLists.txt
@@ -62,7 +62,7 @@ set(viewer_HEADER_FILES
 
 # Libraries on which this library depends, needed for Linux builds
 # Sort by high-level to low-level
-if (LINUX AND VIEWER)
+if (LINUX)
   set(llwindow_LINK_LIBRARIES
       ${LLCOMMON_LIBRARIES}
       ${LLIMAGE_LIBRARIES}
@@ -75,7 +75,7 @@ if (LINUX AND VIEWER)
       ${SDL_LIBRARY}
       fontconfig          # For FCInit and other FC* functions.
       )
-endif (LINUX AND VIEWER)
+endif (LINUX)
 
 if (DARWIN)
   list(APPEND llwindow_SOURCE_FILES
@@ -98,7 +98,7 @@ if (DARWIN)
       )
 endif (DARWIN)
 
-if (LINUX AND VIEWER)
+if (LINUX)
   list(APPEND viewer_SOURCE_FILES 
        llkeyboardsdl.cpp 
        llwindowsdl.cpp
@@ -107,7 +107,7 @@ if (LINUX AND VIEWER)
        llkeyboardsdl.h
        llwindowsdl.h
        )
-endif (LINUX AND VIEWER)
+endif (LINUX)
 
 if (WINDOWS)
   list(APPEND llwindow_SOURCE_FILES
@@ -171,11 +171,9 @@ endif (llwindow_HEADER_FILES)
 
 list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES})
 
-if (VIEWER)
-  add_library (llwindow
-    ${llwindow_SOURCE_FILES}
-    ${viewer_SOURCE_FILES}
-    )
-  target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES})
-endif (VIEWER)
+add_library (llwindow
+  ${llwindow_SOURCE_FILES}
+  ${viewer_SOURCE_FILES}
+  )
+target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES})
 
diff --git a/indra/media_plugins/base/CMakeLists.txt b/indra/media_plugins/base/CMakeLists.txt
index 3ad94b0c647..cd3718c5f39 100644
--- a/indra/media_plugins/base/CMakeLists.txt
+++ b/indra/media_plugins/base/CMakeLists.txt
@@ -11,7 +11,7 @@ include(LLRender)
 include(LLWindow)
 include(Linking)
 include(PluginAPI)
-include(FindOpenGL)
+include(OpenGL)
 
 include_directories(
     ${LLPLUGIN_INCLUDE_DIRS}
diff --git a/indra/media_plugins/example/CMakeLists.txt b/indra/media_plugins/example/CMakeLists.txt
index 54dc5de1ea4..38b712bfd7c 100644
--- a/indra/media_plugins/example/CMakeLists.txt
+++ b/indra/media_plugins/example/CMakeLists.txt
@@ -12,7 +12,7 @@ include(LLWindow)
 include(Linking)
 include(PluginAPI)
 include(MediaPluginBase)
-include(FindOpenGL)
+include(OpenGL)
 
 include(ExamplePlugin)
 
diff --git a/indra/media_plugins/gstreamer010/CMakeLists.txt b/indra/media_plugins/gstreamer010/CMakeLists.txt
index 5786bd1e25f..519a74aabf0 100644
--- a/indra/media_plugins/gstreamer010/CMakeLists.txt
+++ b/indra/media_plugins/gstreamer010/CMakeLists.txt
@@ -12,7 +12,7 @@ include(LLWindow)
 include(Linking)
 include(PluginAPI)
 include(MediaPluginBase)
-include(FindOpenGL)
+include(OpenGL)
 
 include(GStreamer010Plugin)
 
diff --git a/indra/media_plugins/quicktime/CMakeLists.txt b/indra/media_plugins/quicktime/CMakeLists.txt
index f0b8f0d1670..88e870b5566 100644
--- a/indra/media_plugins/quicktime/CMakeLists.txt
+++ b/indra/media_plugins/quicktime/CMakeLists.txt
@@ -12,7 +12,7 @@ include(LLWindow)
 include(Linking)
 include(PluginAPI)
 include(MediaPluginBase)
-include(FindOpenGL)
+include(OpenGL)
 include(QuickTimePlugin)
 
 include_directories(
diff --git a/indra/media_plugins/webkit/CMakeLists.txt b/indra/media_plugins/webkit/CMakeLists.txt
index b36291f0e86..452202acd28 100644
--- a/indra/media_plugins/webkit/CMakeLists.txt
+++ b/indra/media_plugins/webkit/CMakeLists.txt
@@ -13,7 +13,7 @@ include(UI)
 include(Linking)
 include(PluginAPI)
 include(MediaPluginBase)
-include(FindOpenGL)
+include(OpenGL)
 include(PulseAudio)
 
 include(WebKitLibPlugin)
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index b12853b014c..83b38e89f9e 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -12,7 +12,7 @@ include(DragDrop)
 include(EXPAT)
 include(FMOD)
 include(OPENAL)
-include(FindOpenGL)
+include(OpenGL)
 include(Hunspell)
 include(JsonCpp)
 include(LLAudio)
diff --git a/indra/test_apps/llplugintest/CMakeLists.txt b/indra/test_apps/llplugintest/CMakeLists.txt
index 1211bb7e5a3..08f5a8a888e 100644
--- a/indra/test_apps/llplugintest/CMakeLists.txt
+++ b/indra/test_apps/llplugintest/CMakeLists.txt
@@ -2,7 +2,7 @@
 project(llplugintest)
 
 include(00-Common)
-include(FindOpenGL)
+include(OpenGL)
 include(LLCommon)
 include(LLPlugin)
 include(Linking)
-- 
GitLab