From 241919e7f7986c11586a49bff53cf19c2c0e0ea6 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 13 Apr 2022 19:21:55 +0200 Subject: Rework cmake, the original plan was to maybe be able to use conan targets with the same name (that's why 3ps had names like apr::apr), but it's safer and saner to put the LL 3ps under the ll:: prefix. This also allows means it is possible to get rid of that bad "if( TRAGET ...) return() endif()" pattern and rather use include_guard(). --- indra/cmake/FMODSTUDIO.cmake | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'indra/cmake/FMODSTUDIO.cmake') diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index 41a75741c9..653d96f86a 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -1,5 +1,7 @@ # -*- cmake -*- +include_guard() + # 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. @@ -8,10 +10,7 @@ if (INSTALL_PROPRIETARY) endif (INSTALL_PROPRIETARY) if (FMODSTUDIO) - if( TARGET fmodstudio::fmodstudio ) - return() - endif() - create_target( fmodstudio::fmodstudio ) + create_target( ll::fmodstudio ) if (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR) # If the path have been specified in the arguments, use that @@ -25,15 +24,15 @@ if (FMODSTUDIO) include(Prebuilt) use_prebuilt_binary(fmodstudio) if (WINDOWS) - set_target_libraries( fmodstudio::fmodstudio fmod_vc) + set_target_libraries( ll::fmodstudio fmod_vc) elseif (DARWIN) #despite files being called libfmod.dylib, we are searching for fmod - set_target_libraries( fmodstudio::fmodstudio fmod) + set_target_libraries( ll::fmodstudio fmod) elseif (LINUX) - set_target_libraries( fmodstudio::fmodstudio fmod) + set_target_libraries( ll::fmodstudio fmod) endif (WINDOWS) - set_target_include_dirs(fmodstudio::fmodstudio ${LIBS_PREBUILT_DIR}/include/fmodstudio) + set_target_include_dirs(ll::fmodstudio ${LIBS_PREBUILT_DIR}/include/fmodstudio) endif (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR) endif (FMODSTUDIO) -- cgit v1.2.3