summaryrefslogtreecommitdiff
path: root/indra/cmake/LLPhysicsExtensions.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake/LLPhysicsExtensions.cmake')
-rw-r--r--indra/cmake/LLPhysicsExtensions.cmake35
1 files changed, 35 insertions, 0 deletions
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)