diff options
author | Nicky <nicky.dasmijn@gmail.com> | 2022-04-16 22:57:09 +0200 |
---|---|---|
committer | Nicky <nicky.dasmijn@gmail.com> | 2022-04-16 22:57:09 +0200 |
commit | a950940adb1508908313253a9e5118801b2f6d89 (patch) | |
tree | b81c5bf903071621dbc43e8fc7cec377b9d4381f /indra/cmake/FMODSTUDIO.cmake | |
parent | 3ac18ad9932b4e2fda8e850bd18a524fb1593520 (diff) |
Streamline fmodstudio/openal targets:
- Targets now define the appropriate c++ defines, no more hand magic needed for llstartup.cpp
- Switch cmakeflage to USE_xxx rather than xxx as it was before. I personally find the USE_X notion more intuitive and it follows how KDU is used.
- To be backward compatible OPENAL/FMODSTUDIO flag will be mapped to USE_OPENAL/USE_FMODSTUDIO
Diffstat (limited to 'indra/cmake/FMODSTUDIO.cmake')
-rw-r--r-- | indra/cmake/FMODSTUDIO.cmake | 16 |
1 files changed, 12 insertions, 4 deletions
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 () |