summaryrefslogtreecommitdiff
path: root/indra/cmake/FMODSTUDIO.cmake
diff options
context:
space:
mode:
authorNicky <nicky.dasmijn@gmail.com>2022-04-06 16:32:52 +0200
committerNicky <nicky.dasmijn@gmail.com>2022-04-06 16:32:52 +0200
commit786b291d9c6b784c7ce6ceef0e38a4ec76ea14db (patch)
treeed7386562337f06b212e0e95753c891ec7efbb3a /indra/cmake/FMODSTUDIO.cmake
parent7522cea2528f9cfdf5283a7920dd3434417b20f4 (diff)
Move CMake files to modernized cmake syntax, step 1.
Change projects to cmake targetsto get rid of havig to hardcore include directories and link libraries in consumer projects.
Diffstat (limited to 'indra/cmake/FMODSTUDIO.cmake')
-rw-r--r--indra/cmake/FMODSTUDIO.cmake26
1 files changed, 14 insertions, 12 deletions
diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake
index 8840354ac6..e8699cdecd 100644
--- a/indra/cmake/FMODSTUDIO.cmake
+++ b/indra/cmake/FMODSTUDIO.cmake
@@ -8,9 +8,17 @@ if (INSTALL_PROPRIETARY)
endif (INSTALL_PROPRIETARY)
if (FMODSTUDIO)
+ if( TARGET fmodstudio::fmodstudio )
+ return()
+ endif()
+ create_target( fmodstudio::fmodstudio )
+ set_target_include_dirs( openal::openal "${LIBS_PREBUILT_DIR}/include/AL")
+
if (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
# If the path have been specified in the arguments, use that
- set(FMODSTUDIO_LIBRARIES ${FMODSTUDIO_LIBRARY})
+
+ set_target_libraries(fmodstudio::fmodstudio ${FMODSTUDIO_LIBRARY})
+ set_target_include_dirs(fmodstudio::fmodstudio ${FMODSTUDIO_INCLUDE_DIR})
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)
@@ -18,21 +26,15 @@ if (FMODSTUDIO)
include(Prebuilt)
use_prebuilt_binary(fmodstudio)
if (WINDOWS)
- set(FMODSTUDIO_LIBRARY
- debug fmodL_vc
- optimized fmod_vc)
+ set_target_libraries( fmodstudio::fmodstudio fmod_vc)
elseif (DARWIN)
#despite files being called libfmod.dylib, we are searching for fmod
- set(FMODSTUDIO_LIBRARY
- debug fmodL
- optimized fmod)
+ set_target_libraries( fmodstudio::fmodstudio fmod)
elseif (LINUX)
- set(FMODSTUDIO_LIBRARY
- debug fmodL
- optimized fmod)
+ set_target_libraries( fmodstudio::fmodstudio fmod)
endif (WINDOWS)
- set(FMODSTUDIO_LIBRARIES ${FMODSTUDIO_LIBRARY})
- set(FMODSTUDIO_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodstudio)
+
+ set_target_include_dirs(fmodstudio::fmodstudio ${LIBS_PREBUILT_DIR}/include/fmodstudio)
endif (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
endif (FMODSTUDIO)