summaryrefslogtreecommitdiff
path: root/indra/cmake/FMODEX.cmake
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-04-18 14:55:28 -0400
committerOz Linden <oz@lindenlab.com>2013-04-18 14:55:28 -0400
commited2b5da8f1eb51e747f6d9f5a4fc535cbf7e69d9 (patch)
tree1971a71e793087d45501a4f291931725bb4e1753 /indra/cmake/FMODEX.cmake
parentf16472976ec4fe0908753e2708df26f8d7a92348 (diff)
parentadfa7d49de6d58671bc7121483e306a9f6d705ed (diff)
merge changes for DRTVWR-298
Diffstat (limited to 'indra/cmake/FMODEX.cmake')
-rw-r--r--indra/cmake/FMODEX.cmake46
1 files changed, 46 insertions, 0 deletions
diff --git a/indra/cmake/FMODEX.cmake b/indra/cmake/FMODEX.cmake
new file mode 100644
index 0000000000..65bc1cabeb
--- /dev/null
+++ b/indra/cmake/FMODEX.cmake
@@ -0,0 +1,46 @@
+# -*- cmake -*-
+
+# FMOD can be set when launching the make using the argument -DFMOD:BOOL=ON
+# When building using proprietary binaries though (i.e. having access to LL private servers),
+# we always build with FMODEX.
+# Open source devs should use the -DFMODEX:BOOL=ON then if they want to build with FMOD, whether
+# they are using STANDALONE or not.
+if (INSTALL_PROPRIETARY)
+ set(FMODEX ON CACHE BOOL "Using FMOD Ex sound library.")
+endif (INSTALL_PROPRIETARY)
+
+if (FMODEX)
+ if (STANDALONE)
+ # In that case, we use the version of the library installed on the system
+ set(FMODEX_FIND_REQUIRED ON)
+ include(FindFMODEX)
+ else (STANDALONE)
+ if (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR)
+ # If the path have been specified in the arguments, use that
+ set(FMODEX_LIBRARIES ${FMODEX_LIBRARY})
+ MESSAGE(STATUS "Using FMODEX path: ${FMODEX_LIBRARIES}, ${FMODEX_INCLUDE_DIR}")
+ else (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR)
+ # If not, we're going to try to get the package listed in autobuild.xml
+ # Note: if you're not using INSTALL_PROPRIETARY, the package URL should be local (file:/// URL)
+ # as accessing the private LL location will fail if you don't have the credential
+ include(Prebuilt)
+ use_prebuilt_binary(fmodex)
+ if (WINDOWS)
+ set(FMODEX_LIBRARY
+ debug fmodexL_vc
+ optimized fmodex_vc)
+ elseif (DARWIN)
+ set(FMODEX_LIBRARY
+ debug fmodexL
+ optimized fmodex)
+ elseif (LINUX)
+ set(FMODEX_LIBRARY
+ debug fmodexL
+ optimized fmodex)
+ endif (WINDOWS)
+ set(FMODEX_LIBRARIES ${FMODEX_LIBRARY})
+ set(FMODEX_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodex)
+ endif (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR)
+ endif (STANDALONE)
+endif (FMODEX)
+