summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/CMakeLists.txt1
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake16
-rw-r--r--indra/cmake/FMODEX.cmake10
-rw-r--r--indra/cmake/FMODSTUDIO.cmake38
4 files changed, 57 insertions, 8 deletions
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index 84e1c5d6fd..6dbf26c4a9 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -40,6 +40,7 @@ set(cmake_SOURCE_FILES
FindXmlRpcEpi.cmake
FindZLIB.cmake
FMODEX.cmake
+ FMODSTUDIO.cmake
FreeType.cmake
GLEXT.cmake
GLH.cmake
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index c73a1fdb47..f7904cc5d7 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -63,7 +63,6 @@ if(WINDOWS)
endif (BUGSPLAT_DB)
if (FMODEX)
-
if(ADDRESS_SIZE EQUAL 32)
set(release_files ${release_files} fmodex.dll)
else(ADDRESS_SIZE EQUAL 32)
@@ -71,6 +70,11 @@ if(WINDOWS)
endif(ADDRESS_SIZE EQUAL 32)
endif (FMODEX)
+ if (FMODSTUDIO)
+ set(debug_files ${debug_files} fmodL.dll)
+ set(release_files ${release_files} fmod.dll)
+ endif (FMODSTUDIO)
+
#*******************************
# Copy MS C runtime dlls, required for packaging.
# *TODO - Adapt this to support VC9
@@ -197,6 +201,11 @@ elseif(DARWIN)
set(release_files ${release_files} libfmodex.dylib)
endif (FMODEX)
+ if (FMODSTUDIO)
+ set(debug_files ${debug_files} libfmodL.dylib)
+ set(release_files ${release_files} libfmod.dylib)
+ endif (FMODSTUDIO)
+
elseif(LINUX)
# linux is weird, multiple side by side configurations aren't supported
# and we don't seem to have any debug shared libs built yet anyways...
@@ -247,6 +256,11 @@ elseif(LINUX)
set(release_files ${release_files} "libfmodex.so")
endif (FMODEX)
+ if (FMODSTUDIO)
+ set(debug_files ${debug_files} "libfmodL.so")
+ set(release_files ${release_files} "libfmod.so")
+ endif (FMODSTUDIO)
+
else(WINDOWS)
message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...")
set(vivox_lib_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux")
diff --git a/indra/cmake/FMODEX.cmake b/indra/cmake/FMODEX.cmake
index 720933d1b7..25add0c8f2 100644
--- a/indra/cmake/FMODEX.cmake
+++ b/indra/cmake/FMODEX.cmake
@@ -1,13 +1,9 @@
# -*- 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
+# FMODEX can be set when launching the make using the argument -DFMOD:BOOL=ON
+# No longer used by default, see FMODSTRUDIO.
+# Open source devs should use the -DFMODEX:BOOL=ON then if they want to build with FMODEX, whether
# they are using USESYSTEMLIBS or not.
-if (INSTALL_PROPRIETARY)
- set(FMODEX ON CACHE BOOL "Using FMOD Ex sound library.")
-endif (INSTALL_PROPRIETARY)
if (FMODEX)
if (USESYSTEMLIBS)
diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake
new file mode 100644
index 0000000000..1539270d6c
--- /dev/null
+++ b/indra/cmake/FMODSTUDIO.cmake
@@ -0,0 +1,38 @@
+# -*- cmake -*-
+
+# FMODSTUDIO can be set when launching the make using the argument -DFMODSTUDIO:BOOL=ON
+# When building using proprietary binaries though (i.e. having access to LL private servers),
+# we always build with FMODSTUDIO.
+if (INSTALL_PROPRIETARY)
+ set(FMODSTUDIO ON CACHE BOOL "Using FMODSTUDIO sound library.")
+endif (INSTALL_PROPRIETARY)
+
+if (FMODSTUDIO)
+ if (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
+ # If the path have been specified in the arguments, use that
+ set(FMODSTUDIO_LIBRARIES ${FMODSTUDIO_LIBRARY})
+ else (FMODSTUDIO_LIBRARY AND FMODSTUDIO_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(fmodstudio)
+ if (WINDOWS)
+ set(FMODSTUDIO_LIBRARY
+ debug fmodL_vc
+ optimized fmod_vc)
+ elseif (DARWIN)
+ #despite files being called libfmod.dylib, we are searching for fmod
+ set(FMODSTUDIO_LIBRARY
+ debug fmodL
+ optimized fmod)
+ elseif (LINUX)
+ set(FMODEX_LIBRARY
+ debug fmodL
+ optimized fmod)
+ endif (WINDOWS)
+ set(FMODSTUDIO_LIBRARIES ${FMODSTUDIO_LIBRARY})
+ set(FMODSTUDIO_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodstudio)
+ endif (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
+endif (FMODSTUDIO)
+