summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorBoroondas Gupte (patch by Aleric Inglewood) <hg@boroon.dasgupta.ch>2011-04-03 14:34:44 +0200
committerBoroondas Gupte (patch by Aleric Inglewood) <hg@boroon.dasgupta.ch>2011-04-03 14:34:44 +0200
commit942823db091c0b10a80cbfc5994008624f18d318 (patch)
tree8eb0b5576d2e39f3dec254b1dfb0d161ac5c9c83 /indra/cmake
parent216c3b47716f6eb5ebf1713c77fc6a6bb6f43abe (diff)
OPEN-38: Fixes for viewer-autobuild for standalone
Reviewed at https://codereview.secondlife.com/r/167/ (The patch to create this commit was taken from there, too. That patch was made relative to 5f0ab9443ece. Applied cleanly to the (earlier) 43b4b7927c00.) Also fixes OPEN-36
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..cafaf1ca3f 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