summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake18
-rw-r--r--indra/cmake/FMODSTUDIO.cmake16
-rw-r--r--indra/cmake/OPENAL.cmake17
-rw-r--r--indra/llaudio/CMakeLists.txt8
-rw-r--r--indra/newview/CMakeLists.txt40
5 files changed, 51 insertions, 48 deletions
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 79b8c5775a..e16e1e5572 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -6,6 +6,8 @@
include(CMakeCopyIfDifferent)
include(Linking)
+include(OpenAL)
+include(FMODSTUDIO)
# When we copy our dependent libraries, we almost always want to copy them to
# both the Release and the RelWithDebInfo staging directories. This has
@@ -91,14 +93,14 @@ if(WINDOWS)
endif(ADDRESS_SIZE EQUAL 32)
endif (USE_BUGSPLAT)
- if (FMODSTUDIO)
+ if (TARGET ll::fmodstudio)
set(debug_files ${debug_files} fmodL.dll)
set(release_files ${release_files} fmod.dll)
- endif (FMODSTUDIO)
+ endif ()
- if (OPENAL)
+ if (TARGET ll::openal)
list(APPEND release_files openal32.dll alut.dll)
- endif (OPENAL)
+ endif ()
#*******************************
# Copy MS C runtime dlls, required for packaging.
@@ -183,10 +185,10 @@ elseif(DARWIN)
liburiparser.1.0.27.dylib
)
- if (FMODSTUDIO)
+ if (TARGET ll::fmodstudio)
set(debug_files ${debug_files} libfmodL.dylib)
set(release_files ${release_files} libfmod.dylib)
- endif (FMODSTUDIO)
+ endif ()
elseif(LINUX)
# linux is weird, multiple side by side configurations aren't supported
@@ -233,10 +235,10 @@ elseif(LINUX)
libfontconfig.so.1
)
- if (FMODSTUDIO)
+ if (TARGET ll::fmodstudio)
set(debug_files ${debug_files} "libfmodL.so")
set(release_files ${release_files} "libfmod.so")
- endif (FMODSTUDIO)
+ endif ()
else(WINDOWS)
message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...")
diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake
index 334d46caf9..b84a177748 100644
--- a/indra/cmake/FMODSTUDIO.cmake
+++ b/indra/cmake/FMODSTUDIO.cmake
@@ -6,11 +6,19 @@ include_guard()
# 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.")
+ set(USE_FMODSTUDIO ON CACHE BOOL "Using FMODSTUDIO sound library.")
endif (INSTALL_PROPRIETARY)
-if (FMODSTUDIO)
+# ND: To streamline arguments passed, switch from FMODSTUDIO to USE_FMODSTUDIO
+# To not break all old build scripts convert old arguments but warn about it
+if(FMODSTUDIO)
+ message( WARNING "Use of the FMODSTUDIO argument is deprecated, please switch to USE_FMODSTUDIO")
+ set(USE_FMODSTUDIO ${FMODSTUDIO})
+endif()
+
+if (USE_FMODSTUDIO)
create_target( ll::fmodstudio )
+ target_compile_definitions( ll::fmodstudio INTERFACE LL_FMODSTUDIO=1)
if (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
# If the path have been specified in the arguments, use that
@@ -35,6 +43,6 @@ if (FMODSTUDIO)
set_target_include_dirs(ll::fmodstudio ${LIBS_PREBUILT_DIR}/include/fmodstudio)
endif (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
else()
- set( FMODSTUDIO "OFF")
-endif (FMODSTUDIO)
+ set( USE_FMODSTUDIO "OFF")
+endif ()
diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake
index 9904f6d1c0..b50610c554 100644
--- a/indra/cmake/OPENAL.cmake
+++ b/indra/cmake/OPENAL.cmake
@@ -4,16 +4,17 @@ include(Prebuilt)
include_guard()
-if (LINUX)
- set(OPENAL ON CACHE BOOL "Enable OpenAL")
-else (LINUX)
- set(OPENAL OFF CACHE BOOL "Enable OpenAL")
-endif (LINUX)
+# ND: To streamline arguments passed, switch from OPENAL to USE_OPENAL
+# To not break all old build scripts convert old arguments but warn about it
+if(OPENAL)
+ message( WARNING "Use of the OPENAL argument is deprecated, please switch to USE_OPENAL")
+ set(USE_OPENAL ${OPENAL})
+endif()
-if (OPENAL)
+if (USE_OPENAL)
create_target( ll::openal )
set_target_include_dirs( ll::openal "${LIBS_PREBUILT_DIR}/include/AL")
-
+ target_compile_definitions( ll::openal INTERFACE LL_OPENAL=1)
use_prebuilt_binary(openal)
if(WINDOWS)
@@ -29,4 +30,4 @@ if (OPENAL)
else()
message(FATAL_ERROR "OpenAL is not available for this platform")
endif()
-endif (OPENAL)
+endif ()
diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt
index 21e4723e7e..220b6d8cfb 100644
--- a/indra/llaudio/CMakeLists.txt
+++ b/indra/llaudio/CMakeLists.txt
@@ -25,7 +25,7 @@ set(llaudio_HEADER_FILES
llwindgen.h
)
-if (FMODSTUDIO)
+if (TARGET ll::fmodstudio)
list(APPEND llaudio_SOURCE_FILES
llaudioengine_fmodstudio.cpp
lllistener_fmodstudio.cpp
@@ -37,9 +37,9 @@ if (FMODSTUDIO)
lllistener_fmodstudio.h
llstreamingaudio_fmodstudio.h
)
-endif (FMODSTUDIO)
+endif ()
-if (OPENAL)
+if (TARGET ll::openal)
list(APPEND llaudio_SOURCE_FILES
llaudioengine_openal.cpp
lllistener_openal.cpp
@@ -49,7 +49,7 @@ if (OPENAL)
llaudioengine_openal.h
lllistener_openal.h
)
-endif (OPENAL)
+endif ()
set_source_files_properties(${llaudio_HEADER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index e2c9592f6b..50e7b53568 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1639,14 +1639,6 @@ if (WINDOWS)
list(APPEND viewer_SOURCE_FILES ${viewer_INSTALLER_FILES})
endif (WINDOWS)
-if (TARGET ll::openal )
- set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_OPENAL")
-endif ()
-
-if (TARGET ll::fmodstudio)
- set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMODSTUDIO")
-endif ()
-
if (HAVOK OR HAVOK_TPV)
set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_HAVOK")
endif (HAVOK OR HAVOK_TPV)
@@ -1749,20 +1741,20 @@ if (WINDOWS)
)
endif (ADDRESS_SIZE EQUAL 64)
- if (FMODSTUDIO)
+ if (TARGET ll::fmodstudio)
list(APPEND COPY_INPUT_DEPENDENCIES
${SHARED_LIB_STAGING_DIR}/Release/fmod.dll
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod.dll
${SHARED_LIB_STAGING_DIR}/Debug/fmodL.dll
)
- endif (FMODSTUDIO)
+ endif ()
- if (OPENAL)
+ if (TARGET ll::openal)
list(APPEND COPY_INPUT_DEPENDENCIES
${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/OpenAL32.dll
${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/alut.dll
)
- endif (OPENAL)
+ endif ()
add_custom_command(
OUTPUT ${CMAKE_CFG_INTDIR}/copy_touched.bat
@@ -1773,8 +1765,8 @@ if (WINDOWS)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
- "--fmodstudio=${FMODSTUDIO}"
- "--openal=${OPENAL}"
+ "--fmodstudio=${USE_FMODSTUDIO}"
+ "--openal=${USE_OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
"--channel=${VIEWER_CHANNEL}"
@@ -1835,8 +1827,8 @@ if (WINDOWS)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
- "--fmodstudio=${FMODSTUDIO}"
- "--openal=${OPENAL}"
+ "--fmodstudio=${USE_FMODSTUDIO}"
+ "--openal=${USE_OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
"--channel=${VIEWER_CHANNEL}"
@@ -1963,8 +1955,8 @@ if (LINUX)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
- "--fmodstudio=${FMODSTUDIO}"
- "--openal=${OPENAL}"
+ "--fmodstudio=${USE_FMODSTUDIO}"
+ "--openal=${USE_OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
"--channel=${VIEWER_CHANNEL}"
@@ -1991,8 +1983,8 @@ if (LINUX)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
- "--fmodstudio=${FMODSTUDIO}"
- "--openal=${OPENAL}"
+ "--fmodstudio=${USE_FMODSTUDIO}"
+ "--openal=${USE_OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
"--channel=${VIEWER_CHANNEL}"
@@ -2069,8 +2061,8 @@ if (DARWIN)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
- "--fmodstudio=${FMODSTUDIO}"
- "--openal=${OPENAL}"
+ "--fmodstudio=${USE_FMODSTUDIO}"
+ "--openal=${USE_OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
--bundleid=${MACOSX_BUNDLE_GUI_IDENTIFIER}
@@ -2104,8 +2096,8 @@ if (DARWIN)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
- "--fmodstudio=${FMODSTUDIO}"
- "--openal=${OPENAL}"
+ "--fmodstudio=${USE_FMODSTUDIO}"
+ "--openal=${USE_OPENAL}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
"--channel=${VIEWER_CHANNEL}"