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/00-Common.cmake | 5 +--- indra/cmake/APR.cmake | 14 +++++----- indra/cmake/Audio.cmake | 12 ++++----- indra/cmake/Boost.cmake | 16 ++++-------- indra/cmake/CEFPlugin.cmake | 4 +-- indra/cmake/CURL.cmake | 12 ++++----- indra/cmake/EXPAT.cmake | 12 ++++----- indra/cmake/FMODSTUDIO.cmake | 15 +++++------ indra/cmake/FreeType.cmake | 10 +++----- indra/cmake/GLOD.cmake | 10 +++----- indra/cmake/GoogleMock.cmake | 17 ++++++------ indra/cmake/Havok.cmake | 4 +-- indra/cmake/Hunspell.cmake | 16 +++++------- indra/cmake/JPEG.cmake | 14 +++++----- indra/cmake/JsonCpp.cmake | 14 +++++----- indra/cmake/LLAddBuildTest.cmake | 4 +-- indra/cmake/LLKDU.cmake | 12 ++++----- indra/cmake/LLPhysicsExtensions.cmake | 4 +-- indra/cmake/LLPrimitive.cmake | 30 ++++++++++------------ indra/cmake/LLWindow.cmake | 12 ++++----- indra/cmake/LibVLCPlugin.cmake | 12 ++++----- indra/cmake/Linking.cmake | 5 +--- indra/cmake/NDOF.cmake | 12 ++++----- indra/cmake/NGHTTP2.cmake | 14 +++++----- indra/cmake/NVAPI.cmake | 8 ++---- indra/cmake/OPENAL.cmake | 14 +++++----- indra/cmake/OpenJPEG.cmake | 10 +++----- indra/cmake/OpenSSL.cmake | 14 +++++----- indra/cmake/PNG.cmake | 12 ++++----- indra/cmake/Prebuilt.cmake | 6 +---- indra/cmake/URIPARSER.cmake | 14 +++++----- indra/cmake/Variables.cmake | 5 +--- indra/cmake/XmlRpcEpi.cmake | 10 +++----- indra/cmake/ZLIBNG.cmake | 12 ++++----- indra/cmake/bugsplat.cmake | 10 +++----- .../llimage_libtest/CMakeLists.txt | 19 +++++++------- .../integration_tests/llui_libtest/CMakeLists.txt | 23 ++++++++--------- indra/linux_crash_logger/CMakeLists.txt | 19 ++++++-------- indra/llaudio/CMakeLists.txt | 10 ++++---- indra/llcommon/CMakeLists.txt | 19 +++++--------- indra/llcorehttp/CMakeLists.txt | 6 ++--- indra/llimage/CMakeLists.txt | 5 ++-- indra/llimagej2coj/CMakeLists.txt | 2 +- indra/llkdu/CMakeLists.txt | 4 +-- indra/llmessage/CMakeLists.txt | 4 --- indra/llprimitive/CMakeLists.txt | 4 +-- indra/llrender/CMakeLists.txt | 4 +-- indra/llui/CMakeLists.txt | 6 ++--- indra/llwindow/CMakeLists.txt | 2 +- indra/llxml/CMakeLists.txt | 2 +- indra/media_plugins/libvlc/CMakeLists.txt | 2 +- indra/newview/CMakeLists.txt | 15 ++++------- indra/test/CMakeLists.txt | 2 +- 53 files changed, 221 insertions(+), 322 deletions(-) (limited to 'indra') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 54b74b14fb..ec0e195b56 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -12,9 +12,7 @@ # Also realize that CMAKE_CXX_FLAGS may already be partially populated on # entry to this file. #***************************************************************************** - -if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) -set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") +include_guard() include(Variables) @@ -200,4 +198,3 @@ set(${ARCH}_linux_INCLUDES pango-1.0 ) -endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index 63ea195fad..269b0f3000 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -1,11 +1,9 @@ include(Linking) include(Prebuilt) -if( TARGET apr::apr ) - return() -endif() +include_guard() -create_target( apr::apr) +create_target( ll::apr) use_prebuilt_binary(apr_suite) if (WINDOWS) @@ -14,7 +12,7 @@ if (WINDOWS) else (LLCOMMON_LINK_SHARED) set(APR_selector "") endif (LLCOMMON_LINK_SHARED) - set_target_libraries( apr::apr + set_target_libraries( ll::apr ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apriconv-1.lib ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib @@ -28,13 +26,13 @@ elseif (DARWIN) set(APRUTIL_selector "a") endif (LLCOMMON_LINK_SHARED) - set_target_libraries( apr::apr + set_target_libraries( ll::apr libapr-1.${APR_selector} libaprutil-1.${APRUTIL_selector} iconv ) else (WINDOWS) - set_target_libraries( apr::apr + set_target_libraries( ll::apr apr-1 aprutil-1 iconv @@ -42,4 +40,4 @@ else (WINDOWS) rt ) endif (WINDOWS) -set_target_include_dirs( apr::apr ${LIBS_PREBUILT_DIR}/include/apr-1 ) +set_target_include_dirs( ll::apr ${LIBS_PREBUILT_DIR}/include/apr-1 ) diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake index bf95a8eef1..e533d1ac00 100644 --- a/indra/cmake/Audio.cmake +++ b/indra/cmake/Audio.cmake @@ -1,17 +1,15 @@ # -*- cmake -*- include(Prebuilt) -if(TARGET vorbis::vorbis) - return() -endif() -create_target(vorbis::vorbis) +include_guard() +create_target(ll::vorbis) use_prebuilt_binary(ogg_vorbis) -set_target_include_dirs( vorbis::vorbis ${LIBS_PREBUILT_DIR}/include ) +set_target_include_dirs( ll::vorbis ${LIBS_PREBUILT_DIR}/include ) if (WINDOWS) - set_target_libraries(vorbis::vorbis ogg_static vorbis_static vorbisenc_static vorbisfile_static ) + set_target_libraries(ll::vorbis ogg_static vorbis_static vorbisenc_static vorbisfile_static ) else (WINDOWS) - set_target_libraries(vorbis::vorbis ogg vorbis vorbisenc vorbisfile ) + set_target_libraries(ll::vorbis ogg vorbis vorbisenc vorbisfile ) endif (WINDOWS) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 2102ee3887..ac6151ffe3 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -1,23 +1,17 @@ # -*- cmake -*- include(Prebuilt) -if( TARGET boost::boost ) - return() -endif() -create_target( boost::boost ) - -set(Boost_FIND_QUIETLY ON) -set(Boost_FIND_REQUIRED ON) +include_guard() +create_target( ll::boost ) use_prebuilt_binary(boost) -set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) # As of sometime between Boost 1.67 and 1.72, Boost libraries are suffixed # with the address size. set(addrsfx "-x${ADDRESS_SIZE}") if (WINDOWS) - set_target_libraries( boost::boost + set_target_libraries( ll::boost libboost_context-mt${addrsfx} libboost_fiber-mt${addrsfx} libboost_filesystem-mt${addrsfx} @@ -26,7 +20,7 @@ if (WINDOWS) libboost_system-mt${addrsfx} libboost_thread-mt${addrsfx}) elseif (LINUX) - set_target_libraries( boost::boost + set_target_libraries( ll::boost boost_context-mt${addrsfx} boost_fiber-mt${addrsfx} boost_filesystem-mt${addrsfx} @@ -36,7 +30,7 @@ elseif (LINUX) boost_system-mt${addrsfx} boost_thread-mt${addrsfx}) elseif (DARWIN) - set_target_libraries( boost::boost + set_target_libraries( ll::boost boost_context-mt${addrsfx} boost_fiber-mt${addrsfx} boost_filesystem-mt${addrsfx} diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index bcce4cfa05..6dba5e26ac 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -2,9 +2,7 @@ include(Linking) include(Prebuilt) -if(TARGET cef::cef) - return() -endif() +include_guard() create_target( cef::cef ) use_prebuilt_binary(dullahan) diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index 455d420e48..2a5ea67ff3 100644 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -1,15 +1,13 @@ # -*- cmake -*- include(Prebuilt) -if( TARGET libcurl::libcurl ) - return() -endif() -create_target(libcurl::libcurl) +include_guard() +create_target(ll::libcurl) use_prebuilt_binary(curl) if (WINDOWS) - set_target_libraries(libcurl::libcurl libcurl.lib) + set_target_libraries(ll::libcurl libcurl.lib) else (WINDOWS) - set_target_libraries(libcurl::libcurl libcurl.a) + set_target_libraries(ll::libcurl libcurl.a) endif (WINDOWS) -set_target_include_dirs( libcurl::libcurl ${LIBS_PREBUILT_DIR}/include) +set_target_include_dirs( ll::libcurl ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake index fb0467987b..85bb146a4a 100644 --- a/indra/cmake/EXPAT.cmake +++ b/indra/cmake/EXPAT.cmake @@ -1,21 +1,19 @@ # -*- cmake -*- include(Prebuilt) -if( TARGET expat::expat ) - return() -endif() -create_target( expat::expat INTERFACE IMPORTED ) +include_guard() +create_target( ll::expat INTERFACE IMPORTED ) use_prebuilt_binary(expat) if (WINDOWS) - set_target_libraries( expat::expat libexpatMT ) + set_target_libraries( ll::expat libexpatMT ) set(EXPAT_COPY libexpatMT.dll) else (WINDOWS) - set_target_libraries( expat::expat expat ) + set_target_libraries( ll::expat expat ) if (DARWIN) set(EXPAT_COPY libexpat.1.dylib libexpat.dylib) else () set(EXPAT_COPY libexpat.so.1 libexpat.so) endif () endif (WINDOWS) -set_target_include_dirs( expat::expat ${LIBS_PREBUILT_DIR}/include ) +set_target_include_dirs( ll::expat ${LIBS_PREBUILT_DIR}/include ) 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) diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake index 429bb5060b..243f22586b 100644 --- a/indra/cmake/FreeType.cmake +++ b/indra/cmake/FreeType.cmake @@ -1,12 +1,10 @@ # -*- cmake -*- include(Prebuilt) -if( TARGET freetype::freetype ) - return() -endif() -create_target( freetype::freetype) +include_guard() +create_target( ll::freetype) use_prebuilt_binary(freetype) -set_target_include_dirs( freetype::freetype ${LIBS_PREBUILT_DIR}/include/freetype2/) -set_target_libraries( freetype::freetype freetype ) +set_target_include_dirs( ll::freetype ${LIBS_PREBUILT_DIR}/include/freetype2/) +set_target_libraries( ll::freetype freetype ) diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake index 1a33644e9e..2d7f85030f 100644 --- a/indra/cmake/GLOD.cmake +++ b/indra/cmake/GLOD.cmake @@ -1,14 +1,12 @@ # -*- cmake -*- include(Prebuilt) -if( TARGET glod::glod ) - return() -endif() -create_target( glod::glod ) +include_guard() +create_target( ll::glod ) use_prebuilt_binary(glod) set(GLODLIB ON CACHE BOOL "Using GLOD library") -set_target_include_dirs( glod::glod ${LIBS_PREBUILT_DIR}/include) -set_target_libraries( glod::glod GLOD ) +set_target_include_dirs( ll::glod ${LIBS_PREBUILT_DIR}/include) +set_target_libraries( ll::glod GLOD ) diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake index 821346ced6..1f161ec4ff 100644 --- a/indra/cmake/GoogleMock.cmake +++ b/indra/cmake/GoogleMock.cmake @@ -2,27 +2,26 @@ include(Prebuilt) include(Linking) +include_guard() + use_prebuilt_binary(googlemock) -if( TARGET googlemock::googlemock ) - return() -endif() -create_target( googlemock::googlemock ) -set_target_include_dirs( googlemock::googlemock +create_target( ll::googlemock ) +set_target_include_dirs( ll::googlemock ${LIBS_PREBUILT_DIR}/include ) if (LINUX) # VWR-24366: gmock is underlinked, it needs gtest. - set_target_libraries( googlemock::googlemock gmock gtest) + set_target_libraries( ll::googlemock gmock gtest) elseif(WINDOWS) - set_target_libraries( googlemock::googlemock gmock) - set_target_include_dirs( googlemock::googlemock + set_target_libraries( ll::googlemock gmock) + set_target_include_dirs( ll::googlemock ${LIBS_PREBUILT_DIR}/include ${LIBS_PREBUILT_DIR}/include/gmock) elseif(DARWIN) - set_target_libraries( googlemock::googlemock gmock gtest) + set_target_libraries( ll::googlemock gmock gtest) endif(LINUX) diff --git a/indra/cmake/Havok.cmake b/indra/cmake/Havok.cmake index 811a126b8f..652760e626 100644 --- a/indra/cmake/Havok.cmake +++ b/indra/cmake/Havok.cmake @@ -1,7 +1,6 @@ # -*- cmake -*- include(Prebuilt) -if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) -set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") +include_guard() use_prebuilt_binary(havok-source) @@ -124,4 +123,3 @@ foreach(HAVOK_LIB ${HAVOK_LIBS}) endif (LINUX) endforeach(HAVOK_LIB) -endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake index 81702cbd77..258a27b5de 100644 --- a/indra/cmake/Hunspell.cmake +++ b/indra/cmake/Hunspell.cmake @@ -1,20 +1,16 @@ # -*- cmake -*- include(Prebuilt) -if( TARGET hunspell::hunspell ) - return() -endif() -create_target( hunspell::hunspell ) +include_guard() +create_target( ll::hunspell ) use_prebuilt_binary(libhunspell) if (WINDOWS) - set_target_libraries( hunspell::hunspell libhunspell) + set_target_libraries( ll::hunspell libhunspell) elseif(DARWIN) - set_target_libraries( hunspell::hunspell hunspell-1.3) + set_target_libraries( ll::hunspell hunspell-1.3) elseif(LINUX) - set_target_libraries( hunspell::hunspell hunspell-1.3) -else() - message(FATAL_ERROR "Invalid platform") + set_target_libraries( ll::hunspell hunspell-1.3) endif() -set_target_include_dirs( hunspell::hunspell ${LIBS_PREBUILT_DIR}/include/hunspell) +set_target_include_dirs( ll::hunspell ${LIBS_PREBUILT_DIR}/include/hunspell) use_prebuilt_binary(dictionaries) diff --git a/indra/cmake/JPEG.cmake b/indra/cmake/JPEG.cmake index d3bec7901f..e6ff4b7b72 100644 --- a/indra/cmake/JPEG.cmake +++ b/indra/cmake/JPEG.cmake @@ -3,17 +3,15 @@ include(Prebuilt) include(Linking) -if( TARGET jpeglib::jpeglib ) - return() -endif() -create_target(jpeglib::jpeglib) +include_guard() +create_target(ll::jpeglib) use_prebuilt_binary(jpeglib) if (LINUX) - set_target_libraries( jpeglib::jpeglib jpeg) + set_target_libraries( ll::jpeglib jpeg) elseif (DARWIN) - set_target_libraries( jpeglib::jpeglib jpeg) + set_target_libraries( ll::jpeglib jpeg) elseif (WINDOWS) - set_target_libraries( jpeglib::jpeglib jpeglib) + set_target_libraries( ll::jpeglib jpeglib) endif (LINUX) -set_target_include_dirs( jpeglib::jpeglib ${LIBS_PREBUILT_DIR}/include) +set_target_include_dirs( ll::jpeglib ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake index 139735ed05..a155c6ea78 100644 --- a/indra/cmake/JsonCpp.cmake +++ b/indra/cmake/JsonCpp.cmake @@ -1,17 +1,15 @@ # -*- cmake -*- include(Prebuilt) -if( TARGET jsoncpp::jsoncpp ) - return() -endif() -create_target( jsoncpp::jsoncpp) +include_guard() +create_target( ll::jsoncpp) use_prebuilt_binary(jsoncpp) if (WINDOWS) - set_target_libraries( jsoncpp::jsoncpp json_libmd.lib ) + set_target_libraries( ll::jsoncpp json_libmd.lib ) elseif (DARWIN) - set_target_libraries( jsoncpp::jsoncpp libjson_darwin_libmt.a ) + set_target_libraries( ll::jsoncpp libjson_darwin_libmt.a ) elseif (LINUX) - set_target_libraries( jsoncpp::jsoncpp libjson_linux-gcc-4.1.3_libmt.a ) + set_target_libraries( ll::jsoncpp libjson_linux-gcc-4.1.3_libmt.a ) endif (WINDOWS) -set_target_include_dirs( jsoncpp::jsoncpp ${LIBS_PREBUILT_DIR}/include/json) +set_target_include_dirs( ll::jsoncpp ${LIBS_PREBUILT_DIR}/include/json) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 2fa9a7cd96..a3c873b389 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -45,7 +45,7 @@ INCLUDE(GoogleMock) ) SET(alltest_LIBRARIES llcommon - googlemock::googlemock + ll::googlemock ${PTHREAD_LIBRARY} ${WINDOWS_LIBRARIES} ) @@ -208,7 +208,7 @@ FUNCTION(LL_ADD_INTEGRATION_TEST SET(libraries ${LEGACY_STDIO_LIBS} ${library_dependencies} - googlemock::googlemock + ll::googlemock ${PTHREAD_LIBRARY} ) diff --git a/indra/cmake/LLKDU.cmake b/indra/cmake/LLKDU.cmake index a0463be635..a57c3d8715 100644 --- a/indra/cmake/LLKDU.cmake +++ b/indra/cmake/LLKDU.cmake @@ -7,21 +7,19 @@ if (INSTALL_PROPRIETARY) set(USE_KDU ON CACHE BOOL "Use Kakadu library.") endif (INSTALL_PROPRIETARY) -if( TARGET kdu::kdu ) - return() -endif() -create_target( kdu::kdu ) +include_guard() +create_target( ll::kdu ) if (USE_KDU) include(Prebuilt) use_prebuilt_binary(kdu) if (WINDOWS) - set_target_libraries( kdu::kdu kdu.lib) + set_target_libraries( ll::kdu kdu.lib) else (WINDOWS) - set_target_libraries( kdu::kdu libkdu.a) + set_target_libraries( ll::kdu libkdu.a) endif (WINDOWS) - set_target_include_dirs( kdu::kdu + set_target_include_dirs( ll::kdu ${AUTOBUILD_INSTALL_DIR}/include/kdu ${LIBS_OPEN_DIR}/llkdu ) diff --git a/indra/cmake/LLPhysicsExtensions.cmake b/indra/cmake/LLPhysicsExtensions.cmake index c46a04129a..b51c4c622a 100644 --- a/indra/cmake/LLPhysicsExtensions.cmake +++ b/indra/cmake/LLPhysicsExtensions.cmake @@ -10,9 +10,7 @@ if (INSTALL_PROPRIETARY) set(HAVOK ON CACHE BOOL "Use Havok physics library") endif (INSTALL_PROPRIETARY) -if(TARGET llphysicsextensions ) - return() -endif() +include_guard() create_target(llphysicsextensions) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 799afc77d1..0f0e2d3bbf 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -4,41 +4,39 @@ include(Prebuilt) include(Boost) -if( TARGET colladadom::colladadom ) - return() -endif() +include_guard() use_prebuilt_binary(colladadom) use_prebuilt_binary(minizip-ng) # needed for colladadom use_prebuilt_binary(pcre) use_prebuilt_binary(libxml2) -create_target( pcre::pcre ) -set_target_libraries( pcre::pcre pcrecpp pcre ) +create_target( ll::pcre ) +set_target_libraries( ll::pcre pcrecpp pcre ) -create_target( minizip-ng::minizip-ng ) +create_target( ll::minizip-ng ) if (WINDOWS) - set_target_libraries( minizip-ng::minizip-ng libminizip ) + set_target_libraries( ll::minizip-ng libminizip ) else() - set_target_libraries( minizip-ng::minizip-ng minizip ) + set_target_libraries( ll::minizip-ng minizip ) endif() -create_target( libxml::libxml ) +create_target( ll::libxml ) if (WINDOWS) - set_target_libraries( libxml::libxml libxml2_a) + set_target_libraries( ll::libxml libxml2_a) else() - set_target_libraries( libxml::libxml xml2) + set_target_libraries( ll::libxml xml2) endif() -create_target( colladadom::colladadom ) -set_target_include_dirs( colladadom::colladadom +create_target( ll::colladadom ) +set_target_include_dirs( ll::colladadom ${LIBS_PREBUILT_DIR}/include/collada ${LIBS_PREBUILT_DIR}/include/collada/1.4 ) if (WINDOWS) - set_target_libraries(colladadom::colladadom libcollada14dom23-s libxml::libxml minizip-ng::minizip-ng ) + set_target_libraries(ll::colladadom libcollada14dom23-s ll::libxml ll::minizip-ng ) elseif (DARWIN) - set_target_libraries(colladadom::colladadom collada14dom libxml::libxml minizip-ng::minizip-ng) + set_target_libraries(ll::colladadom collada14dom ll::libxml ll::minizip-ng) elseif (LINUX) - set_target_libraries(colladadom::colladadom collada14dom libxml::libxml minizip-ng::minizip-ng) + set_target_libraries(ll::colladadom collada14dom ll::libxml ll::minizip-ng) endif() \ No newline at end of file diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index 42d2a0f2c4..2bbaff942d 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -4,16 +4,14 @@ include(Variables) include(GLEXT) include(Prebuilt) -if( TARGET sdl::sdl) - return() -endif() -create_target(sdl::sdl) +include_guard() +create_target(ll::sdl) if (LINUX) use_prebuilt_binary(SDL) - set_target_include_dirs( sdl::sdl ${LIBS_PREBUILT_DIR}/i686-linux) - set_target_libraries( sdl::sdl SDL directfb fusion direct X11) - target_compile_definitions( sdl::sdl INTERFACE LL_SDL=1) + set_target_include_dirs( ll::sdl ${LIBS_PREBUILT_DIR}/i686-linux) + set_target_libraries( ll::sdl SDL directfb fusion direct X11) + target_compile_definitions( ll::sdl INTERFACE LL_SDL=1) endif (LINUX) diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake index 12ba1720c7..1648bfd942 100644 --- a/indra/cmake/LibVLCPlugin.cmake +++ b/indra/cmake/LibVLCPlugin.cmake @@ -2,10 +2,8 @@ include(Linking) include(Prebuilt) -if( TARGET libvlc::libvlc ) - return() -endif() -create_target( libvlc::libvlc ) +include_guard() +create_target( ll::libvlc ) use_prebuilt_binary(vlc-bin) set(LIBVLCPLUGIN ON CACHE BOOL @@ -13,18 +11,18 @@ set(LIBVLCPLUGIN ON CACHE BOOL set(VLC_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/vlc) if (WINDOWS) - set_target_libraries( libvlc::libvlc + set_target_libraries( ll::libvlc libvlc.lib libvlccore.lib ) elseif (DARWIN) - set_target_libraries( libvlc::libvlc + set_target_libraries( ll::libvlc libvlc.dylib libvlccore.dylib ) elseif (LINUX) # Specify a full path to make sure we get a static link - set_target_libraries( liblvc::libvlc + set_target_libraries( ll::libvlc ${LIBS_PREBUILT_DIR}/lib/libvlc.a ${LIBS_PREBUILT_DIR}/lib/libvlccore.a ) diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index d3e82f8c3a..4a57a6a3ef 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -1,8 +1,6 @@ # -*- cmake -*- -if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) -set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") - +include_guard() include(Variables) set(ARCH_PREBUILT_DIRS ${AUTOBUILD_INSTALL_DIR}/lib) @@ -86,4 +84,3 @@ endif (WINDOWS) mark_as_advanced(DL_LIBRARY PTHREAD_LIBRARY WINDOWS_LIBRARIES) -endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake index e5ec962f4c..75936425ff 100644 --- a/indra/cmake/NDOF.cmake +++ b/indra/cmake/NDOF.cmake @@ -3,10 +3,8 @@ include(Prebuilt) set(NDOF ON CACHE BOOL "Use NDOF space navigator joystick library.") -if ( TARGET ndof::ndof ) - return() -endif() -create_target( ndof::ndof ) +include_guard() +create_target( ll::ndof ) if (NDOF) if (WINDOWS OR DARWIN) @@ -16,11 +14,11 @@ if (NDOF) endif (WINDOWS OR DARWIN) if (WINDOWS) - set_target_libraries( ndof::ndof libndofdev) + set_target_libraries( ll::ndof libndofdev) elseif (DARWIN OR LINUX) - set_target_libraries( ndof::ndof ndofdev) + set_target_libraries( ll::ndof ndofdev) endif (WINDOWS) - target_compile_definitions( ndof::ndof INTERFACE LIB_NDOF=1) + target_compile_definitions( ll::ndof INTERFACE LIB_NDOF=1) endif (NDOF) if (NOT NDOF_FOUND) diff --git a/indra/cmake/NGHTTP2.cmake b/indra/cmake/NGHTTP2.cmake index b1a0d33102..e92f0da2ef 100644 --- a/indra/cmake/NGHTTP2.cmake +++ b/indra/cmake/NGHTTP2.cmake @@ -1,16 +1,14 @@ include(Prebuilt) -if( TARGET nghttp2::nghttp2 ) - return() -endif() -create_target( nghttp2::nghttp2 ) +include_guard() +create_target( ll::nghttp2 ) use_prebuilt_binary(nghttp2) if (WINDOWS) - set_target_libraries( nghttp2::nghttp2 ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib) + set_target_libraries( ll::nghttp2 ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib) elseif (DARWIN) - set_target_libraries( nghttp2::nghttp2 libnghttp2.dylib) + set_target_libraries( ll::nghttp2 libnghttp2.dylib) else (WINDOWS) - set_target_libraries( nghttp2::nghttp2 libnghttp2.a ) + set_target_libraries( ll::nghttp2 libnghttp2.a ) endif (WINDOWS) -set_target_include_dirs( nghttp2::nghttp2 ${LIBS_PREBUILT_DIR}/include/nghttp2) +set_target_include_dirs( ll::nghttp2 ${LIBS_PREBUILT_DIR}/include/nghttp2) diff --git a/indra/cmake/NVAPI.cmake b/indra/cmake/NVAPI.cmake index 1eea96784f..63e5dd12de 100644 --- a/indra/cmake/NVAPI.cmake +++ b/indra/cmake/NVAPI.cmake @@ -5,13 +5,9 @@ set(NVAPI ON CACHE BOOL "Use NVAPI.") if (NVAPI) if (WINDOWS) - create_target( nvapi::nvapi ) - set_target_libraries( nvapi::nvapi nvapi) + create_target( ll::nvapi ) + set_target_libraries( ll::nvapi nvapi) use_prebuilt_binary(nvapi) - else (WINDOWS) - set(NVAPI_LIBRARY "") endif (WINDOWS) -else (NVAPI) - set(NVAPI_LIBRARY "") endif (NVAPI) diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake index ec60876419..9904f6d1c0 100644 --- a/indra/cmake/OPENAL.cmake +++ b/indra/cmake/OPENAL.cmake @@ -2,6 +2,8 @@ include(Linking) include(Prebuilt) +include_guard() + if (LINUX) set(OPENAL ON CACHE BOOL "Enable OpenAL") else (LINUX) @@ -9,22 +11,18 @@ else (LINUX) endif (LINUX) if (OPENAL) - if( TARGET openal::openal ) - return() - endif() - - create_target( openal::openal ) - set_target_include_dirs( openal::openal "${LIBS_PREBUILT_DIR}/include/AL") + create_target( ll::openal ) + set_target_include_dirs( ll::openal "${LIBS_PREBUILT_DIR}/include/AL") use_prebuilt_binary(openal) if(WINDOWS) - set_target_libraries( openal::openal + set_target_libraries( ll::openal OpenAL32 alut ) elseif(LINUX) - set_target_libraries( openal::openal + set_target_libraries( ll::openal openal alut ) diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index e8aa231314..7d4d0f467a 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -1,12 +1,10 @@ # -*- cmake -*- include(Prebuilt) -if( TARGET openjpeg::openjpeg ) - return() -endif() -create_target( openjpeg::openjpeg ) +include_guard() +create_target( ll::openjpeg ) use_prebuilt_binary(openjpeg) -set_target_libraries(openjpeg::openjpeg openjpeg ) -set_target_include_dirs( openjpeg::openjpeg ${LIBS_PREBUILT_DIR}/include/openjpeg) +set_target_libraries(ll::openjpeg openjpeg ) +set_target_include_dirs( ll::openjpeg ${LIBS_PREBUILT_DIR}/include/openjpeg) diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake index 0aa95922ed..d586396105 100644 --- a/indra/cmake/OpenSSL.cmake +++ b/indra/cmake/OpenSSL.cmake @@ -1,18 +1,16 @@ # -*- cmake -*- include(Prebuilt) -if( TARGET openssl::openssl ) - return() -endif() -create_target(openssl::openssl) +include_guard() +create_target(ll::openssl) use_prebuilt_binary(openssl) if (WINDOWS) - set_target_libraries(openssl::openssl libssl libcrypto) + set_target_libraries(ll::openssl libssl libcrypto) elseif (LINUX) - set_target_libraries(openssl::openssl ssl crypto dl) + set_target_libraries(ll::openssl ssl crypto dl) else() - set_target_libraries(openssl::openssl ssl crypto) + set_target_libraries(ll::openssl ssl crypto) endif (WINDOWS) -set_target_include_dirs(openssl::openssl ${LIBS_PREBUILT_DIR}/include) +set_target_include_dirs(ll::openssl ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/PNG.cmake b/indra/cmake/PNG.cmake index 819904b6bd..2838a6b667 100644 --- a/indra/cmake/PNG.cmake +++ b/indra/cmake/PNG.cmake @@ -1,15 +1,13 @@ # -*- cmake -*- include(Prebuilt) -if( TARGET libpng::libpng ) - return() -endif() -create_target(libpng::libpng) +include_guard() +create_target(ll::libpng) use_prebuilt_binary(libpng) if (WINDOWS) - set_target_libraries(libpng::libpng libpng16) + set_target_libraries(ll::libpng libpng16) else() - set_target_libraries(libpng::libpng png16 ) + set_target_libraries(ll::libpng png16 ) endif() -set_target_include_dirs( libpng::libpng ${LIBS_PREBUILT_DIR}/include/libpng16) +set_target_include_dirs( ll::libpng ${LIBS_PREBUILT_DIR}/include/libpng16) diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 9125f2f80f..9e8adf5af1 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -1,7 +1,5 @@ # -*- cmake -*- - -if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) -set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") +include_guard() include(FindAutobuild) if(INSTALL_PROPRIETARY) @@ -71,5 +69,3 @@ function( set_target_include_dirs target) set_property( TARGET ${target} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ARGN} ) endfunction() - -endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/cmake/URIPARSER.cmake b/indra/cmake/URIPARSER.cmake index 3afd8cd6c9..35f37b4472 100644 --- a/indra/cmake/URIPARSER.cmake +++ b/indra/cmake/URIPARSER.cmake @@ -1,18 +1,16 @@ # -*- cmake -*- -if( TARGET uriparser::uriparser ) - return() -endif() -create_target( uriparser::uriparser ) +include_guard() +create_target( ll::uriparser ) include(Prebuilt) use_prebuilt_binary(uriparser) if (WINDOWS) - set_target_libraries( uriparser::uriparser uriparser) + set_target_libraries( ll::uriparser uriparser) elseif (LINUX) - set_target_libraries( uriparser::uriparser uriparser) + set_target_libraries( ll::uriparser uriparser) elseif (DARWIN) - set_target_libraries( uriparser::uriparser liburiparser.dylib) + set_target_libraries( ll::uriparser liburiparser.dylib) endif (WINDOWS) -set_target_include_dirs( uriparser::uriparser ${LIBS_PREBUILT_DIR}/include/uriparser) +set_target_include_dirs( ll::uriparser ${LIBS_PREBUILT_DIR}/include/uriparser) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 56916504b5..0cc4b85583 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -15,12 +15,10 @@ if ("$ENV{LL_BUILD}" STREQUAL "") message(FATAL_ERROR "Environment variable LL_BUILD must be set") endif () +include_guard() # Relative and absolute paths to subtrees. -if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) -set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") - if(NOT DEFINED COMMON_CMAKE_DIR) set(COMMON_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake") endif(NOT DEFINED COMMON_CMAKE_DIR) @@ -219,4 +217,3 @@ set(USE_PRECOMPILED_HEADERS ON CACHE BOOL "Enable use of precompiled header dire source_group("CMake Rules" FILES CMakeLists.txt) -endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index 28a9a10e40..b2d1d96562 100644 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -1,11 +1,9 @@ # -*- cmake -*- include(Prebuilt) -if( TARGET xmlrpc-epi::xmlrpc-epi ) - return() -endif() -create_target( xmlrpc-epi::xmlrpc-epi ) +include_guard() +create_target( ll::xmlrpc-epi ) use_prebuilt_binary(xmlrpc-epi) -set_target_libraries(xmlrpc-epi::xmlrpc-epi xmlrpc-epi ) -set_target_include_dirs( xmlrpc-epi::xmlrpc-epi ${LIBS_PREBUILT_DIR}/include) +set_target_libraries(ll::xmlrpc-epi xmlrpc-epi ) +set_target_include_dirs( ll::xmlrpc-epi ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/ZLIBNG.cmake b/indra/cmake/ZLIBNG.cmake index d5e882cb68..6e206f1e48 100644 --- a/indra/cmake/ZLIBNG.cmake +++ b/indra/cmake/ZLIBNG.cmake @@ -2,15 +2,13 @@ include(Prebuilt) -if( TARGET zlib-ng::zlib-ng ) - return() -endif() -create_target(zlib-ng::zlib-ng) +include_guard() +create_target(ll::zlib-ng) use_prebuilt_binary(zlib-ng) if (WINDOWS) - set_target_libraries( zlib-ng::zlib-ng zlib ) + set_target_libraries( ll::zlib-ng zlib ) else() - set_target_libraries( zlib-ng::zlib-ng z ) + set_target_libraries( ll::zlib-ng z ) endif (WINDOWS) -set_target_include_dirs( zlib-ng::zlib-ng ${LIBS_PREBUILT_DIR}/include/zlib-ng) +set_target_include_dirs( ll::zlib-ng ${LIBS_PREBUILT_DIR}/include/zlib-ng) diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake index 75d5239b47..ce5660aa05 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -9,10 +9,8 @@ else (INSTALL_PROPRIETARY) set(USE_BUGSPLAT OFF CACHE BOOL "Use the BugSplat crash reporting system") endif (INSTALL_PROPRIETARY) -if( TARGET bugsplat::bugsplat) - return() -endif() -create_target(bugsplat::bugsplat) +include_guard() +create_target(ll::bugsplat) if (USE_BUGSPLAT) include(Prebuilt) @@ -33,7 +31,7 @@ if (USE_BUGSPLAT) set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name") - set_target_include_dirs( bugsplat::bugsplat ${LIBS_PREBUILT_DIR}/include/bugsplat) - set_property( TARGET bugsplat::bugsplat APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS LL_BUGSPLAT) + set_target_include_dirs( ll::bugsplat ${LIBS_PREBUILT_DIR}/include/bugsplat) + set_property( TARGET ll::bugsplat APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS LL_BUGSPLAT) endif (USE_BUGSPLAT) diff --git a/indra/integration_tests/llimage_libtest/CMakeLists.txt b/indra/integration_tests/llimage_libtest/CMakeLists.txt index bd59f57e49..9ac3498d09 100644 --- a/indra/integration_tests/llimage_libtest/CMakeLists.txt +++ b/indra/integration_tests/llimage_libtest/CMakeLists.txt @@ -64,16 +64,15 @@ endif (DARWIN) # Libraries on which this application depends on # Sort by high-level to low-level target_link_libraries(llimage_libtest - ${LEGACY_STDIO_LIBS} - ${LLCOMMON_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLIMAGE_LIBRARIES} - ${LLKDU_LIBRARIES} - ${KDU_LIBRARY} - ${LLIMAGEJ2COJ_LIBRARIES} - ${OS_LIBRARIES} - ) + ${LEGACY_STDIO_LIBS} + llcommon + llfilesystem + llmath + llimage + llkdu + llimagej2coj + ${OS_LIBRARIES} + ) if (DARWIN) # Path inside the app bundle where we'll need to copy libraries diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt index 68f2ce3a42..baa814fb8b 100644 --- a/indra/integration_tests/llui_libtest/CMakeLists.txt +++ b/indra/integration_tests/llui_libtest/CMakeLists.txt @@ -75,19 +75,16 @@ endif (DARWIN) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level target_link_libraries(llui_libtest - ${LEGACY_STDIO_LIBS} - llui - llinventory - llmessage - ${LLRENDER_LIBRARIES} - ${LLIMAGE_LIBRARIES} - ${LLKDU_LIBRARIES} - ${KDU_LIBRARY} - ${LLIMAGEJ2COJ_LIBRARIES} - ${OS_LIBRARIES} - ${GOOGLE_PERFTOOLS_LIBRARIES} - ${HUNSPELL_LIBRARY} - ) + ${LEGACY_STDIO_LIBS} + llui + llinventory + llmessage + llrender + llimage + llkdu + llimagej2coj + ${OS_LIBRARIES} + ) if (WINDOWS) set_target_properties(llui_libtest diff --git a/indra/linux_crash_logger/CMakeLists.txt b/indra/linux_crash_logger/CMakeLists.txt index aa82ed12cc..daa78f77ff 100644 --- a/indra/linux_crash_logger/CMakeLists.txt +++ b/indra/linux_crash_logger/CMakeLists.txt @@ -61,18 +61,15 @@ set(LIBRT_LIBRARY rt) target_link_libraries(linux-crash-logger - ${LLCRASHLOGGER_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLXML_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} + llcrashlogger + llfilesystem + llxml + llmessage + llmath + llcorehttp + llcommon ${UI_LIBRARIES} - ${DB_LIBRARIES} - ${FREETYPE_LIBRARIES} + ll::freetype ${LIBRT_LIBRARY} ) diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index 16576ddbad..21e4723e7e 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -63,12 +63,12 @@ target_link_libraries( llaudio llmath llmessage llfilesystem - vorbis::vorbis + ll::vorbis ) -if( TARGET openal::openal ) - target_link_libraries( llaudio openal::openal ) +if( TARGET ll::openal ) + target_link_libraries( llaudio ll::openal ) endif() -if( TARGET fmodstudio::fmodstudio ) - target_link_libraries( llaudio fmodstudio::fmodstudio ) +if( TARGET ll::fmodstudio ) + target_link_libraries( llaudio ll::fmodstudio ) endif() \ No newline at end of file diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 0fd2581dd4..c934d47cc9 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -13,11 +13,6 @@ include(Copy3rdPartyLibs) include(ZLIBNG) include(URIPARSER) -# add_executable(lltreeiterators lltreeiterators.cpp) -# -# target_link_libraries(lltreeiterators -# ${LLCOMMON_LIBRARIES}) - set(llcommon_SOURCE_FILES indra_constants.cpp llallocator.cpp @@ -279,14 +274,14 @@ endif(LLCOMMON_LINK_SHARED) target_link_libraries( llcommon - apr::apr - expat::expat - jsoncpp::jsoncpp - zlib-ng::zlib-ng + ll::apr + ll::expat + ll::jsoncpp + ll::zlib-ng ${WINDOWS_LIBRARIES} - boost::boost + ll::boost ${GOOGLE_PERFTOOLS_LIBRARIES} - uriparser::uriparser + ll::uriparser ) set_target_include_dirs( llcommon ${CMAKE_CURRENT_SOURCE_DIR}) @@ -310,7 +305,7 @@ if (LL_TESTS) #set(TEST_DEBUG on) set(test_libs llcommon ${WINDOWS_LIBRARIES} - googlemock::googlemock + ll::googlemock ) LL_ADD_INTEGRATION_TEST(bitpack "" "${test_libs}") LL_ADD_INTEGRATION_TEST(classic_callback "" "${test_libs}") diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index 271ddbcd2d..041c90b174 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -87,9 +87,9 @@ add_library (llcorehttp ${llcorehttp_SOURCE_FILES}) target_link_libraries( llcorehttp llcommon - libcurl::libcurl - openssl::openssl - nghttp2::nghttp2 + ll::libcurl + ll::openssl + ll::nghttp2 ) set_target_include_dirs( llcorehttp ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt index 5387a22601..7b3c1110a2 100644 --- a/indra/llimage/CMakeLists.txt +++ b/indra/llimage/CMakeLists.txt @@ -62,9 +62,8 @@ target_link_libraries(llimage llfilesystem llmath llcommon - zlib-ng::zlib-ng - libpng::libpng - jpeglib::jpeglib + ll::libpng + ll::jpeglib ) # Add tests diff --git a/indra/llimagej2coj/CMakeLists.txt b/indra/llimagej2coj/CMakeLists.txt index 6880b09025..ff7d75b709 100644 --- a/indra/llimagej2coj/CMakeLists.txt +++ b/indra/llimagej2coj/CMakeLists.txt @@ -27,6 +27,6 @@ add_library (llimagej2coj ${llimagej2coj_SOURCE_FILES}) target_link_libraries( llimagej2coj llcommon llimage - openjpeg::openjpeg + ll::openjpeg ) diff --git a/indra/llkdu/CMakeLists.txt b/indra/llkdu/CMakeLists.txt index 780951cf9d..674ad04919 100644 --- a/indra/llkdu/CMakeLists.txt +++ b/indra/llkdu/CMakeLists.txt @@ -42,7 +42,7 @@ set_source_files_properties(${llkdu_SOURCE_FILES} if (USE_KDU) add_library (llkdu ${llkdu_SOURCE_FILES}) - target_link_libraries(llkdu kdu::kdu llimage llcommon) + target_link_libraries(llkdu ll::kdu llimage llcommon) set_target_include_dirs( llkdu ${CMAKE_CURRENT_SOURCE_DIR}) # Add tests @@ -62,7 +62,7 @@ if (USE_KDU) ) get_property( llimage_include_dir TARGET llimage PROPERTY INTERFACE_INCLUDE_DIRECTORIES ) - set_property( SOURCE ${llkdu_TEST_SOURCE_FILES} PROPERTY LL_TEST_ADDITIONAL_LIBRARIES kdu::kdu llcommon) + set_property( SOURCE ${llkdu_TEST_SOURCE_FILES} PROPERTY LL_TEST_ADDITIONAL_LIBRARIES ll::kdu llcommon) set_property( SOURCE ${llkdu_TEST_SOURCE_FILES} PROPERTY LL_TEST_ADDITIONAL_INCLUDE_DIRS ${llimage_include_dir}) LL_ADD_PROJECT_UNIT_TESTS(llkdu "${llkdu_TEST_SOURCE_FILES}") diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index 6be0262b25..334a55348c 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -200,14 +200,10 @@ add_library (llmessage ${llmessage_SOURCE_FILES}) target_link_libraries( llmessage - libcurl::libcurl llcommon llfilesystem llmath - openssl::openssl - xmlrpc-epi::xmlrpc-epi llcorehttp - nghttp2::nghttp2 ) set_target_include_dirs( llmessage ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index fb81f19206..79b54c9df8 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -63,8 +63,8 @@ target_link_libraries(llprimitive llxml llcharacter llphysicsextensions - colladadom::colladadom - pcre::pcre + ll::colladadom + ll::pcre ) #add unit tests diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt index cb98886f9b..8f9089f4b7 100644 --- a/indra/llrender/CMakeLists.txt +++ b/indra/llrender/CMakeLists.txt @@ -100,8 +100,8 @@ target_link_libraries(llrender llfilesystem llxml llwindow - sdl::sdl - freetype::freetype + ll::sdl + ll::freetype OpenGL::GL OpenGL::GLU ) diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 04103b1a94..9035095d5f 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -265,14 +265,14 @@ target_link_libraries(llui llfilesystem llxml llmath - hunspell::hunspell + ll::hunspell llcommon ) # Add tests if(LL_TESTS) include(LLAddBuildTest) - set(test_libs llmessage llcorehttp llxml llrender llcommon hunspell::hunspell ${WINDOWS_LIBRARIES}) + set(test_libs llmessage llcorehttp llxml llrender llcommon ll::hunspell ${WINDOWS_LIBRARIES}) SET(llui_TEST_SOURCE_FILES llurlmatch.cpp @@ -282,7 +282,7 @@ if(LL_TESTS) # INTEGRATION TESTS if(NOT LINUX) - set(test_libs llui llmessage llcorehttp llxml llrender llcommon hunspell::hunspell ${WINDOWS_LIBRARIES}) + set(test_libs llui llmessage llcorehttp llxml llrender llcommon ll::hunspell ${WINDOWS_LIBRARIES}) LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}") endif(NOT LINUX) endif(LL_TESTS) diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index 2b5a03d219..c997bbdf59 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -174,5 +174,5 @@ endif (llwindow_HEADER_FILES) ${viewer_SOURCE_FILES} ) -target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES} sdl::sdl) +target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES} ll::sdl) set_target_include_dirs(llwindow ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt index b585dbd26e..5953cb79e8 100644 --- a/indra/llxml/CMakeLists.txt +++ b/indra/llxml/CMakeLists.txt @@ -33,7 +33,7 @@ target_link_libraries( llxml llfilesystem llmath llcommon - expat::expat + ll::expat ) set_target_include_dirs( llxml ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt index cae1c4f92b..a3c1c4ef99 100644 --- a/indra/media_plugins/libvlc/CMakeLists.txt +++ b/indra/media_plugins/libvlc/CMakeLists.txt @@ -32,7 +32,7 @@ add_library(media_plugin_libvlc target_link_libraries(media_plugin_libvlc media_plugin_base - libvlc::libvlc + ll::libvlc ) if (WINDOWS) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 9b48e5064e..2be83c9900 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1968,8 +1968,8 @@ target_link_libraries(${VIEWER_BINARY_NAME} llcorehttp llcommon ${viewer_LIBRARIES} - glod::glod - ndof::ndof + ll::glod + ll::ndof ${SMARTHEAP_LIBRARY} ${UI_LIBRARIES} ${WINDOWS_LIBRARIES} @@ -1978,18 +1978,13 @@ target_link_libraries(${VIEWER_BINARY_NAME} llappearance ${LLPHYSICS_LIBRARIES} ${LLPHYSICSEXTENSIONS_LIBRARIES} - bugsplat::bugsplat + ll::bugsplat ) -if( TARGET nvapi::nvapi ) - target_link_libraries(${VIEWER_BINARY_NAME} nvapi::nvapi ) +if( TARGET ll::nvapi ) + target_link_libraries(${VIEWER_BINARY_NAME} ll::nvapi ) endif() - -if (USE_BUGSPLAT) - -endif (USE_BUGSPLAT) - set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "Path to artwork files.") diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 6d04c3b76b..1c2961a18a 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -74,7 +74,7 @@ target_link_libraries(lltest llxml llcommon llcorehttp - googlemock::googlemock + ll::googlemock ${WINDOWS_LIBRARIES} ${DL_LIBRARY} ) -- cgit v1.2.3