summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-10-11 09:31:09 -0400
committerOz Linden <oz@lindenlab.com>2011-10-11 09:31:09 -0400
commitbe251b06eb785a2d301115f9c231eb5f3c906224 (patch)
treec6b7685ed8d746ed3fb0466e43349d688e075d76 /indra/cmake
parenta15701de33007f60994181d8e7300d1e624de373 (diff)
parent61c3b55bd065f28f96a5a170b830874c8c8fa517 (diff)
merge changes for open-38
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/FindGLH.cmake30
-rw-r--r--indra/cmake/GLH.cmake11
-rw-r--r--indra/cmake/LLRender.cmake2
-rw-r--r--indra/cmake/LLSharedLibs.cmake24
-rw-r--r--indra/cmake/Linking.cmake29
5 files changed, 67 insertions, 29 deletions
diff --git a/indra/cmake/FindGLH.cmake b/indra/cmake/FindGLH.cmake
new file mode 100644
index 0000000000..3d16adaf03
--- /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 0000000000..911dbe4017
--- /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 c47e8878e9..8427928151 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 e29076c738..14dd67f32f 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 07db6ab257..c5f9e2c579 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