summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2012-07-26 22:59:30 +0000
committerDon Kjer <don@lindenlab.com>2012-07-26 22:59:30 +0000
commitbd1b664d45a75e57209e06b288849c0536d00151 (patch)
tree863ba132ec822f7f2a3feaf5a934f298374179cd /indra/cmake
parentcff3469d46d297fbec34bc0d648588e900cd255c (diff)
parent124f45d20ecf45c43a9f277be89de2e1fec40b8b (diff)
Merge viewer-development -> viewer-horde-fixes
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/CMakeLists.txt2
-rw-r--r--indra/cmake/Havok.cmake83
-rw-r--r--indra/cmake/LLConvexDecomposition.cmake12
-rw-r--r--indra/cmake/LLPhysicsExtensions.cmake35
-rw-r--r--indra/cmake/Linking.cmake3
-rw-r--r--indra/cmake/Variables.cmake4
-rw-r--r--indra/cmake/ViewerMiscLibs.cmake7
7 files changed, 122 insertions, 24 deletions
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index 9b836aac5f..569034a6fb 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -43,7 +43,6 @@ set(cmake_SOURCE_FILES
LLAudio.cmake
LLCharacter.cmake
LLCommon.cmake
- LLConvexDecomposition.cmake
LLCrashLogger.cmake
LLDatabase.cmake
LLImage.cmake
@@ -54,6 +53,7 @@ set(cmake_SOURCE_FILES
LLMessage.cmake
LLPlugin.cmake
LLPrimitive.cmake
+ LLPhysicsExtensions.cmake
LLRender.cmake
LLScene.cmake
LLTestCommand.cmake
diff --git a/indra/cmake/Havok.cmake b/indra/cmake/Havok.cmake
new file mode 100644
index 0000000000..5c0768abfa
--- /dev/null
+++ b/indra/cmake/Havok.cmake
@@ -0,0 +1,83 @@
+# -*- cmake -*-
+
+use_prebuilt_binary(havok-source)
+set(Havok_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/havok/Source)
+list(APPEND Havok_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/havok/Demo)
+
+set(HAVOK_DEBUG_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-fulldebug)
+set(HAVOK_RELEASE_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/release/havok)
+
+if (LL_DEBUG_HAVOK)
+ if (WIN32)
+ # Always link relwithdebinfo to havok-hybrid on windows.
+ set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-hybrid)
+ else (WIN32)
+ set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-fulldebug)
+ endif (WIN32)
+else (LL_DEBUG_HAVOK)
+ set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/release/havok)
+endif (LL_DEBUG_HAVOK)
+
+set(HAVOK_LIBS
+ hkBase
+ hkCompat
+ hkGeometryUtilities
+ hkInternal
+ hkSerialize
+ hkSceneData
+ hkpCollide
+ hkpUtilities
+ hkpConstraintSolver
+ hkpDynamics
+ hkpInternal
+ hkaiInternal
+ hkaiPathfinding
+ hkaiAiPhysicsBridge
+ hkcdInternal
+ hkcdCollide
+ hkpVehicle
+ hkVisualize
+ hkaiVisualize
+ hkgpConvexDecomposition
+)
+
+unset(HK_DEBUG_LIBRARIES)
+unset(HK_RELEASE_LIBRARIES)
+unset(HK_RELWITHDEBINFO_LIBRARIES)
+
+foreach(HAVOK_LIB ${HAVOK_LIBS})
+ find_library(HAVOK_DEBUG_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_DEBUG_LIBRARY_PATH})
+ find_library(HAVOK_RELEASE_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_RELEASE_LIBRARY_PATH})
+ find_library(HAVOK_RELWITHDEBINFO_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_RELWITHDEBINFO_LIBRARY_PATH})
+
+ if(LINUX)
+ set(cmd "mkdir")
+ set(debug_dir "${HAVOK_DEBUG_LIBRARY_PATH}/${HAVOK_LIB}")
+ set(release_dir "${HAVOK_RELEASE_LIBRARY_PATH}/${HAVOK_LIB}")
+ set(relwithdebinfo_dir "${HAVOK_RELWITHDEBINFO_LIBRARY_PATH}/${HAVOK_LIB}")
+
+ exec_program( ${cmd} ${HAVOK_DEBUG_LIBRARY_PATH} ARGS ${debug_dir} OUTPUT_VARIABLE rv)
+ exec_program( ${cmd} ${HAVOK_RELEASE_LIBRARY_PATH} ARGS ${release_dir} OUTPUT_VARIABLE rv)
+ exec_program( ${cmd} ${HAVOK_RELWITHDEBINFO_LIBRARY_PATH} ARGS ${relwithdebinfo_dir} OUTPUT_VARIABLE rv)
+
+ set(cmd "ar")
+ set(arg " -xv")
+ set(arg "${arg} ../lib${HAVOK_LIB}.a")
+ exec_program( ${cmd} ${debug_dir} ARGS ${arg} OUTPUT_VARIABLE rv)
+ exec_program( ${cmd} ${release_dir} ARGS ${arg} OUTPUT_VARIABLE rv)
+ exec_program( ${cmd} ${relwithdebinfo_dir} ARGS ${arg} OUTPUT_VARIABLE rv)
+
+ file(GLOB extracted_debug "${debug_dir}/*.o")
+ file(GLOB extracted_release "${release_dir}/*.o")
+ file(GLOB extracted_relwithdebinfo "${relwithdebinfo_dir}/*.o")
+ list(APPEND HK_DEBUG_LIBRARIES ${extracted_debug})
+ list(APPEND HK_RELEASE_LIBRARIES ${extracted_release})
+ list(APPEND HK_RELWITHDEBINFO_LIBRARIES ${extracted_relwithdebinfo})
+ else(LINUX)
+ # Win32
+ list(APPEND HK_DEBUG_LIBRARIES ${HAVOK_DEBUG_LIB_${HAVOK_LIB}})
+ list(APPEND HK_RELEASE_LIBRARIES ${HAVOK_RELEASE_LIB_${HAVOK_LIB}})
+ list(APPEND HK_RELWITHDEBINFO_LIBRARIES ${HAVOK_RELWITHDEBINFO_LIB_${HAVOK_LIB}})
+ endif (LINUX)
+endforeach(HAVOK_LIB)
+
diff --git a/indra/cmake/LLConvexDecomposition.cmake b/indra/cmake/LLConvexDecomposition.cmake
deleted file mode 100644
index 8e44504782..0000000000
--- a/indra/cmake/LLConvexDecomposition.cmake
+++ /dev/null
@@ -1,12 +0,0 @@
-# -*- cmake -*-
-include(Prebuilt)
-
-set(LLCONVEXDECOMP_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
-
-if (INSTALL_PROPRIETARY AND NOT STANDALONE)
- use_prebuilt_binary(llconvexdecomposition)
- set(LLCONVEXDECOMP_LIBRARY llconvexdecomposition)
-else (INSTALL_PROPRIETARY AND NOT STANDALONE)
- use_prebuilt_binary(llconvexdecompositionstub)
- set(LLCONVEXDECOMP_LIBRARY llconvexdecompositionstub)
-endif (INSTALL_PROPRIETARY AND NOT STANDALONE)
diff --git a/indra/cmake/LLPhysicsExtensions.cmake b/indra/cmake/LLPhysicsExtensions.cmake
new file mode 100644
index 0000000000..e6afee762e
--- /dev/null
+++ b/indra/cmake/LLPhysicsExtensions.cmake
@@ -0,0 +1,35 @@
+# -*- cmake -*-
+include(Prebuilt)
+
+# There are three possible solutions to provide the llphysicsextensions:
+# - The full source package, selected by -DHAVOK:BOOL=ON
+# - The stub source package, selected by -DHAVOK:BOOL=OFF
+# - The prebuilt package available to those with sublicenses, selected by -DHAVOK_TPV:BOOL=ON
+
+if (INSTALL_PROPRIETARY)
+ set(HAVOK ON CACHE BOOL "Use Havok physics library")
+endif (INSTALL_PROPRIETARY)
+
+
+# Note that the use_prebuilt_binary macros below do not in fact include binaries;
+# the llphysicsextensions_* packages are source only and are built here.
+# The source package and the stub package both build libraries of the same name.
+
+if (HAVOK)
+ include(Havok)
+ use_prebuilt_binary(llphysicsextensions_source)
+ set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/src)
+ set(LLPHYSICSEXTENSIONS_LIBRARIES llphysicsextensions)
+
+elseif (HAVOK_TPV)
+ use_prebuilt_binary(llphysicsextensions_tpv)
+ set(LLPHYSICSEXTENSIONS_LIBRARIES llphysicsextensions_tpv)
+
+else (HAVOK)
+ use_prebuilt_binary(llphysicsextensions_stub)
+ set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/stub)
+ set(LLPHYSICSEXTENSIONS_LIBRARIES llphysicsextensionsstub)
+
+endif (HAVOK)
+
+set(LLPHYSICSEXTENSIONS_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/llphysicsextensions)
diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake
index 47f944f9a5..c3e3a80fd0 100644
--- a/indra/cmake/Linking.cmake
+++ b/indra/cmake/Linking.cmake
@@ -38,9 +38,8 @@ if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
# packages/lib/release directory to deal with autobuild packages that don't
# provide (e.g.) lib/debug libraries.
list(APPEND AUTOBUILD_LIBS_INSTALL_DIRS ${ARCH_PREBUILT_DIRS_RELEASE})
- message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}, extending AUTOBUILD_LIBS_INSTALL_DIRS")
endif (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
-message(STATUS "For ${CMAKE_BUILD_TYPE}, AUTOBUILD_LIBS_INSTALL_DIRS: ${AUTOBUILD_LIBS_INSTALL_DIRS}")
+
link_directories(${AUTOBUILD_LIBS_INSTALL_DIRS})
if (LINUX)
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index 4cbf7aa043..56ced20abf 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -101,8 +101,8 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# To support a different SDK update these Xcode settings:
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
- set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
- set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "4.0")
+ set(CMAKE_OSX_SYSROOT macosx10.6)
+ set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)
# NOTE: To attempt an i386/PPC Universal build, add this on the configure line:
diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake
index f907181929..5b00c989a4 100644
--- a/indra/cmake/ViewerMiscLibs.cmake
+++ b/indra/cmake/ViewerMiscLibs.cmake
@@ -8,10 +8,3 @@ if (NOT STANDALONE)
use_prebuilt_binary(fontconfig)
endif(NOT STANDALONE)
-if(VIEWER AND NOT STANDALONE)
- if(EXISTS ${CMAKE_SOURCE_DIR}/newview/res/have_artwork_bundle.marker)
- message(STATUS "We seem to have an artwork bundle in the tree - brilliant.")
- else(EXISTS ${CMAKE_SOURCE_DIR}/newview/res/have_artwork_bundle.marker)
- message(FATAL_ERROR "Didn't find an artwork bundle - this needs to be downloaded separately and unpacked into this tree. You can probably get it from the same place you got your viewer source. Thanks!")
- endif(EXISTS ${CMAKE_SOURCE_DIR}/newview/res/have_artwork_bundle.marker)
-endif(VIEWER AND NOT STANDALONE)