From 7522cea2528f9cfdf5283a7920dd3434417b20f4 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 16:31:53 +0200 Subject: Use git for version detection fallback --- indra/cmake/BuildVersion.cmake | 44 ++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake index 157fdd07e4..b531f29ee2 100644 --- a/indra/cmake/BuildVersion.cmake +++ b/indra/cmake/BuildVersion.cmake @@ -19,33 +19,23 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n message(STATUS "Revision (from autobuild environment): ${VIEWER_VERSION_REVISION}") else (DEFINED ENV{revision}) - find_program(MERCURIAL - NAMES hg - PATHS [HKEY_LOCAL_MACHINE\\Software\\TortoiseHG] - PATH_SUFFIXES Mercurial) - mark_as_advanced(MERCURIAL) - if (MERCURIAL) - execute_process(COMMAND ${MERCURIAL} identify --num --rev tip - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - RESULT_VARIABLE hg_id_result - ERROR_VARIABLE hg_id_error - OUTPUT_VARIABLE VIEWER_VERSION_REVISION - OUTPUT_STRIP_TRAILING_WHITESPACE) - if (NOT ${hg_id_result} EQUAL 0) - message(SEND_ERROR "Revision number generation failed with output:\n${hg_id_error}") - else (NOT ${hg_id_result} EQUAL 0) - string(REGEX REPLACE "[^0-9a-f]" "" VIEWER_VERSION_REVISION ${VIEWER_VERSION_REVISION}) - endif (NOT ${hg_id_result} EQUAL 0) - if ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") - message(STATUS "Revision (from hg) ${VIEWER_VERSION_REVISION}") - else ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") - message(STATUS "Revision not set (repository not found?); using 0") - set(VIEWER_VERSION_REVISION 0 ) - endif ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") - else (MERCURIAL) - message(STATUS "Revision not set: mercurial not found; using 0") - set(VIEWER_VERSION_REVISION 0) - endif (MERCURIAL) + find_program(GIT git) + if (DEFINED GIT ) + execute_process( + COMMAND ${GIT} rev-list --count HEAD + OUTPUT_VARIABLE VIEWER_VERSION_REVISION + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") + message(STATUS "Revision (from git) ${VIEWER_VERSION_REVISION}") + else ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") + message(STATUS "Revision not set (repository not found?); using 0") + set(VIEWER_VERSION_REVISION 0 ) + endif ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$") + else (DEFINED GIT ) + message(STATUS "Revision not set: 'git' found; using 0") + set(VIEWER_VERSION_REVISION 0) + endif (DEFINED GIT) endif (DEFINED ENV{revision}) message(STATUS "Building '${VIEWER_CHANNEL}' Version ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}") else ( EXISTS ${VIEWER_VERSION_BASE_FILE} ) -- cgit v1.2.3 From 786b291d9c6b784c7ce6ceef0e38a4ec76ea14db Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 16:32:52 +0200 Subject: 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. --- indra/cmake/00-Common.cmake | 25 +-- indra/cmake/APR.cmake | 51 +++-- indra/cmake/Atmosphere.cmake | 5 - indra/cmake/Audio.cmake | 33 +--- indra/cmake/Boost.cmake | 103 +++------- indra/cmake/CEFPlugin.cmake | 13 +- indra/cmake/CMakeLists.txt | 17 +- indra/cmake/CURL.cmake | 14 +- indra/cmake/EXPAT.cmake | 12 +- indra/cmake/FMODSTUDIO.cmake | 26 +-- indra/cmake/FreeType.cmake | 10 +- indra/cmake/GLOD.cmake | 11 +- indra/cmake/Hunspell.cmake | 14 +- indra/cmake/JPEG.cmake | 15 +- indra/cmake/JsonCpp.cmake | 17 +- indra/cmake/LLAddBuildTest.cmake | 38 ++-- indra/cmake/LLAppearance.cmake | 12 -- indra/cmake/LLAudio.cmake | 7 - indra/cmake/LLCharacter.cmake | 7 - indra/cmake/LLCommon.cmake | 35 +--- indra/cmake/LLCoreHttp.cmake | 14 +- indra/cmake/LLCrashLogger.cmake | 7 - indra/cmake/LLFileSystem.cmake | 7 - indra/cmake/LLImage.cmake | 9 +- indra/cmake/LLImageJ2COJ.cmake | 5 - indra/cmake/LLInventory.cmake | 7 - indra/cmake/LLKDU.cmake | 18 +- indra/cmake/LLLogin.cmake | 7 - indra/cmake/LLMessage.cmake | 13 -- indra/cmake/LLPhysicsExtensions.cmake | 16 +- indra/cmake/LLPlugin.cmake | 14 -- indra/cmake/LLPrimitive.cmake | 66 +++---- indra/cmake/LLRender.cmake | 20 -- indra/cmake/LLUI.cmake | 7 - indra/cmake/LLWindow.cmake | 12 -- indra/cmake/LLXML.cmake | 14 -- indra/cmake/LibVLCPlugin.cmake | 17 +- indra/cmake/MediaPluginBase.cmake | 8 - indra/cmake/NDOF.cmake | 14 +- indra/cmake/NGHTTP2.cmake | 16 +- indra/cmake/NVAPI.cmake | 3 +- indra/cmake/OPENAL.cmake | 12 +- indra/cmake/OpenJPEG.cmake | 18 +- indra/cmake/OpenSSL.cmake | 21 +-- indra/cmake/PNG.cmake | 26 +-- indra/cmake/Prebuilt.cmake | 11 ++ indra/cmake/URIPARSER.cmake | 29 +-- indra/cmake/XmlRpcEpi.cmake | 17 +- indra/cmake/ZLIBNG.cmake | 33 +--- indra/cmake/bugsplat.cmake | 10 +- indra/llappearance/CMakeLists.txt | 64 +++---- indra/llaudio/CMakeLists.txt | 48 ++--- indra/llcharacter/CMakeLists.txt | 29 +-- indra/llcommon/CMakeLists.txt | 37 ++-- indra/llcommon/stringize.h | 2 +- indra/llcorehttp/CMakeLists.txt | 53 ++---- indra/llcrashlogger/CMakeLists.txt | 19 +- indra/llfilesystem/CMakeLists.txt | 11 +- indra/llimage/CMakeLists.txt | 30 +-- indra/llimagej2coj/CMakeLists.txt | 13 +- indra/llinventory/CMakeLists.txt | 16 +- indra/llkdu/CMakeLists.txt | 18 +- indra/llmath/CMakeLists.txt | 13 +- indra/llmessage/CMakeLists.txt | 92 +++------ indra/llplugin/CMakeLists.txt | 22 +-- indra/llplugin/slplugin/CMakeLists.txt | 19 +- indra/llprimitive/CMakeLists.txt | 42 ++--- indra/llrender/CMakeLists.txt | 56 ++---- indra/llui/CMakeLists.txt | 59 ++---- indra/llwindow/CMakeLists.txt | 38 ++-- indra/llxml/CMakeLists.txt | 32 ++-- indra/media_plugins/base/CMakeLists.txt | 20 +- indra/media_plugins/cef/CMakeLists.txt | 30 +-- indra/media_plugins/example/CMakeLists.txt | 35 +--- indra/media_plugins/gstreamer010/CMakeLists.txt | 30 +-- indra/media_plugins/libvlc/CMakeLists.txt | 43 +---- indra/newview/CMakeLists.txt | 238 +++++++----------------- indra/test/CMakeLists.txt | 38 ++-- indra/viewer_components/login/CMakeLists.txt | 31 +-- 79 files changed, 626 insertions(+), 1488 deletions(-) delete mode 100644 indra/cmake/Atmosphere.cmake delete mode 100644 indra/cmake/LLCharacter.cmake delete mode 100644 indra/cmake/LLCrashLogger.cmake delete mode 100644 indra/cmake/LLFileSystem.cmake delete mode 100644 indra/cmake/LLImageJ2COJ.cmake delete mode 100644 indra/cmake/LLInventory.cmake delete mode 100644 indra/cmake/LLLogin.cmake delete mode 100644 indra/cmake/LLMessage.cmake delete mode 100644 indra/cmake/LLPlugin.cmake delete mode 100644 indra/cmake/LLRender.cmake delete mode 100644 indra/cmake/LLUI.cmake delete mode 100644 indra/cmake/LLXML.cmake delete mode 100644 indra/cmake/MediaPluginBase.cmake diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 0ab7fa2456..45c81b1b30 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -70,12 +70,6 @@ if (WINDOWS) if( ADDRESS_SIZE EQUAL 32 ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /p:PreferredToolArchitecture=x64") endif() - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO - "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Zo" - CACHE STRING "C++ compiler release-with-debug options" FORCE) - set(CMAKE_CXX_FLAGS_RELEASE - "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /Zo" - CACHE STRING "C++ compiler release options" FORCE) # zlib has assembly-language object files incompatible with SAFESEH set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE /SAFESEH:NO /NODEFAULTLIB:LIBCMT /IGNORE:4099") @@ -87,15 +81,16 @@ if (WINDOWS) # /DDOM_DYNAMIC # For shared library colladadom ) add_compile_options( - /GS - /TP - /W3 - /c - /Zc:forScope - /nologo - /Oy- -# /arch:SSE2 - /fp:fast + + /Zo + /GS + /TP + /W3 + /c + /Zc:forScope + /nologo + /Oy- + /fp:fast ) # Nicky: x64 implies SSE2 diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index 9b64bc6160..5a7c504af8 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -1,11 +1,11 @@ include(Linking) include(Prebuilt) -set(APR_FIND_QUIETLY ON) -set(APR_FIND_REQUIRED ON) +if( TARGET apr::apr ) + return() +endif() -set(APRUTIL_FIND_QUIETLY ON) -set(APRUTIL_FIND_REQUIRED ON) +create_target( apr::apr) if (USESYSTEMLIBS) include(FindAPR) @@ -17,18 +17,11 @@ else (USESYSTEMLIBS) else (LLCOMMON_LINK_SHARED) set(APR_selector "") endif (LLCOMMON_LINK_SHARED) - set(APR_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}apr-1.lib - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib - ) - set(APRICONV_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}apriconv-1.lib - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apriconv-1.lib - ) - set(APRUTIL_LIBRARIES - debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}aprutil-1.lib ${APRICONV_LIBRARIES} - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib ${APRICONV_LIBRARIES} - ) + set_target_libraries( apr::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 + ) elseif (DARWIN) if (LLCOMMON_LINK_SHARED) set(APR_selector "0.dylib") @@ -37,18 +30,20 @@ else (USESYSTEMLIBS) set(APR_selector "a") set(APRUTIL_selector "a") endif (LLCOMMON_LINK_SHARED) - set(APR_LIBRARIES libapr-1.${APR_selector}) - set(APRUTIL_LIBRARIES libaprutil-1.${APRUTIL_selector}) - set(APRICONV_LIBRARIES iconv) + + set_target_libraries( apr::apr + libapr-1.${APR_selector} + libaprutil-1.${APRUTIL_selector} + iconv + ) else (WINDOWS) - set(APR_LIBRARIES apr-1) - set(APRUTIL_LIBRARIES aprutil-1) - set(APRICONV_LIBRARIES iconv) + set_target_libraries( apr::apr + apr-1 + aprutil-1 + iconv + uuid + rt + ) endif (WINDOWS) - set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/apr-1) - - if (LINUX) - list(APPEND APRUTIL_LIBRARIES uuid) - list(APPEND APRUTIL_LIBRARIES rt) - endif (LINUX) + set_target_include_dirs( apr::apr ${LIBS_PREBUILT_DIR}/include/apr-1 ) endif (USESYSTEMLIBS) diff --git a/indra/cmake/Atmosphere.cmake b/indra/cmake/Atmosphere.cmake deleted file mode 100644 index 9c14df2a11..0000000000 --- a/indra/cmake/Atmosphere.cmake +++ /dev/null @@ -1,5 +0,0 @@ -# -*- cmake -*- -include(Prebuilt) -use_prebuilt_binary(libatmosphere) -set(LIBATMOSPHERE_LIBRARIES atmosphere) -set(LIBATMOSPHERE_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/atmosphere) diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake index f95439245a..bc11e62de5 100644 --- a/indra/cmake/Audio.cmake +++ b/indra/cmake/Audio.cmake @@ -1,6 +1,11 @@ # -*- cmake -*- include(Prebuilt) +if(TARGET vorbis::vorbis) + return() +endif() +create_target(vorbis::vorbis) + if (USESYSTEMLIBS) include(FindPkgConfig) pkg_check_modules(OGG REQUIRED ogg) @@ -9,34 +14,12 @@ if (USESYSTEMLIBS) pkg_check_modules(VORBISFILE REQUIRED vorbisfile) else (USESYSTEMLIBS) use_prebuilt_binary(ogg_vorbis) - set(VORBIS_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) - set(VORBISENC_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS}) - set(VORBISFILE_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS}) + set_target_include_dirs( vorbis::vorbis ${LIBS_PREBUILT_DIR}/include ) if (WINDOWS) - set(OGG_LIBRARIES - optimized ogg_static - debug ogg_static_d) - set(VORBIS_LIBRARIES - optimized vorbis_static - debug vorbis_static_d) - set(VORBISENC_LIBRARIES - optimized vorbisenc_static - debug vorbisenc_static_d) - set(VORBISFILE_LIBRARIES - optimized vorbisfile_static - debug vorbisfile_static_d) + set_target_libraries(vorbis::vorbis ogg_static vorbis_static vorbisenc_static vorbisfile_static ) else (WINDOWS) - set(OGG_LIBRARIES ogg) - set(VORBIS_LIBRARIES vorbis) - set(VORBISENC_LIBRARIES vorbisenc) - set(VORBISFILE_LIBRARIES vorbisfile) + set_target_libraries(vorbis::vorbis ogg vorbis vorbisenc vorbisfile ) endif (WINDOWS) endif (USESYSTEMLIBS) -link_directories( - ${VORBIS_LIBRARY_DIRS} - ${VORBISENC_LIBRARY_DIRS} - ${VORBISFILE_LIBRARY_DIRS} - ${OGG_LIBRARY_DIRS} - ) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 0a61e33532..00bfedfb71 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -1,6 +1,11 @@ # -*- cmake -*- include(Prebuilt) +if( TARGET boost::boost ) + return() +endif() +create_target( boost::boost ) + set(Boost_FIND_QUIETLY ON) set(Boost_FIND_REQUIRED ON) @@ -24,80 +29,34 @@ else (USESYSTEMLIBS) set(addrsfx "-x${ADDRESS_SIZE}") if (WINDOWS) - set(BOOST_CONTEXT_LIBRARY - optimized libboost_context-mt${addrsfx} - debug libboost_context-mt${addrsfx}-gd) - set(BOOST_FIBER_LIBRARY - optimized libboost_fiber-mt${addrsfx} - debug libboost_fiber-mt${addrsfx}-gd) - set(BOOST_FILESYSTEM_LIBRARY - optimized libboost_filesystem-mt${addrsfx} - debug libboost_filesystem-mt${addrsfx}-gd) - set(BOOST_PROGRAM_OPTIONS_LIBRARY - optimized libboost_program_options-mt${addrsfx} - debug libboost_program_options-mt${addrsfx}-gd) - set(BOOST_REGEX_LIBRARY - optimized libboost_regex-mt${addrsfx} - debug libboost_regex-mt${addrsfx}-gd) - set(BOOST_SIGNALS_LIBRARY - optimized libboost_signals-mt${addrsfx} - debug libboost_signals-mt${addrsfx}-gd) - set(BOOST_SYSTEM_LIBRARY - optimized libboost_system-mt${addrsfx} - debug libboost_system-mt${addrsfx}-gd) - set(BOOST_THREAD_LIBRARY - optimized libboost_thread-mt${addrsfx} - debug libboost_thread-mt${addrsfx}-gd) + set_target_libraries( boost::boost + libboost_context-mt${addrsfx} + libboost_fiber-mt${addrsfx} + libboost_filesystem-mt${addrsfx} + libboost_program_options-mt${addrsfx} + libboost_regex-mt${addrsfx} + libboost_system-mt${addrsfx} + libboost_thread-mt${addrsfx}) elseif (LINUX) - set(BOOST_CONTEXT_LIBRARY - optimized boost_context-mt${addrsfx} - debug boost_context-mt${addrsfx}-d) - set(BOOST_FIBER_LIBRARY - optimized boost_fiber-mt${addrsfx} - debug boost_fiber-mt${addrsfx}-d) - set(BOOST_FILESYSTEM_LIBRARY - optimized boost_filesystem-mt${addrsfx} - debug boost_filesystem-mt${addrsfx}-d) - set(BOOST_PROGRAM_OPTIONS_LIBRARY - optimized boost_program_options-mt${addrsfx} - debug boost_program_options-mt${addrsfx}-d) - set(BOOST_REGEX_LIBRARY - optimized boost_regex-mt${addrsfx} - debug boost_regex-mt${addrsfx}-d) - set(BOOST_SIGNALS_LIBRARY - optimized boost_signals-mt${addrsfx} - debug boost_signals-mt${addrsfx}-d) - set(BOOST_SYSTEM_LIBRARY - optimized boost_system-mt${addrsfx} - debug boost_system-mt${addrsfx}-d) - set(BOOST_THREAD_LIBRARY - optimized boost_thread-mt${addrsfx} - debug boost_thread-mt${addrsfx}-d) + set_target_libraries( boost::boost + boost_context-mt${addrsfx} + boost_fiber-mt${addrsfx} + boost_filesystem-mt${addrsfx} + boost_program_options-mt${addrsfx} + boost_regex-mt${addrsfx} + boost_signals-mt${addrsfx} + boost_system-mt${addrsfx} + boost_thread-mt${addrsfx}) elseif (DARWIN) - set(BOOST_CONTEXT_LIBRARY - optimized boost_context-mt${addrsfx} - debug boost_context-mt${addrsfx}-d) - set(BOOST_FIBER_LIBRARY - optimized boost_fiber-mt${addrsfx} - debug boost_fiber-mt${addrsfx}-d) - set(BOOST_FILESYSTEM_LIBRARY - optimized boost_filesystem-mt${addrsfx} - debug boost_filesystem-mt${addrsfx}-d) - set(BOOST_PROGRAM_OPTIONS_LIBRARY - optimized boost_program_options-mt${addrsfx} - debug boost_program_options-mt${addrsfx}-d) - set(BOOST_REGEX_LIBRARY - optimized boost_regex-mt${addrsfx} - debug boost_regex-mt${addrsfx}-d) - set(BOOST_SIGNALS_LIBRARY - optimized boost_signals-mt${addrsfx} - debug boost_signals-mt${addrsfx}-d) - set(BOOST_SYSTEM_LIBRARY - optimized boost_system-mt${addrsfx} - debug boost_system-mt${addrsfx}-d) - set(BOOST_THREAD_LIBRARY - optimized boost_thread-mt${addrsfx} - debug boost_thread-mt${addrsfx}-d) + set_target_libraries( boost::boost + boost_context-mt${addrsfx} + boost_fiber-mt${addrsfx} + boost_filesystem-mt${addrsfx} + boost_program_options-mt${addrsfx} + boost_regex-mt${addrsfx} + boost_signals-mt${addrsfx} + boost_system-mt${addrsfx} + boost_thread-mt${addrsfx}) endif (WINDOWS) endif (USESYSTEMLIBS) diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 7d8bfb1b0f..706730b226 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -2,18 +2,21 @@ include(Linking) include(Prebuilt) +if(TARGET cef::cef) + return() +endif() +create_target( cef::cef ) + if (USESYSTEMLIBS) set(CEFPLUGIN OFF CACHE BOOL "CEFPLUGIN support for the llplugin/llmedia test apps.") else (USESYSTEMLIBS) use_prebuilt_binary(dullahan) - set(CEFPLUGIN ON CACHE BOOL - "CEFPLUGIN support for the llplugin/llmedia test apps.") - set(CEF_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/cef) + set_target_include_dirs( cef::cef ${LIBS_PREBUILT_DIR}/include/cef) endif (USESYSTEMLIBS) if (WINDOWS) - set(CEF_PLUGIN_LIBRARIES + set_target_libraries( cef::cef libcef.lib libcef_dll_wrapper.lib dullahan.lib @@ -29,7 +32,7 @@ elseif (DARWIN) message(FATAL_ERROR "CEF not found") endif() - set(CEF_PLUGIN_LIBRARIES + set_target_libraries( cef::cef ${ARCH_PREBUILT_DIRS_RELEASE}/libcef_dll_wrapper.a ${ARCH_PREBUILT_DIRS_RELEASE}/libdullahan.a ${APPKIT_LIBRARY} diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 6778e90ca8..812e35390f 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -39,37 +39,22 @@ set(cmake_SOURCE_FILES GLEXT.cmake GLH.cmake GLOD.cmake -## GStreamer010Plugin.cmake GoogleMock.cmake Havok.cmake Hunspell.cmake - JPEG.cmake - JsonCpp.cmake + JsonCpp.cmake LLAddBuildTest.cmake LLAppearance.cmake LLAudio.cmake - LLCharacter.cmake LLCommon.cmake - LLCrashLogger.cmake LLImage.cmake - LLImageJ2COJ.cmake - LLInventory.cmake LLKDU.cmake - LLLogin.cmake - LLMath.cmake - LLMessage.cmake LLPhysicsExtensions.cmake - LLPlugin.cmake LLPrimitive.cmake - LLRender.cmake LLSharedLibs.cmake LLTestCommand.cmake - LLUI.cmake - LLFileSystem.cmake LLWindow.cmake - LLXML.cmake Linking.cmake - MediaPluginBase.cmake NDOF.cmake OPENAL.cmake OpenGL.cmake diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index 04afae594d..d91eb2e2fd 100644 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -1,19 +1,19 @@ # -*- cmake -*- include(Prebuilt) -set(CURL_FIND_QUIETLY ON) -set(CURL_FIND_REQUIRED ON) +if( TARGET libcurl::libcurl ) + return() +endif() +create_target(libcurl::libcurl) if (USESYSTEMLIBS) include(FindCURL) else (USESYSTEMLIBS) use_prebuilt_binary(curl) if (WINDOWS) - set(CURL_LIBRARIES - debug libcurld.lib - optimized libcurl.lib) + set_target_libraries(libcurl::libcurl libcurl.lib) else (WINDOWS) - set(CURL_LIBRARIES libcurl.a) + set_target_libraries(libcurl::libcurl libcurl.a) endif (WINDOWS) - set(CURL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) + set_target_include_dirs( libcurl::libcurl ${LIBS_PREBUILT_DIR}/include) endif (USESYSTEMLIBS) diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake index cddc71b227..6f6503ca4d 100644 --- a/indra/cmake/EXPAT.cmake +++ b/indra/cmake/EXPAT.cmake @@ -1,23 +1,25 @@ # -*- cmake -*- include(Prebuilt) -set(EXPAT_FIND_QUIETLY ON) -set(EXPAT_FIND_REQUIRED ON) +if( TARGET expat::expat ) + return() +endif() +create_target( expat::expat INTERFACE IMPORTED ) if (USESYSTEMLIBS) include(FindEXPAT) else (USESYSTEMLIBS) use_prebuilt_binary(expat) if (WINDOWS) - set(EXPAT_LIBRARIES libexpatMT) + set_target_libraries( expat::expat libexpatMT ) set(EXPAT_COPY libexpatMT.dll) else (WINDOWS) - set(EXPAT_LIBRARIES expat) + set_target_libraries( expat::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(EXPAT_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) + set_target_include_dirs( expat::expat ${LIBS_PREBUILT_DIR}/include ) endif (USESYSTEMLIBS) 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) diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake index a36485f6d0..66f4ae0140 100644 --- a/indra/cmake/FreeType.cmake +++ b/indra/cmake/FreeType.cmake @@ -1,14 +1,18 @@ # -*- cmake -*- include(Prebuilt) +if( TARGET freetype::freetype ) + return() +endif() +create_target( freetype::freetype) + if (USESYSTEMLIBS) include(FindPkgConfig) pkg_check_modules(FREETYPE REQUIRED freetype2) else (USESYSTEMLIBS) use_prebuilt_binary(freetype) - set(FREETYPE_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/freetype2/) - set(FREETYPE_LIBRARIES freetype) + set_target_include_dirs( freetype::freetype ${LIBS_PREBUILT_DIR}/include/freetype2/) + set_target_libraries( freetype::freetype freetype ) endif (USESYSTEMLIBS) -link_directories(${FREETYPE_LIBRARY_DIRS}) diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake index 6f42b44ab8..8d41db4ea3 100644 --- a/indra/cmake/GLOD.cmake +++ b/indra/cmake/GLOD.cmake @@ -1,11 +1,18 @@ # -*- cmake -*- include(Prebuilt) +if( TARGET glod::glod ) + return() +endif() +create_target( glod::glod ) + if (NOT USESYSTEMLIBS) use_prebuilt_binary(glod) endif (NOT USESYSTEMLIBS) + + set(GLODLIB ON CACHE BOOL "Using GLOD library") -set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) -set(GLOD_LIBRARIES GLOD) +set_target_include_dirs( glod::glod ${LIBS_PREBUILT_DIR}/include) +set_target_libraries( glod::glod GLOD ) diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake index 06227b3fe2..970b06b81f 100644 --- a/indra/cmake/Hunspell.cmake +++ b/indra/cmake/Hunspell.cmake @@ -1,22 +1,24 @@ # -*- cmake -*- include(Prebuilt) -set(HUNSPELL_FIND_QUIETLY ON) -set(HUNSPELL_FIND_REQUIRED ON) +if( TARGET hunspell::hunspell ) + return() +endif() +create_target( hunspell::hunspell ) if (USESYSTEMLIBS) include(FindHUNSPELL) else (USESYSTEMLIBS) use_prebuilt_binary(libhunspell) if (WINDOWS) - set(HUNSPELL_LIBRARY libhunspell) + set_target_libraries( hunspell::hunspell libhunspell) elseif(DARWIN) - set(HUNSPELL_LIBRARY hunspell-1.3) + set_target_libraries( hunspell::hunspell hunspell-1.3) elseif(LINUX) - set(HUNSPELL_LIBRARY hunspell-1.3) + set_target_libraries( hunspell::hunspell hunspell-1.3) else() message(FATAL_ERROR "Invalid platform") endif() - set(HUNSPELL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/hunspell) + set_target_include_dirs( hunspell::hunspell ${LIBS_PREBUILT_DIR}/include/hunspell) use_prebuilt_binary(dictionaries) endif (USESYSTEMLIBS) diff --git a/indra/cmake/JPEG.cmake b/indra/cmake/JPEG.cmake index d6da22aecc..7245ca7b36 100644 --- a/indra/cmake/JPEG.cmake +++ b/indra/cmake/JPEG.cmake @@ -2,19 +2,22 @@ include(Prebuilt) include(Linking) -set(JPEG_FIND_QUIETLY ON) -set(JPEG_FIND_REQUIRED ON) + +if( TARGET jpeglib::jpeglib ) + return() +endif() +create_target(jpeglib::jpeglib) if (USESYSTEMLIBS) include(FindJPEG) else (USESYSTEMLIBS) use_prebuilt_binary(jpeglib) if (LINUX) - set(JPEG_LIBRARIES jpeg) + set_target_libraries( jpeglib::jpeglib jpeg) elseif (DARWIN) - set(JPEG_LIBRARIES jpeg) + set_target_libraries( jpeglib::jpeglib jpeg) elseif (WINDOWS) - set(JPEG_LIBRARIES jpeglib) + set_target_libraries( jpeglib::jpeglib jpeglib) endif (LINUX) - set(JPEG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) + set_target_include_dirs( jpeglib::jpeglib ${LIBS_PREBUILT_DIR}/include) endif (USESYSTEMLIBS) diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake index 079619adf8..14bfd32b6b 100644 --- a/indra/cmake/JsonCpp.cmake +++ b/indra/cmake/JsonCpp.cmake @@ -1,22 +1,21 @@ # -*- cmake -*- include(Prebuilt) - -set(JSONCPP_FIND_QUIETLY ON) -set(JSONCPP_FIND_REQUIRED ON) +if( TARGET jsoncpp::jsoncpp ) + return() +endif() +create_target( jsoncpp::jsoncpp) if (USESYSTEMLIBS) include(FindJsonCpp) else (USESYSTEMLIBS) use_prebuilt_binary(jsoncpp) if (WINDOWS) - set(JSONCPP_LIBRARIES - debug json_libmdd.lib - optimized json_libmd.lib) + set_target_libraries( jsoncpp::jsoncpp json_libmd.lib ) elseif (DARWIN) - set(JSONCPP_LIBRARIES libjson_darwin_libmt.a) + set_target_libraries( jsoncpp::jsoncpp libjson_darwin_libmt.a ) elseif (LINUX) - set(JSONCPP_LIBRARIES libjson_linux-gcc-4.1.3_libmt.a) + set_target_libraries( jsoncpp::jsoncpp libjson_linux-gcc-4.1.3_libmt.a ) endif (WINDOWS) - set(JSONCPP_INCLUDE_DIR "${LIBS_PREBUILT_DIR}/include/jsoncpp" "${LIBS_PREBUILT_DIR}/include/json") + set_target_include_dirs( jsoncpp::jsoncpp ${LIBS_PREBUILT_DIR}/include/json) endif (USESYSTEMLIBS) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 4937c2a9d7..6860b1f316 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -36,30 +36,29 @@ INCLUDE(GoogleMock) ) SET(alltest_DEP_TARGETS # needed by the test harness itself - ${APRUTIL_LIBRARIES} - ${APR_LIBRARIES} llcommon ) + + SET(alltest_INCLUDE_DIRS + ${LIBS_OPEN_DIR}/test + ${GOOGLEMOCK_INCLUDE_DIRS} + ) + SET(alltest_LIBRARIES + llcommon + ${GOOGLEMOCK_LIBRARIES} + ${PTHREAD_LIBRARY} + ${WINDOWS_LIBRARIES} + ) IF(NOT "${project}" STREQUAL "llmath") # add llmath as a dep unless the tested module *is* llmath! LIST(APPEND alltest_DEP_TARGETS - llmath - ) + llmath + ) + LIST(APPEND alltest_LIBRARIES + llmath + ) ENDIF(NOT "${project}" STREQUAL "llmath") - SET(alltest_INCLUDE_DIRS - ${LLMATH_INCLUDE_DIRS} - ${LLCOMMON_INCLUDE_DIRS} - ${LIBS_OPEN_DIR}/test - ${GOOGLEMOCK_INCLUDE_DIRS} - ) - SET(alltest_LIBRARIES - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} - ${GOOGLEMOCK_LIBRARIES} - ${PTHREAD_LIBRARY} - ${WINDOWS_LIBRARIES} - ) + # Headers, for convenience in targets. SET(alltest_HEADER_FILES ${CMAKE_SOURCE_DIR}/test/test.h @@ -126,7 +125,8 @@ INCLUDE(GoogleMock) MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_LIBRARIES ${${name}_test_additional_LIBRARIES}") ENDIF(LL_TEST_VERBOSE) # Add to project - TARGET_LINK_LIBRARIES(PROJECT_${project}_TEST_${name} ${alltest_LIBRARIES} ${alltest_DEP_TARGETS} ${${name}_test_additional_PROJECTS} ${${name}_test_additional_LIBRARIES} ) + TARGET_LINK_LIBRARIES(PROJECT_${project}_TEST_${name} ${alltest_LIBRARIES} ${${name}_test_additional_PROJECTS} ${${name}_test_additional_LIBRARIES} ) + add_dependencies( PROJECT_${project}_TEST_${name} ${alltest_DEP_TARGETS}) # Compile-time Definitions GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_CFLAGS ${source} LL_TEST_ADDITIONAL_CFLAGS) SET_TARGET_PROPERTIES(PROJECT_${project}_TEST_${name} diff --git a/indra/cmake/LLAppearance.cmake b/indra/cmake/LLAppearance.cmake index 675330ec72..99399d349a 100644 --- a/indra/cmake/LLAppearance.cmake +++ b/indra/cmake/LLAppearance.cmake @@ -2,26 +2,14 @@ include(Variables) include(Boost) -include(LLMessage) include(LLCoreHttp) -set(LLAPPEARANCE_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/llappearance - ) - if (BUILD_HEADLESS) set(LLAPPEARANCE_HEADLESS_LIBRARIES llappearanceheadless ) endif (BUILD_HEADLESS) -set(LLAPPEARANCE_LIBRARIES llappearance - llmessage - llcorehttp - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} - ) diff --git a/indra/cmake/LLAudio.cmake b/indra/cmake/LLAudio.cmake index 7c248dfc72..c842c69bfe 100644 --- a/indra/cmake/LLAudio.cmake +++ b/indra/cmake/LLAudio.cmake @@ -1,10 +1,3 @@ # -*- cmake -*- include(Audio) - -set(LLAUDIO_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/llaudio - ) - -# be exhaustive here -set(LLAUDIO_LIBRARIES llaudio ${VORBISFILE_LIBRARIES} ${VORBIS_LIBRARIES} ${VORBISENC_LIBRARIES} ${OGG_LIBRARIES} ${OPENAL_LIBRARIES}) diff --git a/indra/cmake/LLCharacter.cmake b/indra/cmake/LLCharacter.cmake deleted file mode 100644 index 9b2f5c4956..0000000000 --- a/indra/cmake/LLCharacter.cmake +++ /dev/null @@ -1,7 +0,0 @@ -# -*- cmake -*- - -set(LLCHARACTER_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/llcharacter - ) - -set(LLCHARACTER_LIBRARIES llcharacter) diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake index 9c8740793a..6d2468695f 100644 --- a/indra/cmake/LLCommon.cmake +++ b/indra/cmake/LLCommon.cmake @@ -4,36 +4,5 @@ include(APR) include(Boost) include(EXPAT) include(ZLIBNG) - -set(LLCOMMON_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/llcommon - ${APRUTIL_INCLUDE_DIR} - ${APR_INCLUDE_DIR} - ) -set(LLCOMMON_SYSTEM_INCLUDE_DIRS - ${Boost_INCLUDE_DIRS} - ) - -if (LINUX) - # In order to support using ld.gold on linux, we need to explicitely - # specify all libraries that llcommon uses. - # llcommon uses `clock_gettime' which is provided by librt on linux. - set(LLCOMMON_LIBRARIES llcommon - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_THREAD_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} - rt - ) -else (LINUX) - set(LLCOMMON_LIBRARIES llcommon - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_THREAD_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} ) -endif (LINUX) - -set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a static library.") -if(LLCOMMON_LINK_SHARED) - add_definitions(-DLL_COMMON_LINK_SHARED=1) -endif(LLCOMMON_LINK_SHARED) +include(JsonCpp) +include(XmlRpcEpi) \ No newline at end of file diff --git a/indra/cmake/LLCoreHttp.cmake b/indra/cmake/LLCoreHttp.cmake index 613453ab5d..a166c96043 100644 --- a/indra/cmake/LLCoreHttp.cmake +++ b/indra/cmake/LLCoreHttp.cmake @@ -2,16 +2,4 @@ include(CURL) include(OpenSSL) -include(Boost) - -set(LLCOREHTTP_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/llcorehttp - ${CURL_INCLUDE_DIRS} - ${OPENSSL_INCLUDE_DIRS} - ${BOOST_INCLUDE_DIRS} - ) - -set(LLCOREHTTP_LIBRARIES llcorehttp - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_SYSTEM_LIBRARY}) +include(NGHTTP2) \ No newline at end of file diff --git a/indra/cmake/LLCrashLogger.cmake b/indra/cmake/LLCrashLogger.cmake deleted file mode 100644 index f2cb83eb8b..0000000000 --- a/indra/cmake/LLCrashLogger.cmake +++ /dev/null @@ -1,7 +0,0 @@ -# -*- cmake -*- - -set(LLCRASHLOGGER_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/llcrashlogger - ) - -set(LLCRASHLOGGER_LIBRARIES llcrashlogger) diff --git a/indra/cmake/LLFileSystem.cmake b/indra/cmake/LLFileSystem.cmake deleted file mode 100644 index 2e6c42c30c..0000000000 --- a/indra/cmake/LLFileSystem.cmake +++ /dev/null @@ -1,7 +0,0 @@ -# -*- cmake -*- - -set(LLFILESYSTEM_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/llfilesystem - ) - -set(LLFILESYSTEM_LIBRARIES llfilesystem) diff --git a/indra/cmake/LLImage.cmake b/indra/cmake/LLImage.cmake index ec3da89081..8e0b44dfe4 100644 --- a/indra/cmake/LLImage.cmake +++ b/indra/cmake/LLImage.cmake @@ -1,11 +1,4 @@ # -*- cmake -*- -include(JPEG) +#include(JPEG) include(PNG) - -set(LLIMAGE_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/llimage - ${JPEG_INCLUDE_DIRS} - ) - -set(LLIMAGE_LIBRARIES llimage) diff --git a/indra/cmake/LLImageJ2COJ.cmake b/indra/cmake/LLImageJ2COJ.cmake deleted file mode 100644 index 1bcf205f2d..0000000000 --- a/indra/cmake/LLImageJ2COJ.cmake +++ /dev/null @@ -1,5 +0,0 @@ -# -*- cmake -*- - -include(OpenJPEG) - -set(LLIMAGEJ2COJ_LIBRARIES llimagej2coj) diff --git a/indra/cmake/LLInventory.cmake b/indra/cmake/LLInventory.cmake deleted file mode 100644 index c3dc077a2b..0000000000 --- a/indra/cmake/LLInventory.cmake +++ /dev/null @@ -1,7 +0,0 @@ -# -*- cmake -*- - -set(LLINVENTORY_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/llinventory - ) - -set(LLINVENTORY_LIBRARIES llinventory) diff --git a/indra/cmake/LLKDU.cmake b/indra/cmake/LLKDU.cmake index e478b01f84..25762ab066 100644 --- a/indra/cmake/LLKDU.cmake +++ b/indra/cmake/LLKDU.cmake @@ -7,15 +7,23 @@ 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 ) + if (USE_KDU) include(Prebuilt) use_prebuilt_binary(kdu) if (WINDOWS) - set(KDU_LIBRARY kdu.lib) + set_target_libraries( kdu::kdu kdu.lib) else (WINDOWS) - set(KDU_LIBRARY libkdu.a) + set_target_libraries( kdu::kdu libkdu.a) endif (WINDOWS) - set(KDU_INCLUDE_DIR ${AUTOBUILD_INSTALL_DIR}/include/kdu) - set(LLKDU_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llkdu) - set(LLKDU_LIBRARIES llkdu) + set_target_libraries( kdu::kdu kdu.lib) + + set_target_include_dirs( kdu::kdu + ${AUTOBUILD_INSTALL_DIR}/include/kdu + ${LIBS_OPEN_DIR}/llkdu + ) endif (USE_KDU) diff --git a/indra/cmake/LLLogin.cmake b/indra/cmake/LLLogin.cmake deleted file mode 100644 index 47d171876a..0000000000 --- a/indra/cmake/LLLogin.cmake +++ /dev/null @@ -1,7 +0,0 @@ -# -*- cmake -*- - -set(LLLOGIN_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/viewer_components/login - ) - -set(LLLOGIN_LIBRARIES lllogin) diff --git a/indra/cmake/LLMessage.cmake b/indra/cmake/LLMessage.cmake deleted file mode 100644 index 7be53ec0ec..0000000000 --- a/indra/cmake/LLMessage.cmake +++ /dev/null @@ -1,13 +0,0 @@ -# -*- cmake -*- - -include(CURL) -include(OpenSSL) -include(XmlRpcEpi) - -set(LLMESSAGE_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/llmessage - ${CURL_INCLUDE_DIRS} - ${OPENSSL_INCLUDE_DIRS} - ) - -set(LLMESSAGE_LIBRARIES llmessage) diff --git a/indra/cmake/LLPhysicsExtensions.cmake b/indra/cmake/LLPhysicsExtensions.cmake index e6afee762e..c46a04129a 100644 --- a/indra/cmake/LLPhysicsExtensions.cmake +++ b/indra/cmake/LLPhysicsExtensions.cmake @@ -10,6 +10,11 @@ if (INSTALL_PROPRIETARY) set(HAVOK ON CACHE BOOL "Use Havok physics library") endif (INSTALL_PROPRIETARY) +if(TARGET llphysicsextensions ) + return() +endif() +create_target(llphysicsextensions) + # Note that the use_prebuilt_binary macros below do not in fact include binaries; # the llphysicsextensions_* packages are source only and are built here. @@ -19,17 +24,14 @@ if (HAVOK) include(Havok) use_prebuilt_binary(llphysicsextensions_source) set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/src) - set(LLPHYSICSEXTENSIONS_LIBRARIES llphysicsextensions) - + set_target_libraries( llphysicsextensions llphysicsextensions) elseif (HAVOK_TPV) use_prebuilt_binary(llphysicsextensions_tpv) - set(LLPHYSICSEXTENSIONS_LIBRARIES llphysicsextensions_tpv) - + set_target_libraries( llphysicsextensions llphysicsextensions_tpv) else (HAVOK) use_prebuilt_binary(llphysicsextensions_stub) set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/stub) - set(LLPHYSICSEXTENSIONS_LIBRARIES llphysicsextensionsstub) - + set_target_libraries( llphysicsextensions llphysicsextensionsstub) endif (HAVOK) -set(LLPHYSICSEXTENSIONS_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/llphysicsextensions) +set_target_include_dirs(llphysicsextensions ${LIBS_PREBUILT_DIR}/include/llphysicsextensions) diff --git a/indra/cmake/LLPlugin.cmake b/indra/cmake/LLPlugin.cmake deleted file mode 100644 index 399cb332dd..0000000000 --- a/indra/cmake/LLPlugin.cmake +++ /dev/null @@ -1,14 +0,0 @@ -# -*- cmake -*- - - -set(LLPLUGIN_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/llplugin - ) - -if (LINUX) - # In order to support using ld.gold on linux, we need to explicitely - # specify all libraries that llplugin uses. - set(LLPLUGIN_LIBRARIES llplugin pthread) -else (LINUX) - set(LLPLUGIN_LIBRARIES llplugin) -endif (LINUX) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 4e34951215..799afc77d1 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -4,49 +4,41 @@ include(Prebuilt) include(Boost) +if( TARGET colladadom::colladadom ) + return() +endif() + use_prebuilt_binary(colladadom) use_prebuilt_binary(minizip-ng) # needed for colladadom use_prebuilt_binary(pcre) use_prebuilt_binary(libxml2) -set(LLPRIMITIVE_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/llprimitive - ) +create_target( pcre::pcre ) +set_target_libraries( pcre::pcre pcrecpp pcre ) + +create_target( minizip-ng::minizip-ng ) if (WINDOWS) - set(LLPRIMITIVE_LIBRARIES - debug llprimitive - optimized llprimitive - debug libcollada14dom23-sd - optimized libcollada14dom23-s - libxml2_a - debug pcrecppd - optimized pcrecpp - debug pcred - optimized pcre - debug libminizip - optimized libminizip - ${BOOST_SYSTEM_LIBRARIES} + set_target_libraries( minizip-ng::minizip-ng libminizip ) +else() + set_target_libraries( minizip-ng::minizip-ng minizip ) +endif() + +create_target( libxml::libxml ) +if (WINDOWS) + set_target_libraries( libxml::libxml libxml2_a) +else() + set_target_libraries( libxml::libxml xml2) +endif() + +create_target( colladadom::colladadom ) +set_target_include_dirs( colladadom::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 ) elseif (DARWIN) - set(LLPRIMITIVE_LIBRARIES - llprimitive - debug collada14dom-d - optimized collada14dom - minizip # for collada libminizip.a - xml2 - pcrecpp - pcre - iconv # Required by libxml2 - ) + set_target_libraries(colladadom::colladadom collada14dom libxml::libxml minizip-ng::minizip-ng) elseif (LINUX) - set(LLPRIMITIVE_LIBRARIES - llprimitive - debug collada14dom-d - optimized collada14dom - minizip - xml2 - pcrecpp - pcre - ) -endif (WINDOWS) - + set_target_libraries(colladadom::colladadom collada14dom libxml::libxml minizip-ng::minizip-ng) +endif() \ No newline at end of file diff --git a/indra/cmake/LLRender.cmake b/indra/cmake/LLRender.cmake deleted file mode 100644 index 868922451f..0000000000 --- a/indra/cmake/LLRender.cmake +++ /dev/null @@ -1,20 +0,0 @@ -# -*- cmake -*- - -include(Variables) -include(FreeType) -include(GLH) - -set(LLRENDER_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/llrender - ${GLH_INCLUDE_DIR} - ) - -if (BUILD_HEADLESS) - set(LLRENDER_HEADLESS_LIBRARIES - llrenderheadless - ) -endif (BUILD_HEADLESS) -set(LLRENDER_LIBRARIES - llrender - ) - diff --git a/indra/cmake/LLUI.cmake b/indra/cmake/LLUI.cmake deleted file mode 100644 index 34de57108b..0000000000 --- a/indra/cmake/LLUI.cmake +++ /dev/null @@ -1,7 +0,0 @@ -# -*- cmake -*- - -set(LLUI_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/llui - ) - -set(LLUI_LIBRARIES llui) diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index 80af7ff2ab..ac14ead0de 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -26,17 +26,5 @@ if (SDL_FOUND) include_directories(${SDL_INCLUDE_DIR}) endif (SDL_FOUND) -set(LLWINDOW_INCLUDE_DIRS - ${GLEXT_INCLUDE_DIR} - ${LIBS_OPEN_DIR}/llwindow - ) -if (BUILD_HEADLESS) - set(LLWINDOW_HEADLESS_LIBRARIES - llwindowheadless - ) -endif (BUILD_HEADLESS) - set(LLWINDOW_LIBRARIES - llwindow - ) diff --git a/indra/cmake/LLXML.cmake b/indra/cmake/LLXML.cmake deleted file mode 100644 index b093c76297..0000000000 --- a/indra/cmake/LLXML.cmake +++ /dev/null @@ -1,14 +0,0 @@ -# -*- cmake -*- - -include(Boost) -include(EXPAT) - -set(LLXML_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/llxml - ${EXPAT_INCLUDE_DIRS} - ) -set(LLXML_SYSTEM_INCLUDE_DIRS - ${Boost_INCLUDE_DIRS} - ) - -set(LLXML_LIBRARIES llxml) diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake index df829b615a..a7acd64d62 100644 --- a/indra/cmake/LibVLCPlugin.cmake +++ b/indra/cmake/LibVLCPlugin.cmake @@ -2,6 +2,11 @@ include(Linking) include(Prebuilt) +if( TARGET libvlc::libvlc ) + return() +endif() +create_target( libvlc::libvlc ) + if (USESYSTEMLIBS) set(LIBVLCPLUGIN OFF CACHE BOOL "LIBVLCPLUGIN support for the llplugin/llmedia test apps.") @@ -13,18 +18,18 @@ else (USESYSTEMLIBS) endif (USESYSTEMLIBS) if (WINDOWS) - set(VLC_PLUGIN_LIBRARIES - libvlc.lib - libvlccore.lib + set_target_libraries( libvlc::libvlc + libvlc.lib + libvlccore.lib ) elseif (DARWIN) - set(VLC_PLUGIN_LIBRARIES - libvlc.dylib + set_target_libraries( libvlc::libvlc +`` libvlc.dylib libvlccore.dylib ) elseif (LINUX) # Specify a full path to make sure we get a static link - set(VLC_PLUGIN_LIBRARIES + set_target_libraries( liblvc::libvlc ${LIBS_PREBUILT_DIR}/lib/libvlc.a ${LIBS_PREBUILT_DIR}/lib/libvlccore.a ) diff --git a/indra/cmake/MediaPluginBase.cmake b/indra/cmake/MediaPluginBase.cmake deleted file mode 100644 index 2be035b641..0000000000 --- a/indra/cmake/MediaPluginBase.cmake +++ /dev/null @@ -1,8 +0,0 @@ -# -*- cmake -*- - - -set(MEDIA_PLUGIN_BASE_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/media_plugins/base/ - ) - -set(MEDIA_PLUGIN_BASE_LIBRARIES media_plugin_base) diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake index 388df16a52..f22e2246aa 100644 --- a/indra/cmake/NDOF.cmake +++ b/indra/cmake/NDOF.cmake @@ -3,6 +3,11 @@ include(Prebuilt) set(NDOF ON CACHE BOOL "Use NDOF space navigator joystick library.") +if ( TARGET ndof::ndof ) + return() +endif() +create_target( ndof::ndof ) + if (NDOF) if (USESYSTEMLIBS) set(NDOF_FIND_REQUIRED ON) @@ -15,22 +20,17 @@ if (NDOF) endif (WINDOWS OR DARWIN) if (WINDOWS) - set(NDOF_LIBRARY libndofdev) + set_target_libraries( ndof::ndof libndofdev) elseif (DARWIN OR LINUX) - set(NDOF_LIBRARY ndofdev) + set_target_libraries( ndof::ndof ndofdev) endif (WINDOWS) - - set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev) set(NDOF_FOUND 1) endif (USESYSTEMLIBS) endif (NDOF) if (NDOF_FOUND) add_definitions(-DLIB_NDOF=1) - include_directories(${NDOF_INCLUDE_DIR}) else (NDOF_FOUND) message(STATUS "Building without N-DoF joystick support") - set(NDOF_INCLUDE_DIR "") - set(NDOF_LIBRARY "") endif (NDOF_FOUND) diff --git a/indra/cmake/NGHTTP2.cmake b/indra/cmake/NGHTTP2.cmake index df191ff3c1..5215af5dd9 100644 --- a/indra/cmake/NGHTTP2.cmake +++ b/indra/cmake/NGHTTP2.cmake @@ -1,20 +1,20 @@ include(Prebuilt) -set(NGHTTP2_FIND_QUIETLY ON) -set(NGHTTP2_FIND_REQUIRED ON) +if( TARGET nghttp2::nghttp2 ) + return() +endif() +create_target( nghttp2::nghttp2 ) if (USESYSTEMLIBS) include(FindNGHTTP2) else (USESYSTEMLIBS) use_prebuilt_binary(nghttp2) if (WINDOWS) - set(NGHTTP2_LIBRARIES - ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib - ) + set_target_libraries( nghttp2::nghttp2 ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib) elseif (DARWIN) - set(NGHTTP2_LIBRARIES libnghttp2.dylib) + set_target_libraries( nghttp2::nghttp2 libnghttp2.dylib) else (WINDOWS) - set(NGHTTP2_LIBRARIES libnghttp2.a) + set_target_libraries( nghttp2::nghttp2 libnghttp2.a ) endif (WINDOWS) - set(NGHTTP2_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/nghttp2) + set_target_include_dirs( nghttp2::nghttp2 ${LIBS_PREBUILT_DIR}/include/nghttp2) endif (USESYSTEMLIBS) diff --git a/indra/cmake/NVAPI.cmake b/indra/cmake/NVAPI.cmake index 105f442a30..1eea96784f 100644 --- a/indra/cmake/NVAPI.cmake +++ b/indra/cmake/NVAPI.cmake @@ -5,8 +5,9 @@ set(NVAPI ON CACHE BOOL "Use NVAPI.") if (NVAPI) if (WINDOWS) + create_target( nvapi::nvapi ) + set_target_libraries( nvapi::nvapi nvapi) use_prebuilt_binary(nvapi) - set(NVAPI_LIBRARY nvapi) else (WINDOWS) set(NVAPI_LIBRARY "") endif (WINDOWS) diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake index 1bbfff6f98..ab2d258a12 100644 --- a/indra/cmake/OPENAL.cmake +++ b/indra/cmake/OPENAL.cmake @@ -9,7 +9,12 @@ else (LINUX) endif (LINUX) if (OPENAL) - set(OPENAL_LIB_INCLUDE_DIRS "${LIBS_PREBUILT_DIR}/include/AL") + if( TARGET openal::openal ) + return() + endif() + create_target( openal::openal ) + set_target_include_dirs( openal::openal "${LIBS_PREBUILT_DIR}/include/AL") + if (USESYSTEMLIBS) include(FindPkgConfig) include(FindOpenAL) @@ -18,13 +23,14 @@ if (OPENAL) else (USESYSTEMLIBS) use_prebuilt_binary(openal) endif (USESYSTEMLIBS) + if(WINDOWS) - set(OPENAL_LIBRARIES + set_target_libraries( openal::openal OpenAL32 alut ) else() - set(OPENAL_LIBRARIES + set_target_libraries( openal::openal openal alut ) diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index bf0bde2ba7..67292250bb 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -1,22 +1,16 @@ # -*- cmake -*- include(Prebuilt) -set(OPENJPEG_FIND_QUIETLY ON) -set(OPENJPEG_FIND_REQUIRED ON) +if( TARGET openjpeg::openjpeg ) + return() +endif() +create_target( openjpeg::openjpeg ) if (USESYSTEMLIBS) include(FindOpenJPEG) else (USESYSTEMLIBS) use_prebuilt_binary(openjpeg) - if(WINDOWS) - # Windows has differently named release and debug openjpeg(d) libs. - set(OPENJPEG_LIBRARIES - debug openjpegd - optimized openjpeg) - else(WINDOWS) - set(OPENJPEG_LIBRARIES openjpeg) - endif(WINDOWS) - - set(OPENJPEG_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/openjpeg) + set_target_libraries(openjpeg::openjpeg openjpeg ) + set_target_include_dirs( openjpeg::openjpeg ${LIBS_PREBUILT_DIR}/include/openjpeg) endif (USESYSTEMLIBS) diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake index 32400f5e4e..80b419c36e 100644 --- a/indra/cmake/OpenSSL.cmake +++ b/indra/cmake/OpenSSL.cmake @@ -1,23 +1,22 @@ # -*- cmake -*- include(Prebuilt) -set(OpenSSL_FIND_QUIETLY ON) -set(OpenSSL_FIND_REQUIRED ON) +if( TARGET openssl::openssl ) + return() +endif() +create_target(openssl::openssl) if (USESYSTEMLIBS) include(FindOpenSSL) else (USESYSTEMLIBS) use_prebuilt_binary(openssl) if (WINDOWS) - set(OPENSSL_LIBRARIES libssl libcrypto) - else (WINDOWS) - set(OPENSSL_LIBRARIES ssl crypto) + set_target_libraries(openssl::openssl libssl libcrypto) + elseif (LINUX) + set_target_libraries(openssl::openssl ssl crypto dl) + else() + set_target_libraries(openssl::openssl ssl crypto) endif (WINDOWS) - set(OPENSSL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) + set_target_include_dirs(openssl::openssl ${LIBS_PREBUILT_DIR}/include) endif (USESYSTEMLIBS) -if (LINUX) - set(CRYPTO_LIBRARIES crypto dl) -elseif (DARWIN) - set(CRYPTO_LIBRARIES crypto) -endif (LINUX) diff --git a/indra/cmake/PNG.cmake b/indra/cmake/PNG.cmake index 248a875a19..54b2438425 100644 --- a/indra/cmake/PNG.cmake +++ b/indra/cmake/PNG.cmake @@ -1,6 +1,11 @@ # -*- cmake -*- include(Prebuilt) +if( TARGET libpng::libpng ) + return() +endif() +create_target(libpng::libpng) + set(PNG_FIND_QUIETLY ON) set(PNG_FIND_REQUIRED ON) @@ -9,26 +14,9 @@ if (USESYSTEMLIBS) else (USESYSTEMLIBS) use_prebuilt_binary(libpng) if (WINDOWS) - set(PNG_LIBRARIES libpng16) - set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/libpng16) - elseif(DARWIN) - set(PNG_LIBRARIES png16) - set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/libpng16) + set_target_libraries(libpng::libpng libpng16) else() - # - # When we have updated static libraries in competition with older - # shared libraries and we want the former to win, we need to do some - # extra work. The *_PRELOAD_ARCHIVES settings are invoked early - # and will pull in the entire archive to the binary giving it - # priority in symbol resolution. Beware of cmake moving the - # achive load itself to another place on the link command line. If - # that happens, you can try something like -Wl,-lpng16 here to hide - # the archive. Also be aware that the linker will not tolerate a - # second whole-archive load of the archive. See viewer's - # CMakeLists.txt for more information. - # - set(PNG_PRELOAD_ARCHIVES -Wl,--whole-archive png16 -Wl,--no-whole-archive) set(PNG_LIBRARIES png16) - set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/libpng16) endif() + set_target_include_dirs( libpng::libpng ${LIBS_PREBUILT_DIR}/include/libpng16) endif (USESYSTEMLIBS) diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 33a6d76916..9125f2f80f 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -61,4 +61,15 @@ macro (use_prebuilt_binary _binary) endif (NOT USESYSTEMLIBS_${_binary}) endmacro (use_prebuilt_binary _binary) +function( create_target name ) + add_library( ${name} INTERFACE IMPORTED ) +endfunction() +function( set_target_libraries target ) + set_property( TARGET ${target} PROPERTY INTERFACE_LINK_LIBRARIES ${ARGN} ) +endfunction() +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 ecc5b74ef1..55b38fca28 100644 --- a/indra/cmake/URIPARSER.cmake +++ b/indra/cmake/URIPARSER.cmake @@ -1,7 +1,9 @@ # -*- cmake -*- -set(URIPARSER_FIND_QUIETLY ON) -set(URIPARSER_FIND_REQUIRED ON) +if( TARGET uriparser::uriparser ) + return() +endif() +create_target( uriparser::uriparser ) include(Prebuilt) @@ -10,26 +12,11 @@ if (USESYSTEMLIBS) else (USESYSTEMLIBS) use_prebuilt_binary(uriparser) if (WINDOWS) - set(URIPARSER_LIBRARIES - debug uriparserd - optimized uriparser) + set_target_libraries( uriparser::uriparser uriparser) elseif (LINUX) - # - # When we have updated static libraries in competition with older - # shared libraries and we want the former to win, we need to do some - # extra work. The *_PRELOAD_ARCHIVES settings are invoked early - # and will pull in the entire archive to the binary giving it. - # priority in symbol resolution. Beware of cmake moving the - # achive load itself to another place on the link command line. If - # that happens, you can try something like -Wl,-luriparser here to hide - # the archive. Also be aware that the linker will not tolerate a - # second whole-archive load of the archive. See viewer's - # CMakeLists.txt for more information. - # - set(URIPARSER_PRELOAD_ARCHIVES -Wl,--whole-archive uriparser -Wl,--no-whole-archive) - set(URIPARSER_LIBRARIES uriparser) + set_target_libraries( uriparser::uriparser uriparser) elseif (DARWIN) - set(URIPARSER_LIBRARIES liburiparser.dylib) + set_target_libraries( uriparser::uriparser liburiparser.dylib) endif (WINDOWS) - set(URIPARSER_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/uriparser) + set_target_include_dirs( uriparser::uriparser ${LIBS_PREBUILT_DIR}/include/uriparser) endif (USESYSTEMLIBS) diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index 8c3790ea89..75b94acc50 100644 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -1,20 +1,15 @@ # -*- cmake -*- include(Prebuilt) -set(XMLRPCEPI_FIND_QUIETLY ON) -set(XMLRPCEPI_FIND_REQUIRED ON) +if( TARGET xmlrpc-epi::xmlrpc-epi ) + return() +endif() +create_target( xmlrpc-epi::xmlrpc-epi ) if (USESYSTEMLIBS) include(FindXmlRpcEpi) else (USESYSTEMLIBS) use_prebuilt_binary(xmlrpc-epi) - if (WINDOWS) - set(XMLRPCEPI_LIBRARIES - debug xmlrpc-epid - optimized xmlrpc-epi - ) - else (WINDOWS) - set(XMLRPCEPI_LIBRARIES xmlrpc-epi) - endif (WINDOWS) - set(XMLRPCEPI_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) + set_target_libraries(xmlrpc-epi::xmlrpc-epi xmlrpc-epi ) + set_target_include_dirs( xmlrpc-epi::xmlrpc-epi ${LIBS_PREBUILT_DIR}/include) endif (USESYSTEMLIBS) diff --git a/indra/cmake/ZLIBNG.cmake b/indra/cmake/ZLIBNG.cmake index 1f46a23d92..5aaca60664 100644 --- a/indra/cmake/ZLIBNG.cmake +++ b/indra/cmake/ZLIBNG.cmake @@ -1,35 +1,20 @@ # -*- cmake -*- -set(ZLIBNG_FIND_QUIETLY ON) -set(ZLIBNG_FIND_REQUIRED ON) - include(Prebuilt) +if( TARGET zlib-ng::zlib-ng ) + return() +endif() +create_target(zlib-ng::zlib-ng) + if (USESYSTEMLIBS) include(FindZLIBNG) else (USESYSTEMLIBS) use_prebuilt_binary(zlib-ng) if (WINDOWS) - set(ZLIBNG_LIBRARIES - debug zlib - optimized zlib) - elseif (LINUX) - # - # When we have updated static libraries in competition with older - # shared libraries and we want the former to win, we need to do some - # extra work. The *_PRELOAD_ARCHIVES settings are invoked early - # and will pull in the entire archive to the binary giving it - # priority in symbol resolution. Beware of cmake moving the - # achive load itself to another place on the link command line. If - # that happens, you can try something like -Wl,-lz here to hide - # the archive. Also be aware that the linker will not tolerate a - # second whole-archive load of the archive. See viewer's - # CMakeLists.txt for more information. - # - set(ZLIBNG_PRELOAD_ARCHIVES -Wl,--whole-archive z -Wl,--no-whole-archive) - set(ZLIBNG_LIBRARIES z) - elseif (DARWIN) - set(ZLIBNG_LIBRARIES z) + set_target_libraries( zlib-ng::zlib-ng zlib ) + else() + set_target_libraries( zlib-ng::zlib-ng z ) endif (WINDOWS) - set(ZLIBNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/zlib-ng) + set_target_include_dirs( zlib-ng::zlib-ng ${LIBS_PREBUILT_DIR}/include/zlib-ng) endif (USESYSTEMLIBS) diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake index 4edc4c59cd..ded109f9f1 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -10,28 +10,30 @@ else (INSTALL_PROPRIETARY) endif (INSTALL_PROPRIETARY) if (USE_BUGSPLAT) + create_target(bugsplat::bugsplat) if (NOT USESYSTEMLIBS) include(Prebuilt) use_prebuilt_binary(bugsplat) if (WINDOWS) - set(BUGSPLAT_LIBRARIES + set_target_libraries( bugsplat::bugsplat ${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib ) elseif (DARWIN) find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}") + set_target_libraries( bugsplat::bugsplat + ${BUGSPLAT_LIBRARIES} + ) else (WINDOWS) message(FATAL_ERROR "BugSplat is not supported; add -DUSE_BUGSPLAT=OFF") endif (WINDOWS) else (NOT USESYSTEMLIBS) - set(BUGSPLAT_FIND_QUIETLY ON) - set(BUGSPLAT_FIND_REQUIRED ON) include(FindBUGSPLAT) endif (NOT USESYSTEMLIBS) set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name") - set(BUGSPLAT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/bugsplat) + set_target_include_dirs( bugsplat::bugsplat ${LIBS_PREBUILT_DIR}/include/bugsplat) set(BUGSPLAT_DEFINE "LL_BUGSPLAT") endif (USE_BUGSPLAT) diff --git a/indra/llappearance/CMakeLists.txt b/indra/llappearance/CMakeLists.txt index 268849ad74..321c1e1798 100644 --- a/indra/llappearance/CMakeLists.txt +++ b/indra/llappearance/CMakeLists.txt @@ -4,30 +4,11 @@ project(llappearance) include(00-Common) include(LLCommon) -include(LLCharacter) include(LLImage) -include(LLInventory) -include(LLMath) -include(LLMessage) include(LLCoreHttp) -include(LLRender) -include(LLFileSystem) include(LLWindow) -include(LLXML) include(Linking) -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLCHARACTER_INCLUDE_DIRS} - ${LLIMAGE_INCLUDE_DIRS} - ${LLINVENTORY_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLRENDER_INCLUDE_DIRS} - ${LLFILESYSTEM_INCLUDE_DIRS} - ${LLWINDOW_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ) - set(llappearance_SOURCE_FILES llavatarappearance.cpp llavatarjoint.cpp @@ -79,33 +60,32 @@ list(APPEND llappearance_SOURCE_FILES ${llappearance_HEADER_FILES}) add_library (llappearance ${llappearance_SOURCE_FILES}) target_link_libraries(llappearance - ${LLCHARACTER_LIBRARIES} - ${LLINVENTORY_LIBRARIES} - ${LLIMAGE_LIBRARIES} - ${LLRENDER_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLXML_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${LLCOMMON_LIBRARIES} + llcharacter + llinventory + llimage + llrender + llfilesystem + llmath + llxml + llmessage + llcorehttp + llcommon ) +set_target_include_dirs( llappearance ${CMAKE_CURRENT_SOURCE_DIR}) if (BUILD_HEADLESS) add_library (llappearanceheadless ${llappearance_SOURCE_FILES}) - + set_target_include_dirs( llappearanceheadless ${CMAKE_CURRENT_SOURCE_DIR}) + target_link_libraries(llappearanceheadless - ${LLCHARACTER_LIBRARIES} - ${LLINVENTORY_LIBRARIES} - ${LLIMAGE_LIBRARIES} - ${LLRENDERHEADLESS_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLXML_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${LLCOMMON_LIBRARIES} + llcharacter + llinventory + llimage + llfilesystem + llmath + llxml + llmessage + llcorehttp + llcommon ) endif (BUILD_HEADLESS) diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index 92a5cfe22f..16576ddbad 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -7,23 +7,6 @@ include(LLAudio) include(FMODSTUDIO) include(OPENAL) include(LLCommon) -include(LLMath) -include(LLMessage) -include(LLFileSystem) - -include_directories( - ${LLAUDIO_INCLUDE_DIRS} - ${LLCOMMON_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLMESSAGE_INCLUDE_DIRS} - ${LLFILESYSTEM_INCLUDE_DIRS} - ${OGG_INCLUDE_DIRS} - ${VORBISENC_INCLUDE_DIRS} - ${VORBISFILE_INCLUDE_DIRS} - ${VORBIS_INCLUDE_DIRS} - ${OPENAL_LIB_INCLUDE_DIRS} - ${FREEAULT_LIB_INCLUDE_DIRS} - ) set(llaudio_SOURCE_FILES llaudioengine.cpp @@ -43,9 +26,6 @@ set(llaudio_HEADER_FILES ) if (FMODSTUDIO) - include_directories( - ${FMODSTUDIO_INCLUDE_DIR} - ) list(APPEND llaudio_SOURCE_FILES llaudioengine_fmodstudio.cpp lllistener_fmodstudio.cpp @@ -60,10 +40,6 @@ if (FMODSTUDIO) endif (FMODSTUDIO) if (OPENAL) - include_directories( - ${OPENAL_LIBRARIES} - ) - list(APPEND llaudio_SOURCE_FILES llaudioengine_openal.cpp lllistener_openal.cpp @@ -81,14 +57,18 @@ set_source_files_properties(${llaudio_HEADER_FILES} list(APPEND llaudio_SOURCE_FILES ${llaudio_HEADER_FILES}) add_library (llaudio ${llaudio_SOURCE_FILES}) -target_link_libraries( - llaudio - ${LLCOMMON_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${VORBISENC_LIBRARIES} - ${VORBISFILE_LIBRARIES} - ${VORBIS_LIBRARIES} - ${OGG_LIBRARIES} +set_target_include_dirs( llaudio ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries( llaudio + llcommon + llmath + llmessage + llfilesystem + vorbis::vorbis ) + +if( TARGET openal::openal ) + target_link_libraries( llaudio openal::openal ) +endif() +if( TARGET fmodstudio::fmodstudio ) + target_link_libraries( llaudio fmodstudio::fmodstudio ) +endif() \ No newline at end of file diff --git a/indra/llcharacter/CMakeLists.txt b/indra/llcharacter/CMakeLists.txt index d90ffb5543..59e491748d 100644 --- a/indra/llcharacter/CMakeLists.txt +++ b/indra/llcharacter/CMakeLists.txt @@ -4,22 +4,6 @@ project(llcharacter) include(00-Common) include(LLCommon) -include(LLMath) -include(LLMessage) -include(LLFileSystem) -include(LLXML) - -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLMESSAGE_INCLUDE_DIRS} - ${LLFILESYSTEM_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ${LLXML_SYSTEM_INCLUDE_DIRS} - ) set(llcharacter_SOURCE_FILES llanimationstates.cpp @@ -79,12 +63,13 @@ set_source_files_properties(${llcharacter_HEADER_FILES} list(APPEND llcharacter_SOURCE_FILES ${llcharacter_HEADER_FILES}) add_library (llcharacter ${llcharacter_SOURCE_FILES}) +set_target_include_dirs( llcharacter ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries( - llcharacter - ${LLCOMMON_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLXML_LIBRARIES} + llcharacter + llcommon + llmath + llmessage + llfilesystem + llxml ) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 68378222d9..901686c815 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -13,14 +13,6 @@ include(Copy3rdPartyLibs) include(ZLIBNG) include(URIPARSER) -include_directories( - ${EXPAT_INCLUDE_DIRS} - ${LLCOMMON_INCLUDE_DIRS} - ${JSONCPP_INCLUDE_DIR} - ${ZLIBNG_INCLUDE_DIRS} - ${URIPARSER_INCLUDE_DIRS} - ) - # add_executable(lltreeiterators lltreeiterators.cpp) # # target_link_libraries(lltreeiterators @@ -286,22 +278,19 @@ else(LLCOMMON_LINK_SHARED) endif(LLCOMMON_LINK_SHARED) target_link_libraries( - llcommon - ${APRUTIL_LIBRARIES} - ${APR_LIBRARIES} - ${EXPAT_LIBRARIES} - ${JSONCPP_LIBRARIES} - ${ZLIBNG_LIBRARIES} + llcommon + apr::apr + expat::expat + jsoncpp::jsoncpp + zlib-ng::zlib-ng ${WINDOWS_LIBRARIES} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_PROGRAM_OPTIONS_LIBRARY} - ${BOOST_REGEX_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} + boost::boost ${GOOGLE_PERFTOOLS_LIBRARIES} - ${URIPARSER_LIBRARIES} + uriparser::uriparser ) +set_target_include_dirs( llcommon ${CMAKE_CURRENT_SOURCE_DIR}) + if (DARWIN) include(CMakeFindFrameworks) find_library(CARBON_LIBRARY Carbon) @@ -319,13 +308,9 @@ if (LL_TESTS) #set(TEST_DEBUG on) set(test_libs llcommon - ${LLCOMMON_LIBRARIES} - ${WINDOWS_LIBRARIES} + ${WINDOWS_LIBRARIES} ${GOOGLEMOCK_LIBRARIES} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_THREAD_LIBRARY} - ${BOOST_SYSTEM_LIBRARY}) + ) LL_ADD_INTEGRATION_TEST(bitpack "" "${test_libs}") LL_ADD_INTEGRATION_TEST(classic_callback "" "${test_libs}") LL_ADD_INTEGRATION_TEST(commonmisc "" "${test_libs}") diff --git a/indra/llcommon/stringize.h b/indra/llcommon/stringize.h index 38dd198ad3..174c9051a8 100644 --- a/indra/llcommon/stringize.h +++ b/indra/llcommon/stringize.h @@ -30,7 +30,7 @@ #define LL_STRINGIZE_H #include -#include +#include "llstring.h" /** * gstringize(item) encapsulates an idiom we use constantly, using diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index c591680250..271ddbcd2d 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -10,18 +10,11 @@ include(NGHTTP2) include(ZLIBNG) include(LLCoreHttp) include(LLAddBuildTest) -include(LLMessage) include(LLCommon) include(Tut) include(bugsplat) -include_directories (${CMAKE_CURRENT_SOURCE_DIR}) - -include_directories( - ${LLMESSAGE_INCLUDE_DIRS} - ${LLCOMMON_INCLUDE_DIRS} - ${LLCOREHTTP_INCLUDE_DIRS} - ) +include_directories (${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../llmessage ) set(llcorehttp_SOURCE_FILES bufferarray.cpp @@ -92,14 +85,14 @@ list(APPEND llcorehttp_SOURCE_FILES ${llcorehttp_HEADER_FILES}) add_library (llcorehttp ${llcorehttp_SOURCE_FILES}) target_link_libraries( - llcorehttp - ${CURL_LIBRARIES} - ${OPENSSL_LIBRARIES} - ${CRYPTO_LIBRARIES} - ${NGHTTP2_LIBRARIES} - ${BOOST_THREAD_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} + llcorehttp + llcommon + libcurl::libcurl + openssl::openssl + nghttp2::nghttp2 ) +set_target_include_dirs( llcorehttp ${CMAKE_CURRENT_SOURCE_DIR}) + # tests set(LLCOREHTTP_TESTS ON CACHE BOOL @@ -128,17 +121,10 @@ if (LL_TESTS AND LLCOREHTTP_TESTS) # set(TEST_DEBUG on) set(test_libs - ${LLCOREHTTP_LIBRARIES} - ${WINDOWS_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${GOOGLEMOCK_LIBRARIES} - ${CURL_LIBRARIES} - ${OPENSSL_LIBRARIES} - ${CRYPTO_LIBRARIES} - ${NGHTTP2_LIBRARIES} - ${BOOST_THREAD_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} + llcorehttp + ${WINDOWS_LIBRARIES} + llmessage + llcommon ) # If http_proxy is in the current environment (e.g. to fetch s3-proxy @@ -201,17 +187,10 @@ endif (DARWIN) set(example_libs ${LEGACY_STDIO_LIBS} - ${LLCOREHTTP_LIBRARIES} - ${WINDOWS_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${GOOGLEMOCK_LIBRARIES} - ${CURL_LIBRARIES} - ${OPENSSL_LIBRARIES} - ${CRYPTO_LIBRARIES} - ${NGHTTP2_LIBRARIES} - ${BOOST_THREAD_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} + llcorehttp + ${WINDOWS_LIBRARIES} + llmessage + llcommon ) add_executable(http_texture_load diff --git a/indra/llcrashlogger/CMakeLists.txt b/indra/llcrashlogger/CMakeLists.txt index d70a1e0fb0..0e357b249f 100644 --- a/indra/llcrashlogger/CMakeLists.txt +++ b/indra/llcrashlogger/CMakeLists.txt @@ -5,23 +5,6 @@ project(llcrashlogger) include(00-Common) include(LLCoreHttp) include(LLCommon) -include(LLMath) -include(LLMessage) -include(LLFileSystem) -include(LLXML) - -include_directories( - ${LLCOREHTTP_INCLUDE_DIRS} - ${LLCOMMON_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLMESSAGE_INCLUDE_DIRS} - ${LLFILESYSTEM_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ${LLXML_SYSTEM_INCLUDE_DIRS} - ) set(llcrashlogger_SOURCE_FILES llcrashlogger.cpp @@ -30,7 +13,6 @@ set(llcrashlogger_SOURCE_FILES set(llcrashlogger_HEADER_FILES CMakeLists.txt - llcrashlogger.h llcrashlock.h ) @@ -41,3 +23,4 @@ set_source_files_properties(${llcrashlogger_HEADER_FILES} list(APPEND llcrashlogger_SOURCE_FILES ${llcrashlogger_HEADER_FILES}) add_library(llcrashlogger ${llcrashlogger_SOURCE_FILES}) +target_link_libraries( llcrashlogger llcommon llmessage llcorehttp llxml llfilesystem ) diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index 09c4c33ebf..dfc290a48b 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -60,15 +60,10 @@ list(APPEND llfilesystem_SOURCE_FILES ${llfilesystem_HEADER_FILES}) add_library (llfilesystem ${llfilesystem_SOURCE_FILES}) -set(cache_BOOST_LIBRARIES - ${BOOST_FILESYSTEM_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} - ) - target_link_libraries(llfilesystem - ${LLCOMMON_LIBRARIES} - ${cache_BOOST_LIBRARIES} + llcommon ) +set_target_include_dirs( llfilesystem ${CMAKE_CURRENT_SOURCE_DIR}) if (DARWIN) include(CMakeFindFrameworks) @@ -92,7 +87,7 @@ if (LL_TESTS) LL_ADD_PROJECT_UNIT_TESTS(llfilesystem "${llfilesystem_TEST_SOURCE_FILES}") # INTEGRATION TESTS - set(test_libs llmath llcommon llfilesystem ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES}) + set(test_libs llmath llcommon llfilesystem ${WINDOWS_LIBRARIES}) # TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests. LL_ADD_INTEGRATION_TEST(lldir "" "${test_libs}") diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt index 436b8dd1a2..5387a22601 100644 --- a/indra/llimage/CMakeLists.txt +++ b/indra/llimage/CMakeLists.txt @@ -5,24 +5,13 @@ project(llimage) include(00-Common) include(LLCommon) include(LLImage) -include(LLMath) -include(LLFileSystem) +include(JPEG) include(LLKDU) -include(LLImageJ2COJ) include(ZLIBNG) include(LLAddBuildTest) include(bugsplat) include(Tut) -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLFILESYSTEM_INCLUDE_DIRS} - ${PNG_INCLUDE_DIRS} - ${ZLIBNG_INCLUDE_DIRS} - ) - set(llimage_SOURCE_FILES llimagebmp.cpp llimage.cpp @@ -60,21 +49,22 @@ set_source_files_properties(${llimage_HEADER_FILES} list(APPEND llimage_SOURCE_FILES ${llimage_HEADER_FILES}) add_library (llimage ${llimage_SOURCE_FILES}) +set_target_include_dirs( llimage ${CMAKE_CURRENT_SOURCE_DIR}) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level if (USE_KDU) - target_link_libraries(llimage ${LLKDU_LIBRARIES}) + target_link_libraries(llimage llkdu) else (USE_KDU) - target_link_libraries(llimage ${LLIMAGEJ2COJ_LIBRARIES}) + target_link_libraries(llimage llimagej2coj) endif (USE_KDU) target_link_libraries(llimage - ${LLFILESYSTEM_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${JPEG_LIBRARIES} - ${PNG_LIBRARIES} - ${ZLIBNG_LIBRARIES} + llfilesystem + llmath + llcommon + zlib-ng::zlib-ng + libpng::libpng + jpeglib::jpeglib ) # Add tests diff --git a/indra/llimagej2coj/CMakeLists.txt b/indra/llimagej2coj/CMakeLists.txt index c9423d50dd..6880b09025 100644 --- a/indra/llimagej2coj/CMakeLists.txt +++ b/indra/llimagej2coj/CMakeLists.txt @@ -7,12 +7,6 @@ include(LLCommon) include(LLImage) include(OpenJPEG) -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLIMAGE_INCLUDE_DIRS} - ${OPENJPEG_INCLUDE_DIR} - ) - set(llimagej2coj_SOURCE_FILES llimagej2coj.cpp ) @@ -30,8 +24,9 @@ list(APPEND llimagej2coj_SOURCE_FILES ${llimagej2coj_HEADER_FILES}) add_library (llimagej2coj ${llimagej2coj_SOURCE_FILES}) -target_link_libraries( - llimagej2coj - ${OPENJPEG_LIBRARIES} +target_link_libraries( llimagej2coj + llcommon + llimage + openjpeg::openjpeg ) diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt index 04975940aa..ee14f0a46e 100644 --- a/indra/llinventory/CMakeLists.txt +++ b/indra/llinventory/CMakeLists.txt @@ -5,17 +5,6 @@ project(llinventory) include(00-Common) include(LLCommon) include(LLCoreHttp) -include(LLMath) -include(LLMessage) -include(LLFileSystem) -include(LLXML) - -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLMESSAGE_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ) set(llinventory_SOURCE_FILES llcategory.cpp @@ -70,7 +59,8 @@ list(APPEND llinventory_SOURCE_FILES ${llinventory_HEADER_FILES}) add_library (llinventory ${llinventory_SOURCE_FILES}) - +target_link_libraries( llinventory llcommon llmath llmessage llxml ) +set_target_include_dirs( llinventory ${CMAKE_CURRENT_SOURCE_DIR}) #add unit tests if (LL_TESTS) @@ -81,7 +71,7 @@ if (LL_TESTS) LL_ADD_PROJECT_UNIT_TESTS(llinventory "${llinventory_TEST_SOURCE_FILES}") #set(TEST_DEBUG on) - set(test_libs llinventory ${LLMESSAGE_LIBRARIES} ${LLFILESYSTEM_LIBRARIES} ${LLCOREHTTP_LIBRARIES} ${LLMATH_LIBRARIES} ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES}) + set(test_libs llinventory llmath llcorehttp llfilesystem ${WINDOWS_LIBRARIES}) LL_ADD_INTEGRATION_TEST(inventorymisc "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llparcel "" "${test_libs}") endif (LL_TESTS) diff --git a/indra/llkdu/CMakeLists.txt b/indra/llkdu/CMakeLists.txt index cb0e204e91..035fc746cf 100644 --- a/indra/llkdu/CMakeLists.txt +++ b/indra/llkdu/CMakeLists.txt @@ -13,15 +13,7 @@ include(00-Common) include(LLCommon) include(LLImage) include(LLKDU) -include(LLMath) -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLIMAGE_INCLUDE_DIRS} - ${KDU_INCLUDE_DIR} - ${LLKDU_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ) set(llkdu_SOURCE_FILES llimagej2ckdu.cpp @@ -51,9 +43,8 @@ set_source_files_properties(${llkdu_SOURCE_FILES} if (USE_KDU) add_library (llkdu ${llkdu_SOURCE_FILES}) - target_link_libraries(llkdu - ${KDU_LIBRARY}) - + target_link_libraries(llkdu kdu::kdu ) + # Add tests if (LL_TESTS) include(LLAddBuildTest) @@ -66,10 +57,7 @@ if (USE_KDU) llkdumem.h lltut.h ) - SET(llkdu_test_additional_INCLUDE_DIRS - ${KDU_INCLUDE_DIR} - ${LLKDU_INCLUDE_DIRS} - ) + LL_ADD_PROJECT_UNIT_TESTS(llkdu "${llkdu_TEST_SOURCE_FILES}") endif (LL_TESTS) diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index 552e820127..c385a4cff6 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -107,9 +107,8 @@ list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES}) add_library (llmath ${llmath_SOURCE_FILES}) -target_link_libraries(llmath - ${LLCOMMON_LIBRARIES} - ) +target_link_libraries(llmath llcommon) +set_target_include_dirs( llmath ${CMAKE_CURRENT_SOURCE_DIR}) # Add tests if (LL_TESTS) @@ -124,15 +123,11 @@ if (LL_TESTS) v4color.cpp v4coloru.cpp ) - set_source_files_properties( - ${llmath_TEST_SOURCE_FILES} - PROPERTIES - LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_THREAD_LIBRARY}" - ) + LL_ADD_PROJECT_UNIT_TESTS(llmath "${llmath_TEST_SOURCE_FILES}") # INTEGRATION TESTS - set(test_libs llmath llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES}) + set(test_libs llmath llcommon ${WINDOWS_LIBRARIES}) # TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests. LL_ADD_INTEGRATION_TEST(alignment "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llbbox llbbox.cpp "${test_libs}") diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index f0a1dfe940..6be0262b25 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -7,9 +7,6 @@ include(GoogleMock) include(LLAddBuildTest) include(LLCommon) include(LLCoreHttp) -include(LLMath) -include(LLMessage) -include(LLFileSystem) include(LLAddBuildTest) include(Python) include(Tut) @@ -19,12 +16,9 @@ include(JsonCpp) include_directories (${CMAKE_CURRENT_SOURCE_DIR}) include_directories( - ${LLCOMMON_INCLUDE_DIRS} ${LLCOREHTTP_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} ${LLMESSAGE_INCLUDE_DIRS} ${LLFILESYSTEM_INCLUDE_DIRS} - ${JSONCPP_INCLUDE_DIR} ) set(llmessage_SOURCE_FILES @@ -204,42 +198,18 @@ list(APPEND llmessage_SOURCE_FILES ${llmessage_HEADER_FILES}) add_library (llmessage ${llmessage_SOURCE_FILES}) -if (LINUX) -target_link_libraries( - llmessage - ${CURL_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLMATH_LIBRARIES} - ${JSONCPP_LIBRARIES} - ${OPENSSL_LIBRARIES} - ${CRYPTO_LIBRARIES} - ${NGHTTP2_LIBRARIES} - ${XMLRPCEPI_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} - rt - ) -else (LINUX) target_link_libraries( - llmessage - ${CURL_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLMATH_LIBRARIES} - ${JSONCPP_LIBRARIES} - ${OPENSSL_LIBRARIES} - ${CRYPTO_LIBRARIES} - ${NGHTTP2_LIBRARIES} - ${XMLRPCEPI_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} - ) -endif(LINUX) + llmessage + libcurl::libcurl + llcommon + llfilesystem + llmath + openssl::openssl + xmlrpc-epi::xmlrpc-epi + llcorehttp + nghttp2::nghttp2 +) +set_target_include_dirs( llmessage ${CMAKE_CURRENT_SOURCE_DIR}) # tests if (LL_TESTS) @@ -249,41 +219,29 @@ if (LL_TESTS) lltrustedmessageservice.cpp lltemplatemessagedispatcher.cpp ) + set_property( SOURCE ${llmessage_TEST_SOURCE_FILES} PROPERTY LL_TEST_ADDITIONAL_LIBRARIES llmath llcorehttp) LL_ADD_PROJECT_UNIT_TESTS(llmessage "${llmessage_TEST_SOURCE_FILES}") - # set(TEST_DEBUG on) if (LINUX) set(test_libs - ${WINDOWS_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLMATH_LIBRARIES} - ${CURL_LIBRARIES} - ${NGHTTP2_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${JSONCPP_LIBRARIES} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - rt - ${GOOGLEMOCK_LIBRARIES} + ${WINDOWS_LIBRARIES} + llfilesystem + llmath + llcorehttp + llmessage + llcommon + rt ) else (LINUX) set(test_libs - ${WINDOWS_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLMATH_LIBRARIES} - ${CURL_LIBRARIES} - ${NGHTTP2_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${JSONCPP_LIBRARIES} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${GOOGLEMOCK_LIBRARIES} + ${WINDOWS_LIBRARIES} + llfilesystem + llmath + llcorehttp + llmessage + llcommon ) endif(LINUX) diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt index 5cc129a267..872d62a2bb 100644 --- a/indra/llplugin/CMakeLists.txt +++ b/indra/llplugin/CMakeLists.txt @@ -6,26 +6,7 @@ include(00-Common) include(CURL) include(LLCommon) include(LLImage) -include(LLMath) -include(LLMessage) -include(LLRender) -include(LLXML) include(LLWindow) -include(Boost) - -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLIMAGE_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLMESSAGE_INCLUDE_DIRS} - ${LLRENDER_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ${LLWINDOW_INCLUDE_DIRS} - ) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ${LLXML_SYSTEM_INCLUDE_DIRS} - ) set(llplugin_SOURCE_FILES llpluginclassmedia.cpp @@ -65,6 +46,7 @@ endif(NOT ADDRESS_SIZE EQUAL 32) list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES}) add_library (llplugin ${llplugin_SOURCE_FILES}) - +set_target_include_dirs(llplugin ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries( llplugin llcommon llmath llrender llmessage ) add_subdirectory(slplugin) diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index e4f64448c5..7725489c3e 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -2,19 +2,8 @@ project(SLPlugin) include(00-Common) include(LLCommon) -include(LLPlugin) include(Linking) include(PluginAPI) -include(LLMessage) - -include_directories( - ${LLPLUGIN_INCLUDE_DIRS} - ${LLMESSAGE_INCLUDE_DIRS} - ${LLCOMMON_INCLUDE_DIRS} -) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ) if (DARWIN) include(CMakeFindFrameworks) @@ -63,10 +52,10 @@ set_target_properties(SLPlugin endif () target_link_libraries(SLPlugin - ${LEGACY_STDIO_LIBS} - ${LLPLUGIN_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLCOMMON_LIBRARIES} + ${LEGACY_STDIO_LIBS} + llplugin + llmessage + llcommon ${PLUGIN_API_WINDOWS_LIBRARIES} ) diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 7b6d04b096..fb81f19206 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -4,27 +4,9 @@ project(llprimitive) include(00-Common) include(LLCommon) -include(LLMath) -include(LLMessage) include(LLCoreHttp) -include(LLXML) include(LLPhysicsExtensions) -include(LLCharacter) - -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLMESSAGE_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ${LIBS_PREBUILT_DIR}/include/collada - ${LIBS_PREBUILT_DIR}/include/collada/1.4 - ${LLCHARACTER_INCLUDE_DIRS} - ) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ${LLXML_SYSTEM_INCLUDE_DIRS} - ${LLPHYSICSEXTENSIONS_INCLUDE_DIRS} - ) +include(LLPrimitive) set(llprimitive_SOURCE_FILES lldaeloader.cpp @@ -71,19 +53,19 @@ set_source_files_properties(${llprimitive_HEADER_FILES} list(APPEND llprimitive_SOURCE_FILES ${llprimitive_HEADER_FILES}) add_library (llprimitive ${llprimitive_SOURCE_FILES}) +set_target_include_dirs( llprimitive ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(llprimitive - ${LLCOMMON_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${LLXML_LIBRARIES} - ${LLPHYSICSEXTENSIONS_LIBRARIES} - ${LLCHARACTER_LIBRARIES} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ) - + llcommon + llmath + llmessage + llcorehttp + llxml + llcharacter + llphysicsextensions + colladadom::colladadom + pcre::pcre + ) #add unit tests if (LL_TESTS) diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt index baab09a104..7d42043613 100644 --- a/indra/llrender/CMakeLists.txt +++ b/indra/llrender/CMakeLists.txt @@ -7,26 +7,7 @@ include(OpenGL) include(FreeType) include(LLCommon) include(LLImage) -include(LLMath) -include(LLRender) include(LLWindow) -include(LLXML) -include(LLFileSystem) - -include_directories( - ${FREETYPE_INCLUDE_DIRS} - ${LLCOMMON_INCLUDE_DIRS} - ${LLIMAGE_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLRENDER_INCLUDE_DIRS} - ${LLFILESYSTEM_INCLUDE_DIRS} - ${LLWINDOW_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ${LLXML_SYSTEM_INCLUDE_DIRS} - ) set(llrender_SOURCE_FILES llatmosphere.cpp @@ -98,18 +79,17 @@ if (BUILD_HEADLESS) ) target_link_libraries(llrenderheadless - ${LLCOMMON_LIBRARIES} - ${LLIMAGE_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLRENDER_HEADLESS_LIBRARIES} - ${LLXML_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLWINDOW_HEADLESS_LIBRARIES} - ${OPENGL_HEADLESS_LIBRARIES}) - + llcommon + llimage + llmath + llrender + llxml + llfilesystem + ) endif (BUILD_HEADLESS) add_library (llrender ${llrender_SOURCE_FILES}) +set_target_include_dirs(llrender ${CMAKE_CURRENT_SOURCE_DIR}) if (SDL_FOUND) set_property(TARGET llrender @@ -119,13 +99,15 @@ endif (SDL_FOUND) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level -target_link_libraries(llrender - ${LLCOMMON_LIBRARIES} - ${LLIMAGE_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLXML_LIBRARIES} - ${LLWINDOW_LIBRARIES} - ${FREETYPE_LIBRARIES} - ${OPENGL_LIBRARIES}) +target_link_libraries(llrender + llcommon + llimage + llmath + llfilesystem + llxml + llwindow + freetype::freetype + OpenGL::GL + OpenGL::GLU + ) diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index d96824bbf8..04103b1a94 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -6,33 +6,9 @@ include(00-Common) include(Hunspell) include(LLCommon) include(LLImage) -include(LLInventory) -include(LLMath) -include(LLMessage) include(LLCoreHttp) -include(LLRender) include(LLWindow) include(LLCoreHttp) -include(LLFileSystem) -include(LLXML) - -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLCOREHTTP_INCLUDE_DIRS} - ${LLIMAGE_INCLUDE_DIRS} - ${LLINVENTORY_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLMESSAGE_INCLUDE_DIRS} - ${LLRENDER_INCLUDE_DIRS} - ${LLWINDOW_INCLUDE_DIRS} - ${LLFILESYSTEM_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ${LIBS_PREBUILD_DIR}/include/hunspell - ) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ${LLXML_SYSTEM_INCLUDE_DIRS} - ) set(llui_SOURCE_FILES llaccordionctrl.cpp @@ -276,38 +252,37 @@ set_source_files_properties(llurlentry.cpp list(APPEND llui_SOURCE_FILES ${llui_HEADER_FILES}) add_library (llui ${llui_SOURCE_FILES}) +set_target_include_dirs( llui ${CMAKE_CURRENT_SOURCE_DIR}) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level target_link_libraries(llui - ${LLRENDER_LIBRARIES} - ${LLWINDOW_LIBRARIES} - ${LLIMAGE_LIBRARIES} - ${LLINVENTORY_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLXUIXML_LIBRARIES} - ${LLXML_LIBRARIES} - ${LLMATH_LIBRARIES} - ${HUNSPELL_LIBRARY} - ${LLMESSAGE_LIBRARIES} - ${LLCOMMON_LIBRARIES} # must be after llimage, llwindow, llrender + llrender + llwindow + llimage + llinventory + llmessage + llcorehttp + llfilesystem + llxml + llmath + hunspell::hunspell + llcommon ) # Add tests if(LL_TESTS) include(LLAddBuildTest) + set(test_libs llmessage llcorehttp llxml llrender llcommon hunspell::hunspell ${WINDOWS_LIBRARIES}) + SET(llui_TEST_SOURCE_FILES llurlmatch.cpp ) + set_property( SOURCE ${llui_TEST_SOURCE_FILES} PROPERTY LL_TEST_ADDITIONAL_LIBRARIES ${test_libs}) LL_ADD_PROJECT_UNIT_TESTS(llui "${llui_TEST_SOURCE_FILES}") # INTEGRATION TESTS - set(test_libs llui llmessage llcorehttp llcommon - ${HUNSPELL_LIBRARY} - ${LLCOMMON_LIBRARIES} - ${BOOST_FIBER_LIBRARY} ${BOOST_CONTEXT_LIBRARY} ${BOOST_SYSTEM_LIBRARY} - ${WINDOWS_LIBRARIES}) + if(NOT LINUX) + set(test_libs llui llmessage llcorehttp llxml llrender llcommon hunspell::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 70eb99c86c..952fbbb56f 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -14,26 +14,9 @@ include(00-Common) include(DragDrop) include(LLCommon) include(LLImage) -include(LLMath) -include(LLRender) -include(LLFileSystem) include(LLWindow) -include(LLXML) include(UI) -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLIMAGE_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLRENDER_INCLUDE_DIRS} - ${LLFILESYSTEM_INCLUDE_DIRS} - ${LLWINDOW_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ${LLXML_SYSTEM_INCLUDE_DIRS} - ) set(llwindow_SOURCE_FILES llcursortypes.cpp @@ -64,17 +47,18 @@ set(viewer_HEADER_FILES llmousehandler.h ) +set(llwindow_LINK_LIBRARIES + llcommon + llimage + llmath + llrender + llfilesystem + llxml + ) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level if (LINUX) - set(llwindow_LINK_LIBRARIES - ${LLCOMMON_LIBRARIES} - ${LLIMAGE_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLRENDER_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLWINDOW_LIBRARIES} - ${LLXML_LIBRARIES} + set(llwindow_LINK_LIBRARIES APPEND ${UI_LIBRARIES} # for GTK ${SDL_LIBRARY} fontconfig # For FCInit and other FC* functions. @@ -196,5 +180,5 @@ if (SDL_FOUND) ) endif (SDL_FOUND) - target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES}) - +target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES}) +set_target_include_dirs(llwindow ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt index 3a7a54e51d..b585dbd26e 100644 --- a/indra/llxml/CMakeLists.txt +++ b/indra/llxml/CMakeLists.txt @@ -4,18 +4,6 @@ project(llxml) include(00-Common) include(LLCommon) -include(LLMath) -include(LLFileSystem) -include(LLXML) - -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLFILESYSTEM_INCLUDE_DIRS} - ) -include_directories( - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ) set(llxml_SOURCE_FILES llcontrol.cpp @@ -42,11 +30,13 @@ add_library (llxml ${llxml_SOURCE_FILES}) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level target_link_libraries( llxml - ${LLFILESYSTEM_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${EXPAT_LIBRARIES} + llfilesystem + llmath + llcommon + expat::expat ) +set_target_include_dirs( llxml ${CMAKE_CURRENT_SOURCE_DIR}) + # tests @@ -62,11 +52,11 @@ if (LL_TESTS) # set(TEST_DEBUG on) set(test_libs - ${LLXML_LIBRARIES} - ${WINDOWS_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ) + llxml + llmath + llcommon + ${WINDOWS_LIBRARIES} + ) LL_ADD_INTEGRATION_TEST(llcontrol "" "${test_libs}") endif (LL_TESTS) diff --git a/indra/media_plugins/base/CMakeLists.txt b/indra/media_plugins/base/CMakeLists.txt index 7f2b82ffdd..9da249bd27 100644 --- a/indra/media_plugins/base/CMakeLists.txt +++ b/indra/media_plugins/base/CMakeLists.txt @@ -5,25 +5,9 @@ project(media_plugin_base) include(00-Common) include(LLCommon) include(LLImage) -include(LLPlugin) -include(LLMath) -include(LLRender) include(LLWindow) include(Linking) include(PluginAPI) -include(OpenGL) - -include_directories( - ${LLPLUGIN_INCLUDE_DIRS} - ${LLCOMMON_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLIMAGE_INCLUDE_DIRS} - ${LLRENDER_INCLUDE_DIRS} - ${LLWINDOW_INCLUDE_DIRS} -) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ) ### media_plugin_base @@ -48,5 +32,7 @@ set(media_plugin_base_HEADER_FILES add_library(media_plugin_base ${media_plugin_base_SOURCE_FILES} - ) + ) +target_link_libraries( media_plugin_base llplugin ) +set_target_include_dirs(media_plugin_base ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 854ba55731..8d14714020 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -5,29 +5,12 @@ project(media_plugin_cef) include(Boost) include(00-Common) include(LLCommon) -include(LLPlugin) -include(LLMath) -include(LLRender) include(LLWindow) include(Linking) include(PluginAPI) -include(MediaPluginBase) include(CEFPlugin) -include_directories( - ${LLPLUGIN_INCLUDE_DIRS} - ${MEDIA_PLUGIN_BASE_INCLUDE_DIRS} - ${LLCOMMON_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLRENDER_INCLUDE_DIRS} - ${LLWINDOW_INCLUDE_DIRS} - ${CEF_INCLUDE_DIR} -) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ) - ### media_plugin_cef @@ -47,13 +30,6 @@ set(media_plugin_cef_HEADER_FILES volume_catcher.h ) -set (media_plugin_cef_LINK_LIBRARIES - ${LLPLUGIN_LIBRARIES} - ${MEDIA_PLUGIN_BASE_LIBRARIES} - ${CEF_PLUGIN_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${PLUGIN_API_WINDOWS_LIBRARIES}) - # Select which VolumeCatcher implementation to use if (LINUX) message(FATAL_ERROR "CEF plugin has been enabled for a Linux compile.\n" @@ -62,7 +38,7 @@ elseif (DARWIN) list(APPEND media_plugin_cef_SOURCE_FILES mac_volume_catcher_null.cpp) find_library(CORESERVICES_LIBRARY CoreServices) find_library(AUDIOUNIT_LIBRARY AudioUnit) - list(APPEND media_plugin_cef_LINK_LIBRARIES + set( media_plugin_cef_LINK_LIBRARIES ${CORESERVICES_LIBRARY} # for Component Manager calls ${AUDIOUNIT_LIBRARY} # for AudioUnit calls ) @@ -85,7 +61,9 @@ add_library(media_plugin_cef #) target_link_libraries(media_plugin_cef - ${media_plugin_cef_LINK_LIBRARIES} + media_plugin_base + cef::cef + ${media_plugin_cef_LINK_LIBRARIES} ) if (WINDOWS) diff --git a/indra/media_plugins/example/CMakeLists.txt b/indra/media_plugins/example/CMakeLists.txt index eb067a7f6e..7d3e7f663b 100644 --- a/indra/media_plugins/example/CMakeLists.txt +++ b/indra/media_plugins/example/CMakeLists.txt @@ -5,31 +5,12 @@ project(media_plugin_example) include(00-Common) include(LLCommon) include(LLImage) -include(LLPlugin) -include(LLMath) -include(LLRender) include(LLWindow) include(Linking) include(PluginAPI) -include(MediaPluginBase) -include(OpenGL) include(ExamplePlugin) -include_directories( - ${LLPLUGIN_INCLUDE_DIRS} - ${MEDIA_PLUGIN_BASE_INCLUDE_DIRS} - ${LLCOMMON_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLIMAGE_INCLUDE_DIRS} - ${LLRENDER_INCLUDE_DIRS} - ${LLWINDOW_INCLUDE_DIRS} -) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ) - - ### media_plugin_example if(NOT ADDRESS_SIZE EQUAL 32) @@ -49,21 +30,7 @@ add_library(media_plugin_example ${media_plugin_example_SOURCE_FILES} ) -target_link_libraries(media_plugin_example - ${LLPLUGIN_LIBRARIES} - ${MEDIA_PLUGIN_BASE_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${EXAMPLE_PLUGIN_LIBRARIES} - ${PLUGIN_API_WINDOWS_LIBRARIES} -) - -add_dependencies(media_plugin_example - ${LLPLUGIN_LIBRARIES} - ${MEDIA_PLUGIN_BASE_LIBRARIES} - # Using ${LLCOMMON_LIBRARIES} here drags in a whole bunch of Boost stuff - # that only produces CMake warnings about nonexistent dependencies. - llcommon -) +target_link_libraries(media_plugin_example media_plugin_base ) if (WINDOWS) set_target_properties( diff --git a/indra/media_plugins/gstreamer010/CMakeLists.txt b/indra/media_plugins/gstreamer010/CMakeLists.txt index 571eb57b24..c66b5d0d2e 100644 --- a/indra/media_plugins/gstreamer010/CMakeLists.txt +++ b/indra/media_plugins/gstreamer010/CMakeLists.txt @@ -16,20 +16,6 @@ include(OpenGL) include(GStreamer010Plugin) -include_directories( - ${LLPLUGIN_INCLUDE_DIRS} - ${MEDIA_PLUGIN_BASE_INCLUDE_DIRS} - ${LLCOMMON_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLIMAGE_INCLUDE_DIRS} - ${LLRENDER_INCLUDE_DIRS} - ${LLWINDOW_INCLUDE_DIRS} - ${GSTREAMER010_INCLUDE_DIRS} - ${GSTREAMER010_PLUGINS_BASE_INCLUDE_DIRS} -) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ) ### media_plugin_gstreamer010 @@ -59,17 +45,5 @@ add_library(media_plugin_gstreamer010 ) target_link_libraries(media_plugin_gstreamer010 - ${LLPLUGIN_LIBRARIES} - ${MEDIA_PLUGIN_BASE_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${PLUGIN_API_WINDOWS_LIBRARIES} - ${GSTREAMER010_LIBRARIES} -) - -add_dependencies(media_plugin_gstreamer010 - ${LLPLUGIN_LIBRARIES} - ${MEDIA_PLUGIN_BASE_LIBRARIES} - ${LLCOMMON_LIBRARIES} -) - - + media_plugin_base + ) diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt index 97392bbe08..cae1c4f92b 100644 --- a/indra/media_plugins/libvlc/CMakeLists.txt +++ b/indra/media_plugins/libvlc/CMakeLists.txt @@ -5,32 +5,12 @@ project(media_plugin_libvlc) include(00-Common) include(LLCommon) include(LLImage) -include(LLPlugin) -include(LLMath) -include(LLRender) include(LLWindow) include(Linking) include(PluginAPI) -include(MediaPluginBase) -include(OpenGL) include(LibVLCPlugin) -include_directories( - ${LLPLUGIN_INCLUDE_DIRS} - ${MEDIA_PLUGIN_BASE_INCLUDE_DIRS} - ${LLCOMMON_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLIMAGE_INCLUDE_DIRS} - ${LLRENDER_INCLUDE_DIRS} - ${LLWINDOW_INCLUDE_DIRS} - ${VLC_INCLUDE_DIR} -) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ) - - ### media_plugin_libvlc if(NOT ADDRESS_SIZE EQUAL 32) @@ -51,27 +31,8 @@ add_library(media_plugin_libvlc ) target_link_libraries(media_plugin_libvlc - ${LLPLUGIN_LIBRARIES} - ${MEDIA_PLUGIN_BASE_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${VLC_PLUGIN_LIBRARIES} - ${PLUGIN_API_WINDOWS_LIBRARIES} -) - -add_dependencies(media_plugin_libvlc - ${LLPLUGIN_LIBRARIES} - ${MEDIA_PLUGIN_BASE_LIBRARIES} -##${LLCOMMON_LIBRARIES} - # Just say 'llcommon' here. LLCOMMON_LIBRARIES is specified for use in - # target_link_libraries: it includes several Boost libraries, which are - # absolutely NOT dependencies in the sense intended here. Those Boost - # library macros, in turn, specify 'debug' and 'optimized' and a different - # library name for each, producing several wordy errors: - # Policy CMP0046 is not set: Error on non-existent dependency in - # add_dependencies. - # Really, the only dependency we should mention from LLCOMMON_LIBRARIES is - # llcommon itself. - llcommon + media_plugin_base + libvlc::libvlc ) if (WINDOWS) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 85e39bbb2d..9168941014 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -24,24 +24,13 @@ include(JsonCpp) include(LLAppearance) include(LLAudio) include(LLCA) -include(LLCharacter) include(LLCommon) include(LLCoreHttp) include(LLImage) -include(LLImageJ2COJ) -include(LLInventory) include(LLKDU) -include(LLLogin) -include(LLMath) -include(LLMessage) include(LLPhysicsExtensions) -include(LLPlugin) include(LLPrimitive) -include(LLRender) -include(LLUI) -include(LLFileSystem) include(LLWindow) -include(LLXML) include(NDOF) include(NVAPI) include(OPENAL) @@ -57,57 +46,17 @@ include(ViewerManager) include(VisualLeakDetector) include(ZLIBNG) include(URIPARSER) +include(LLPrimitive) + +include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) if (NOT HAVOK_TPV) # When using HAVOK_TPV, the library is precompiled, so no need for this add_subdirectory(${LLPHYSICSEXTENSIONS_SRC_DIR} llphysicsextensions) + cmake_policy( SET CMP0079 NEW) + target_link_libraries(llphysicsextensionsstub llcommon llmath) endif (NOT HAVOK_TPV) -if(FMODSTUDIO) - include_directories(${FMODSTUDIO_INCLUDE_DIR}) -endif(FMODSTUDIO) - -include_directories( - ${DBUSGLIB_INCLUDE_DIRS} - ${JSONCPP_INCLUDE_DIR} - ${GLOD_INCLUDE_DIR} - ${LLAUDIO_INCLUDE_DIRS} - ${LLCHARACTER_INCLUDE_DIRS} - ${LLCOMMON_INCLUDE_DIRS} - ${LLCOREHTTP_INCLUDE_DIRS} - ${LLPHYSICS_INCLUDE_DIRS} - ${LLIMAGE_INCLUDE_DIRS} - ${LLKDU_INCLUDE_DIRS} - ${LLINVENTORY_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLMESSAGE_INCLUDE_DIRS} - ${LLPLUGIN_INCLUDE_DIRS} - ${LLPRIMITIVE_INCLUDE_DIRS} - ${LLRENDER_INCLUDE_DIRS} - ${LLUI_INCLUDE_DIRS} - ${LLFILESYSTEM_INCLUDE_DIRS} - ${LLWINDOW_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ${LLLOGIN_INCLUDE_DIRS} - ${LIBS_PREBUILT_DIR}/include/collada - ${LIBS_PREBUILD_DIR}/include/hunspell - ${OPENAL_LIB_INCLUDE_DIRS} - ${LIBS_PREBUILT_DIR}/include/collada/1.4 - ${LLAPPEARANCE_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR} - ) - -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ${LLXML_SYSTEM_INCLUDE_DIRS} - ${LLPHYSICSEXTENSIONS_INCLUDE_DIRS} - ) - -if (USE_BUGSPLAT) - include_directories(AFTER - ${BUGSPLAT_INCLUDE_DIR} - ) -endif (USE_BUGSPLAT) set(viewer_SOURCE_FILES groupchatlistener.cpp @@ -1428,7 +1377,7 @@ if (DARWIN) if (USE_BUGSPLAT) list(APPEND viewer_LIBRARIES - ${BUGSPLAT_LIBRARIES} + bugsplat::bugsplat ) endif (USE_BUGSPLAT) @@ -2023,54 +1972,41 @@ endif (WINDOWS) # modern version. target_link_libraries(${VIEWER_BINARY_NAME} - ${LEGACY_STDIO_LIBS} - ${PNG_PRELOAD_ARCHIVES} - ${ZLIBNG_PRELOAD_ARCHIVES} - ${URIPARSER_PRELOAD_ARCHIVES} - ${GOOGLE_PERFTOOLS_LIBRARIES} - ${LLAUDIO_LIBRARIES} - ${LLCHARACTER_LIBRARIES} - ${LLIMAGE_LIBRARIES} - ${LLINVENTORY_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLPLUGIN_LIBRARIES} - ${LLPRIMITIVE_LIBRARIES} - ${LLRENDER_LIBRARIES} - ${FREETYPE_LIBRARIES} - ${LLUI_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLWINDOW_LIBRARIES} - ${LLXML_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${NDOF_LIBRARY} - ${NVAPI_LIBRARY} - ${HUNSPELL_LIBRARY} - ${viewer_LIBRARIES} - ${BOOST_PROGRAM_OPTIONS_LIBRARY} - ${BOOST_REGEX_LIBRARY} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${DBUSGLIB_LIBRARIES} - ${OPENGL_LIBRARIES} - ${FMODWRAPPER_LIBRARY} # must come after LLAudio - ${GLOD_LIBRARIES} - ${OPENGL_LIBRARIES} - ${JSONCPP_LIBRARIES} - ${SDL_LIBRARY} - ${SMARTHEAP_LIBRARY} - ${UI_LIBRARIES} - ${WINDOWS_LIBRARIES} - ${EXPAT_LIBRARIES} - ${XMLRPCEPI_LIBRARIES} - ${OPENSSL_LIBRARIES} - ${CRYPTO_LIBRARIES} - ${LLLOGIN_LIBRARIES} - ${LLPHYSICS_LIBRARIES} - ${LLPHYSICSEXTENSIONS_LIBRARIES} - ${LLAPPEARANCE_LIBRARIES} - ) + ${LEGACY_STDIO_LIBS} + llaudio + llcharacter + llimage + llinventory + llmessage + llplugin + llprimitive + llrender + llui + llfilesystem + llwindow + llxml + llmath + llcorehttp + llcommon + ${viewer_LIBRARIES} + ${FMODWRAPPER_LIBRARY} # must come after LLAudio + glod::glod + ndof::ndof + ${SDL_LIBRARY} + ${SMARTHEAP_LIBRARY} + ${UI_LIBRARIES} + ${WINDOWS_LIBRARIES} + lllogin + llprimitive + llappearance + ${LLPHYSICS_LIBRARIES} + ${LLPHYSICSEXTENSIONS_LIBRARIES} + ) + +if( TARGET nvapi::nvapi ) + target_link_libraries(${VIEWER_BINARY_NAME} nvapi::nvapi ) +endif() + if (USE_BUGSPLAT) target_link_libraries(${VIEWER_BINARY_NAME} @@ -2386,10 +2322,15 @@ if (LL_TESTS) ) set(test_libs - ${LLCOMMON_LIBRARIES} - ${JSONCPP_LIBRARIES} - ${CURL_LIBRARIES} - ${NGHTTP2_LIBRARIES} + llcommon + llfilesystem + llxml + llmessage + llcharacter + llui + lllogin + llplugin + llappearance ) set_source_files_properties( @@ -2398,17 +2339,6 @@ if (LL_TESTS) LL_TEST_ADDITIONAL_LIBRARIES "${test_libs}" ) - set_source_files_properties( - llviewerhelputil.cpp - PROPERTIES - LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}" - ) - - set_source_files_properties( - llremoteparcelrequest.cpp - PROPERTIES - LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}" - ) set_source_files_properties( llworldmap.cpp @@ -2416,27 +2346,23 @@ if (LL_TESTS) PROPERTIES LL_TEST_ADDITIONAL_SOURCE_FILES tests/llviewertexture_stub.cpp - #llviewertexturelist.cpp - LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}" ) set_source_files_properties( llmediadataclient.cpp PROPERTIES - LL_TEST_ADDITIONAL_LIBRARIES "${LLPRIMITIVE_LIBRARIES}" - ) - - set_source_files_properties( - llagentaccess.cpp - PROPERTIES - LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}" + LL_TEST_ADDITIONAL_LIBRARIES llprimitive ) set_source_files_properties( lllogininstance.cpp PROPERTIES LL_TEST_ADDITIONAL_SOURCE_FILES llversioninfo.cpp - LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}" + ) + set_property( SOURCE + ${viewer_TEST_SOURCE_FILES} + PROPERTY + LL_TEST_ADDITIONAL_LIBRARIES ${test_libs} ) ################################################## @@ -2458,41 +2384,29 @@ if (LL_TESTS) # if(USE_PRECOMPILED_HEADERS) # set(test_sources "${test_sources}" llviewerprecompiledheaders.cpp) # endif(USE_PRECOMPILED_HEADERS) - set(test_libs - ${LLMESSAGE_LIBRARIES} - ${WINDOWS_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${GOOGLEMOCK_LIBRARIES} - ) - if (LINUX) - # llcommon uses `clock_gettime' which is provided by librt on linux. - set(LIBRT_LIBRARY - rt - ) - endif (LINUX) set(test_libs - ${WINDOWS_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${GOOGLEMOCK_LIBRARIES} - ${OPENSSL_LIBRARIES} - ${CRYPTO_LIBRARIES} - ${LIBRT_LIBRARY} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ) + ${WINDOWS_LIBRARIES} + llfilesystem + llmath + llcommon + llmessage + llcorehttp + llxml + llui + llplugin + llappearance + lllogin + llprimitive + lllogin + ) LL_ADD_INTEGRATION_TEST(cppfeatures "" "${test_libs}" ) + LL_ADD_INTEGRATION_TEST(llsechandler_basic llsechandler_basic.cpp "${test_libs}" @@ -2508,7 +2422,6 @@ if (LL_TESTS) llviewernetwork.cpp ) - LL_ADD_INTEGRATION_TEST(llslurl "${llslurl_test_sources}" "${test_libs}" @@ -2531,15 +2444,6 @@ if (LL_TESTS) #ADD_VIEWER_BUILD_TEST(lltextureinfo viewer) #ADD_VIEWER_BUILD_TEST(lltextureinfodetails viewer) -include(LLAddBuildTest) -SET(viewer_TEST_SOURCE_FILES - llagentaccess.cpp - ) -set_source_files_properties( - ${viewer_TEST_SOURCE_FILES} - PROPERTIES - LL_TEST_ADDITIONAL_SOURCE_FILES llviewerprecompiledheaders.cpp - ) endif (LL_TESTS) diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 084aa8d9f7..1e9fdfa003 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -5,11 +5,6 @@ project (lltest) include(00-Common) include(LLCommon) include(LLCoreHttp) -include(LLInventory) -include(LLMath) -include(LLMessage) -include(LLFileSystem) -include(LLXML) include(Linking) include(Tut) include(LLAddBuildTest) @@ -88,27 +83,18 @@ if (USE_BUGSPLAT) endif (USE_BUGSPLAT) target_link_libraries(lltest - ${LEGACY_STDIO_LIBS} - ${LLDATABASE_LIBRARIES} - ${LLINVENTORY_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLXML_LIBRARIES} - ${LSCRIPT_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${EXPAT_LIBRARIES} - ${GOOGLEMOCK_LIBRARIES} - ${PTHREAD_LIBRARY} - ${WINDOWS_LIBRARIES} - ${BOOST_PROGRAM_OPTIONS_LIBRARY} - ${BOOST_REGEX_LIBRARY} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} - ${DL_LIBRARY} - ) + ${LEGACY_STDIO_LIBS} + ${LLDATABASE_LIBRARIES} + llinventory + llmessage + llmath + llfilesystem + llxml + llcommon + llcorehttp + ${WINDOWS_LIBRARIES} + ${DL_LIBRARY} + ) if (WINDOWS) set_target_properties(lltest diff --git a/indra/viewer_components/login/CMakeLists.txt b/indra/viewer_components/login/CMakeLists.txt index 23518b791c..0508a17f3a 100644 --- a/indra/viewer_components/login/CMakeLists.txt +++ b/indra/viewer_components/login/CMakeLists.txt @@ -7,21 +7,7 @@ if(LL_TESTS) include(LLAddBuildTest) endif(LL_TESTS) include(LLCommon) -include(LLMath) -include(LLXML) -include(Boost) include(LLCoreHttp) -include(LLMessage) - -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ${LLXML_SYSTEM_INCLUDE_DIRS} - ) set(login_SOURCE_FILES lllogin.cpp @@ -42,17 +28,14 @@ list(APPEND add_library(lllogin ${login_SOURCE_FILES} ) +set_target_include_dirs( lllogin ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(lllogin - ${LLMESSAGE_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLXML_LIBRARIES} - ${BOOST_THREAD_LIBRARY} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} + llmessage + llcorehttp + llcommon + llmath + llxml ) if(LL_TESTS) @@ -62,7 +45,7 @@ if(LL_TESTS) set_source_files_properties( lllogin.cpp PROPERTIES - LL_TEST_ADDITIONAL_LIBRARIES "${LLMESSAGE_LIBRARIES};${LLCOREHTTP_LIBRARIES};${LLCOMMON_LIBRARIES};${BOOST_FIBER_LIBRARY};${BOOST_CONTEXT_LIBRARY};${BOOST_THREAD_LIBRARY};${BOOST_SYSTEM_LIBRARY}" + LL_TEST_ADDITIONAL_LIBRARIES llmessage llcorehttp llcommon ) LL_ADD_PROJECT_UNIT_TESTS(lllogin "${lllogin_TEST_SOURCE_FILES}") -- cgit v1.2.3 From 495b35032ce5616cfe99f0fcb58c8963a7454929 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 20:22:13 +0200 Subject: Remove erroneous lines. --- indra/cmake/FMODSTUDIO.cmake | 1 - indra/cmake/LLKDU.cmake | 1 - 2 files changed, 2 deletions(-) diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index e8699cdecd..41a75741c9 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -12,7 +12,6 @@ if (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 diff --git a/indra/cmake/LLKDU.cmake b/indra/cmake/LLKDU.cmake index 25762ab066..a0463be635 100644 --- a/indra/cmake/LLKDU.cmake +++ b/indra/cmake/LLKDU.cmake @@ -20,7 +20,6 @@ if (USE_KDU) else (WINDOWS) set_target_libraries( kdu::kdu libkdu.a) endif (WINDOWS) - set_target_libraries( kdu::kdu kdu.lib) set_target_include_dirs( kdu::kdu ${AUTOBUILD_INSTALL_DIR}/include/kdu -- cgit v1.2.3 From a4e273437262e435940d2fd2f75b72e0cf0ab1bc Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 20:23:21 +0200 Subject: Use kdu target --- indra/llkdu/CMakeLists.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/indra/llkdu/CMakeLists.txt b/indra/llkdu/CMakeLists.txt index 035fc746cf..780951cf9d 100644 --- a/indra/llkdu/CMakeLists.txt +++ b/indra/llkdu/CMakeLists.txt @@ -14,7 +14,6 @@ include(LLCommon) include(LLImage) include(LLKDU) - set(llkdu_SOURCE_FILES llimagej2ckdu.cpp llkdumem.cpp @@ -43,10 +42,14 @@ set_source_files_properties(${llkdu_SOURCE_FILES} if (USE_KDU) add_library (llkdu ${llkdu_SOURCE_FILES}) - target_link_libraries(llkdu kdu::kdu ) + target_link_libraries(llkdu kdu::kdu llimage llcommon) + set_target_include_dirs( llkdu ${CMAKE_CURRENT_SOURCE_DIR}) # Add tests - if (LL_TESTS) + # ND: llkdu tests are very strange as they include stubs for KDU classes/methods + # if not having access to the right KDU version this test will fail to compile, incidentally I do not + # have access to a matching version of KDU and thus cannot get this tests to compile + if (LL_TESTS_KDU) include(LLAddBuildTest) include(Tut) SET(llkdu_TEST_SOURCE_FILES @@ -58,7 +61,11 @@ if (USE_KDU) lltut.h ) + 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_INCLUDE_DIRS ${llimage_include_dir}) + LL_ADD_PROJECT_UNIT_TESTS(llkdu "${llkdu_TEST_SOURCE_FILES}") - endif (LL_TESTS) + endif (LL_TESTS_KDU) endif (USE_KDU) -- cgit v1.2.3 From bed0b80374c3acfc584587a9b0bc02f8bf899876 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 20:23:54 +0200 Subject: Remove obsolete include directives --- indra/test/CMakeLists.txt | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 1e9fdfa003..b607980bae 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -11,24 +11,6 @@ include(LLAddBuildTest) include(bugsplat) include(GoogleMock) -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLCOREHTTP_INCLUDE_DIRS} - ${LLDATABASE_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLMESSAGE_INCLUDE_DIRS} - ${LLINVENTORY_INCLUDE_DIRS} - ${LLFILESYSTEM_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ${LSCRIPT_INCLUDE_DIRS} - ${GOOGLEMOCK_INCLUDE_DIRS} - ${TUT_INCLUDE_DIR} - ) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ${LLXML_SYSTEM_INCLUDE_DIRS} - ) - set(test_SOURCE_FILES io.cpp llapp_tut.cpp -- cgit v1.2.3 From 5f7c74fa2e796c04915b6da5e7db013a94c00e2d Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 20:25:49 +0200 Subject: Create and use sdl::sdl target --- indra/cmake/LLWindow.cmake | 16 ++++++++-------- indra/llrender/CMakeLists.txt | 7 +------ indra/llwindow/CMakeLists.txt | 8 +------- indra/newview/CMakeLists.txt | 13 ------------- 4 files changed, 10 insertions(+), 34 deletions(-) diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index ac14ead0de..d0dca3dfdd 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -4,6 +4,11 @@ include(Variables) include(GLEXT) include(Prebuilt) +if( TARGET sdl::sdl) + return() +endif() +create_target(sdl::sdl) + if (USESYSTEMLIBS) include(FindSDL) @@ -16,15 +21,10 @@ if (USESYSTEMLIBS) else (USESYSTEMLIBS) if (LINUX) use_prebuilt_binary(SDL) - set (SDL_FOUND TRUE) - set (SDL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/i686-linux) - set (SDL_LIBRARY SDL directfb fusion direct X11) + 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) endif (LINUX) endif (USESYSTEMLIBS) -if (SDL_FOUND) - include_directories(${SDL_INCLUDE_DIR}) -endif (SDL_FOUND) - - diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt index 7d42043613..cb98886f9b 100644 --- a/indra/llrender/CMakeLists.txt +++ b/indra/llrender/CMakeLists.txt @@ -91,12 +91,6 @@ endif (BUILD_HEADLESS) add_library (llrender ${llrender_SOURCE_FILES}) set_target_include_dirs(llrender ${CMAKE_CURRENT_SOURCE_DIR}) -if (SDL_FOUND) - set_property(TARGET llrender - PROPERTY COMPILE_DEFINITIONS LL_SDL=1 - ) -endif (SDL_FOUND) - # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level target_link_libraries(llrender @@ -106,6 +100,7 @@ target_link_libraries(llrender llfilesystem llxml llwindow + sdl::sdl freetype::freetype OpenGL::GL OpenGL::GLU diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index 952fbbb56f..2b5a03d219 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -174,11 +174,5 @@ endif (llwindow_HEADER_FILES) ${viewer_SOURCE_FILES} ) -if (SDL_FOUND) - set_property(TARGET llwindow - PROPERTY COMPILE_DEFINITIONS LL_SDL=1 - ) -endif (SDL_FOUND) - -target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES}) +target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES} sdl::sdl) set_target_include_dirs(llwindow ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 9168941014..eccc082454 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1715,17 +1715,6 @@ add_executable(${VIEWER_BINARY_NAME} ${viewer_SOURCE_FILES} ) -if (SDL_FOUND) - set_property(TARGET ${VIEWER_BINARY_NAME} - PROPERTY COMPILE_DEFINITIONS LL_SDL=1 - ) -endif (SDL_FOUND) - -if (USE_BUGSPLAT) - set_property(TARGET ${VIEWER_BINARY_NAME} - PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}") -endif (USE_BUGSPLAT) - # add package files file(GLOB EVENT_HOST_SCRIPT_GLOB_LIST ${CMAKE_CURRENT_SOURCE_DIR}/../viewer_components/*.py) @@ -1989,10 +1978,8 @@ target_link_libraries(${VIEWER_BINARY_NAME} llcorehttp llcommon ${viewer_LIBRARIES} - ${FMODWRAPPER_LIBRARY} # must come after LLAudio glod::glod ndof::ndof - ${SDL_LIBRARY} ${SMARTHEAP_LIBRARY} ${UI_LIBRARIES} ${WINDOWS_LIBRARIES} -- cgit v1.2.3 From f6a5b2496dae96e6e0af4ae073433c7e8f413536 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 20:26:37 +0200 Subject: Create and use bugsplat target --- indra/cmake/bugsplat.cmake | 8 ++++++-- indra/newview/CMakeLists.txt | 6 ++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake index ded109f9f1..a74518354d 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -9,8 +9,12 @@ 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) + if (USE_BUGSPLAT) - create_target(bugsplat::bugsplat) if (NOT USESYSTEMLIBS) include(Prebuilt) use_prebuilt_binary(bugsplat) @@ -34,6 +38,6 @@ if (USE_BUGSPLAT) set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name") set_target_include_dirs( bugsplat::bugsplat ${LIBS_PREBUILT_DIR}/include/bugsplat) - set(BUGSPLAT_DEFINE "LL_BUGSPLAT") + target_compile_definitions( bugsplat::bugsplat INTERFACE LL_BUGSPLAT) endif (USE_BUGSPLAT) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index eccc082454..1253c0971c 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1688,7 +1688,6 @@ endif (OPENAL) if (FMODSTUDIO) set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMODSTUDIO") - set(FMODWRAPPER_LIBRARY ${FMODSTUDIO_LIBRARY}) endif (FMODSTUDIO) set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") @@ -1988,6 +1987,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} llappearance ${LLPHYSICS_LIBRARIES} ${LLPHYSICSEXTENSIONS_LIBRARIES} + bugsplat::bugsplat ) if( TARGET nvapi::nvapi ) @@ -1996,9 +1996,7 @@ endif() if (USE_BUGSPLAT) - target_link_libraries(${VIEWER_BINARY_NAME} - ${BUGSPLAT_LIBRARIES} - ) + endif (USE_BUGSPLAT) set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH -- cgit v1.2.3 From e98a6b52ee5309715b5a3353d63cbb3ea2c8d8db Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 22:35:51 +0200 Subject: Remove boost_signals, it is not included in the 3p package. --- indra/cmake/Boost.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 00bfedfb71..8e5ef66af8 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -54,7 +54,6 @@ else (USESYSTEMLIBS) boost_filesystem-mt${addrsfx} boost_program_options-mt${addrsfx} boost_regex-mt${addrsfx} - boost_signals-mt${addrsfx} boost_system-mt${addrsfx} boost_thread-mt${addrsfx}) endif (WINDOWS) -- cgit v1.2.3 From dae6c3d2bf73a8f49d088682fed86409c5544f63 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 22:36:42 +0200 Subject: Remove erroneous characters. --- indra/cmake/LibVLCPlugin.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake index a7acd64d62..2adedbfae3 100644 --- a/indra/cmake/LibVLCPlugin.cmake +++ b/indra/cmake/LibVLCPlugin.cmake @@ -24,8 +24,8 @@ if (WINDOWS) ) elseif (DARWIN) set_target_libraries( libvlc::libvlc -`` libvlc.dylib - libvlccore.dylib + libvlc.dylib + libvlccore.dylib ) elseif (LINUX) # Specify a full path to make sure we get a static link -- cgit v1.2.3 From be71a255a0831b865bdd6a1a2c8b86ac710fd379 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 22:37:09 +0200 Subject: Set PNG link targets for OSX and Linux --- indra/cmake/PNG.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/cmake/PNG.cmake b/indra/cmake/PNG.cmake index 54b2438425..cf338ebe5e 100644 --- a/indra/cmake/PNG.cmake +++ b/indra/cmake/PNG.cmake @@ -16,7 +16,7 @@ else (USESYSTEMLIBS) if (WINDOWS) set_target_libraries(libpng::libpng libpng16) else() - set(PNG_LIBRARIES png16) + set_target_libraries(libpng::libpng png16 ) endif() set_target_include_dirs( libpng::libpng ${LIBS_PREBUILT_DIR}/include/libpng16) endif (USESYSTEMLIBS) -- cgit v1.2.3 From ef989bce374516192c59be32af674de19295a31a Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 22:38:08 +0200 Subject: On OSX llcommon also needs CMAKE_CURRENT_SOURCE_DIR as PRIVATE include dir. --- indra/llcommon/CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 901686c815..0fd2581dd4 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -290,6 +290,7 @@ target_link_libraries( ) set_target_include_dirs( llcommon ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ) if (DARWIN) include(CMakeFindFrameworks) @@ -307,10 +308,10 @@ if (LL_TESTS) LL_ADD_PROJECT_UNIT_TESTS(llcommon "${llcommon_TEST_SOURCE_FILES}") #set(TEST_DEBUG on) - set(test_libs llcommon - ${WINDOWS_LIBRARIES} - ${GOOGLEMOCK_LIBRARIES} - ) + set(test_libs llcommon + ${WINDOWS_LIBRARIES} + googlemock::googlemock + ) LL_ADD_INTEGRATION_TEST(bitpack "" "${test_libs}") LL_ADD_INTEGRATION_TEST(classic_callback "" "${test_libs}") LL_ADD_INTEGRATION_TEST(commonmisc "" "${test_libs}") -- cgit v1.2.3 From d1b6a52fefb483ab75ec60e379d37bfd2e6aff90 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 22:38:38 +0200 Subject: Googlemock target --- indra/cmake/GoogleMock.cmake | 29 +++++++++++++++-------------- indra/cmake/LLAddBuildTest.cmake | 15 ++++++--------- indra/llmath/CMakeLists.txt | 5 ----- indra/test/CMakeLists.txt | 1 + 4 files changed, 22 insertions(+), 28 deletions(-) diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake index 5a00546927..58975df62e 100644 --- a/indra/cmake/GoogleMock.cmake +++ b/indra/cmake/GoogleMock.cmake @@ -4,25 +4,26 @@ include(Linking) use_prebuilt_binary(googlemock) -set(GOOGLEMOCK_INCLUDE_DIRS - ${LIBS_PREBUILT_DIR}/include) +if( TARGET googlemock::googlemock ) + return() +endif() +create_target( googlemock::googlemock ) +set_target_include_dirs( googlemock::googlemock + ${LIBS_PREBUILT_DIR}/include + ) if (LINUX) # VWR-24366: gmock is underlinked, it needs gtest. - set(GOOGLEMOCK_LIBRARIES - gmock -Wl,--no-as-needed - gtest -Wl,--as-needed) + set_target_libraries( googlemock::googlemock gmock gtest) elseif(WINDOWS) - set(GOOGLEMOCK_LIBRARIES - gmock) - set(GOOGLEMOCK_INCLUDE_DIRS - ${LIBS_PREBUILT_DIR}/include - ${LIBS_PREBUILT_DIR}/include/gmock - ${LIBS_PREBUILT_DIR}/include/gmock/boost/tr1/tr1) + set_target_libraries( googlemock::googlemock gmock) + set_target_include_dirs( googlemock::googlemock + ${LIBS_PREBUILT_DIR}/include + ${LIBS_PREBUILT_DIR}/include/gmock + ${LIBS_PREBUILT_DIR}/include/gmock/boost/tr1/tr1 ) + elseif(DARWIN) - set(GOOGLEMOCK_LIBRARIES - gmock - gtest) + set_target_libraries( googlemock::googlemock gmock gtest) endif(LINUX) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 6860b1f316..1a8003ea7f 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -45,7 +45,7 @@ INCLUDE(GoogleMock) ) SET(alltest_LIBRARIES llcommon - ${GOOGLEMOCK_LIBRARIES} + googlemock::googlemock ${PTHREAD_LIBRARY} ${WINDOWS_LIBRARIES} ) @@ -206,14 +206,11 @@ FUNCTION(LL_ADD_INTEGRATION_TEST ) SET(libraries - ${LEGACY_STDIO_LIBS} - ${library_dependencies} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} - ${GOOGLEMOCK_LIBRARIES} - ${PTHREAD_LIBRARY} - ) + ${LEGACY_STDIO_LIBS} + ${library_dependencies} + googlemock::googlemock + ${PTHREAD_LIBRARY} + ) # Add test executable build target if(TEST_DEBUG) diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index c385a4cff6..fd7b831719 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -7,11 +7,6 @@ include(LLCommon) include(bugsplat) include(Boost) -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ) - set(llmath_SOURCE_FILES llbbox.cpp llbboxlocal.cpp diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index b607980bae..6d04c3b76b 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -74,6 +74,7 @@ target_link_libraries(lltest llxml llcommon llcorehttp + googlemock::googlemock ${WINDOWS_LIBRARIES} ${DL_LIBRARY} ) -- cgit v1.2.3 From 248b6a25841fd2ceb07e04cb532b64b4238da83c Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 23:28:33 +0200 Subject: Don't bother with debug builds,, they are long deprecated. --- indra/cmake/00-Common.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 45c81b1b30..e8c956bce3 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -42,9 +42,8 @@ if(NON_RELEASE_CRASH_REPORTING) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DLL_SEND_CRASH_REPORTS=1") endif() -# Don't bother with a MinSizeRel build. -set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;Debug" CACHE STRING - "Supported build types." FORCE) +# Don't bother with a MinSizeRel or Debug build. +set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release" CACHE STRING "Supported build types." FORCE) # Platform-specific compilation flags. -- cgit v1.2.3 From e447e0231273f9621f50bb447770e31acaa378dd Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 23:29:26 +0200 Subject: CMake 3.8.0 compatibility --- indra/cmake/bugsplat.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake index a74518354d..820ca8652c 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -38,6 +38,6 @@ if (USE_BUGSPLAT) set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name") set_target_include_dirs( bugsplat::bugsplat ${LIBS_PREBUILT_DIR}/include/bugsplat) - target_compile_definitions( bugsplat::bugsplat INTERFACE LL_BUGSPLAT) + set_property( TARGET bugsplat::bugsplat APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS LL_BUGSPLAT) endif (USE_BUGSPLAT) -- cgit v1.2.3 From 3bcb7fcc716d98a61d77477243cc3a73722ac75f Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 23:29:46 +0200 Subject: Remove noexistant include directory --- indra/cmake/GoogleMock.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake index 58975df62e..821346ced6 100644 --- a/indra/cmake/GoogleMock.cmake +++ b/indra/cmake/GoogleMock.cmake @@ -19,8 +19,7 @@ elseif(WINDOWS) set_target_libraries( googlemock::googlemock gmock) set_target_include_dirs( googlemock::googlemock ${LIBS_PREBUILT_DIR}/include - ${LIBS_PREBUILT_DIR}/include/gmock - ${LIBS_PREBUILT_DIR}/include/gmock/boost/tr1/tr1 ) + ${LIBS_PREBUILT_DIR}/include/gmock) elseif(DARWIN) set_target_libraries( googlemock::googlemock gmock gtest) -- cgit v1.2.3 From 353ae84c90a2b9a1fefff3f94787746168da1a6c Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 23:30:22 +0200 Subject: CMake 3.8.0 compatibility for the ugly havok/stub 3p which really is just a source tarball --- indra/newview/CMakeLists.txt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 1253c0971c..e213087f40 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -52,9 +52,19 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) if (NOT HAVOK_TPV) # When using HAVOK_TPV, the library is precompiled, so no need for this + + # Stub and probably havok lib itself is a hack, autobuild loads a 3p that really is a source tarball + # which includes a CMakeList.txt and then this whole source tree gets pushed into out build ... :/ + # To make matters worse there is a internal assumption about the structure of the viewers CMake layout, + # which means we need to duct tape this togther ... + get_property( LLCOMMON_INCLUDE_DIRS TARGET llcommon PROPERTY INTERFACE_INCLUDE_DIRECTORIES ) + get_property( LLMATH_INCLUDE_DIRS TARGET llmath PROPERTY INTERFACE_INCLUDE_DIRECTORIES ) + add_subdirectory(${LLPHYSICSEXTENSIONS_SRC_DIR} llphysicsextensions) - cmake_policy( SET CMP0079 NEW) - target_link_libraries(llphysicsextensionsstub llcommon llmath) + + # Another hack that works with newer cmake versions: + #cmake_policy( SET CMP0079 NEW) + #target_link_libraries(llphysicsextensionsstub llcommon llmath) endif (NOT HAVOK_TPV) -- cgit v1.2.3 From 603ad5a4f2450f67d2d253f199b3f6a216b30248 Mon Sep 17 00:00:00 2001 From: Nicky Date: Thu, 7 Apr 2022 02:34:32 +0200 Subject: OpenAL is not avaiable for OSX, error out in case someone selects ot. --- indra/cmake/OPENAL.cmake | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake index ab2d258a12..a5058b4bc3 100644 --- a/indra/cmake/OPENAL.cmake +++ b/indra/cmake/OPENAL.cmake @@ -12,6 +12,7 @@ if (OPENAL) if( TARGET openal::openal ) return() endif() + create_target( openal::openal ) set_target_include_dirs( openal::openal "${LIBS_PREBUILT_DIR}/include/AL") @@ -26,13 +27,15 @@ if (OPENAL) if(WINDOWS) set_target_libraries( openal::openal - OpenAL32 - alut - ) - else() + OpenAL32 + alut + ) + elseif(LINUX) set_target_libraries( openal::openal - openal - alut - ) + openal + alut + ) + else() + message(FATAL_ERROR "OpenAL is not available for this platform") endif() endif (OPENAL) -- cgit v1.2.3 From cca7e12e1bacb4ab116ca25d2a33e18d095c8d09 Mon Sep 17 00:00:00 2001 From: Nicky Date: Thu, 7 Apr 2022 02:35:47 +0200 Subject: Bring packages formater step on par with 3p installation: - When installing a 3P via use_prebuilt_binary it will pass --installdir=${AUTOBUILD_INSTALL_DIR} to autobuild. On the other hand packages-formater was not passing this option, this could lead to subtle errors when AUTOBUILD_INSTALL_DIR is different to what autobuild.xml stipulates. --- indra/cmake/BuildPackagesInfo.cmake | 2 +- scripts/packages-formatter.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/indra/cmake/BuildPackagesInfo.cmake b/indra/cmake/BuildPackagesInfo.cmake index 8f8b6b2330..659ba9d579 100644 --- a/indra/cmake/BuildPackagesInfo.cmake +++ b/indra/cmake/BuildPackagesInfo.cmake @@ -16,5 +16,5 @@ add_custom_command(OUTPUT packages-info.txt COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/cmake/run_build_test.py -DAUTOBUILD_ADDRSIZE=${ADDRESS_SIZE} -DAUTOBUILD=${AUTOBUILD_EXECUTABLE} ${PYTHON_EXECUTABLE} - ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py "${VIEWER_CHANNEL}" "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}" > packages-info.txt + ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py "${VIEWER_CHANNEL}" "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}" "${AUTOBUILD_INSTALL_DIR}" > packages-info.txt ) diff --git a/scripts/packages-formatter.py b/scripts/packages-formatter.py index ff7c892577..4449111e46 100755 --- a/scripts/packages-formatter.py +++ b/scripts/packages-formatter.py @@ -34,6 +34,7 @@ import argparse parser = argparse.ArgumentParser(description='Format dependency version and copyright information for the viewer About box content') parser.add_argument('channel', help='viewer channel name') parser.add_argument('version', help='viewer version number') +parser.add_argument('install_dir', help="install dir of packages") args = parser.parse_args() _autobuild=os.getenv('AUTOBUILD', 'autobuild') @@ -74,8 +75,8 @@ def add_info(key, pkg, lines): else: dups[key].add(pkg) -versions=autobuild('install', '--versions') -copyrights=autobuild('install', '--copyrights') +versions=autobuild('install', '--versions', '--install-dir', args.install_dir) +copyrights=autobuild('install', '--copyrights', '--install-dir', args.install_dir) viewer_copyright = copyrights.readline() # first line is the copyright for the viewer itself # Two different autobuild outputs, but we treat them essentially the same way: -- cgit v1.2.3 From 4f2831c54be3d684293f28bede0e6f609fa16bc0 Mon Sep 17 00:00:00 2001 From: Nicky Date: Thu, 7 Apr 2022 02:38:38 +0200 Subject: Remove some more traces of obsolte debug builds. --- indra/integration_tests/llui_libtest/CMakeLists.txt | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt index d7706e73b2..68f2ce3a42 100644 --- a/indra/integration_tests/llui_libtest/CMakeLists.txt +++ b/indra/integration_tests/llui_libtest/CMakeLists.txt @@ -93,25 +93,17 @@ if (WINDOWS) set_target_properties(llui_libtest PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT" - LINK_FLAGS_DEBUG "/NODEFAULTLIB:MSVCRT /NODEFAULTLIB:LIBCMTD" ) # Copy over OpenJPEG.dll # *NOTE: On Windows with VS2005, only the first comment prints set(OPENJPEG_RELEASE - "${ARCH_PREBUILT_DIRS_RELEASE}/openjpeg.dll") + "${ARCH_PREBUILT_DIRS_RELEASE}/openjpeg.dll") add_custom_command( TARGET llui_libtest POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${OPENJPEG_RELEASE} ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Copying OpenJPEG DLLs to binary directory" - ) - set(OPENJPEG_DEBUG - "${ARCH_PREBUILT_DIRS_DEBUG}/openjpegd.dll") - add_custom_command( TARGET llui_libtest POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${OPENJPEG_DEBUG} ${CMAKE_CURRENT_BINARY_DIR} - ) - + COMMENT "Copying OpenJPEG DLLs to binary directory" + ) endif (WINDOWS) # Ensure people working on the viewer don't break this library -- cgit v1.2.3 From 6cb984022afb54bb8ff71ee36787883edd3468cf Mon Sep 17 00:00:00 2001 From: Nicky Date: Thu, 7 Apr 2022 02:39:30 +0200 Subject: When opening contributions.txt viewer_manifest.py was making assumptios of the build tree layout and how it should be relative to the source tree. This is not necessarily correct. By using 'source' and constructiong the path relative to this directory we always get a correct answer. --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index ae3ed56b3d..5de5c71771 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -75,7 +75,7 @@ class ViewerManifest(LLManifest): # include the entire shaders directory recursively self.path("shaders") # include the extracted list of contributors - contributions_path = "../../doc/contributions.txt" + contributions_path = os.path.join(self.args['source'], "..", "..", "doc", "contributions.txt") contributor_names = self.extract_names(contributions_path) self.put_in_file(contributor_names.encode(), "contributors.txt", src=contributions_path) -- cgit v1.2.3 From 37f652206b580e2f174f3e49753b2f702e9c932a Mon Sep 17 00:00:00 2001 From: Nicky Date: Thu, 7 Apr 2022 02:41:35 +0200 Subject: Using Ninja leads to subtly different path than using a multi config generate like xcode or visual studio. --- indra/cmake/Linking.cmake | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index 3cb235a9d5..d3e82f8c3a 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -18,6 +18,11 @@ elseif (LINUX) elseif (DARWIN) set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs) set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs") + if( ${CMAKE_GENERATOR} STREQUAL "Ninja") + set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs/${CMAKE_BUILD_TYPE} ") + else() + set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs") + endif() endif (WINDOWS) # Autobuild packages must provide 'release' versions of libraries, but may provide versions for @@ -30,7 +35,13 @@ endif (WINDOWS) if(WINDOWS OR DARWIN) # the cmake xcode and VS generators implicitly append ${CMAKE_CFG_INTDIR} to the library paths for us # fortunately both windows and darwin are case insensitive filesystems so this works. - set(AUTOBUILD_LIBS_INSTALL_DIRS "${AUTOBUILD_INSTALL_DIR}/lib/") + # Ninja on the other hand needs the the full path + if( ${CMAKE_GENERATOR} STREQUAL "Ninja") + string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER) + set(AUTOBUILD_LIBS_INSTALL_DIRS ${AUTOBUILD_INSTALL_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER}) + else() + set(AUTOBUILD_LIBS_INSTALL_DIRS "${AUTOBUILD_INSTALL_DIR}/lib/") + endif() else(WINDOWS OR DARWIN) # else block is for linux and any other makefile based generators string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER) -- cgit v1.2.3 From 6e1ae6ec7b70b7fc20b2593621d79430b97c8325 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 9 Apr 2022 19:03:44 +0200 Subject: Raise the bar to cmake 3.13, this gives access to more modern constructs. --- indra/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 1ab5888914..08599b29e0 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -4,7 +4,8 @@ # other commands to guarantee full compatibility # with the version specified ## 3.8 added VS_DEBUGGER_WORKING_DIRECTORY support -cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR) +# 3.13/12 is needed for add_link_options/add_compile_definitions +cmake_minimum_required(VERSION 3.13.0 FATAL_ERROR) set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING "The root project/makefile/solution name. Defaults to SecondLife.") -- cgit v1.2.3 From 37595f90f9f45efc27409795a9b8c21486518882 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 9 Apr 2022 19:05:58 +0200 Subject: Cleanup ... use the appropriate functions to set options. Before this everythig was over the place how it was set, worse even with wrong functions like: - add_definitions( /arch:SSE2 ) - add_definitions(/WX) Those are each options to cl, not definitons. --- indra/cmake/00-Common.cmake | 97 ++++++++++++++++++++++----------------------- 1 file changed, 47 insertions(+), 50 deletions(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index e8c956bce3..4f0a6063db 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -27,25 +27,23 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{LL_BUILD}") # as well? # Portable compilation flags. -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DADDRESS_SIZE=${ADDRESS_SIZE}") +add_compile_definitions( ADDRESS_SIZE=${ADDRESS_SIZE}) # Configure crash reporting set(RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in release builds") set(NON_RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in developer builds") if(RELEASE_CRASH_REPORTING) - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DLL_SEND_CRASH_REPORTS=1") + add_compile_definitions( LL_SEND_CRASH_REPORTS=1) endif() if(NON_RELEASE_CRASH_REPORTING) - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DLL_SEND_CRASH_REPORTS=1") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DLL_SEND_CRASH_REPORTS=1") -endif() + add_compile_definitions( LL_SEND_CRASH_REPORTS=1) +endif() # Don't bother with a MinSizeRel or Debug build. set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release" CACHE STRING "Supported build types." FORCE) - # Platform-specific compilation flags. if (WINDOWS) @@ -65,22 +63,20 @@ if (WINDOWS) # CP changed to only append the flag for 32bit builds - on 64bit builds, # locally at least, the build output is spammed with 1000s of 'D9002' # warnings about this switch being ignored. - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") if( ADDRESS_SIZE EQUAL 32 ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /p:PreferredToolArchitecture=x64") endif() # zlib has assembly-language object files incompatible with SAFESEH - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE /SAFESEH:NO /NODEFAULTLIB:LIBCMT /IGNORE:4099") - - set(CMAKE_CXX_STANDARD_LIBRARIES "") - set(CMAKE_C_STANDARD_LIBRARIES "") + add_link_options(/LARGEADDRESSAWARE + /SAFESEH:NO + /NODEFAULTLIB:LIBCMT + /IGNORE:4099) add_definitions( - /DNOMINMAX + -DNOMINMAX # /DDOM_DYNAMIC # For shared library colladadom ) add_compile_options( - /Zo /GS /TP @@ -90,57 +86,61 @@ if (WINDOWS) /nologo /Oy- /fp:fast + /MP ) # Nicky: x64 implies SSE2 if( ADDRESS_SIZE EQUAL 32 ) - add_definitions( /arch:SSE2 ) + add_compile_options( /arch:SSE2 ) endif() # Are we using the crummy Visual Studio KDU build workaround? if (NOT VS_DISABLE_FATAL_WARNINGS) - add_definitions(/WX) + add_compile_options(/WX) endif (NOT VS_DISABLE_FATAL_WARNINGS) + + #ND: When using something like buildcache (https://github.com/mbitsnbites/buildcache) + # to make those wrappers work /Zi must be changed to /Z7, as /Zi due to it's nature is not compatible with caching + if( ${CMAKE_CXX_COMPILER_LAUNCHER} MATCHES ".*cache.*") + add_compile_options( /Z7 ) + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") + string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") + string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}") + string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + endif() endif (WINDOWS) if (LINUX) set(CMAKE_SKIP_RPATH TRUE) - add_definitions(-D_FORTIFY_SOURCE=2) - - set(CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-unused-but-set-variable -Wno-unused-variable ${CMAKE_CXX_FLAGS}") - - # gcc 4.3 and above don't like the LL boost and also - # cause warnings due to our use of deprecated headers - add_definitions(-Wno-parentheses) - - add_definitions( - -D_REENTRANT - ) + add_compile_definitions( + -D_REENTRANT + -D_FORTIFY_SOURCE=2 + -DEXTERNAL_TOS + -DAPPID=secondlife + -DLL_IGNORE_SIGCHLD + ) add_compile_options( - -fexceptions - -fno-math-errno - -fno-strict-aliasing - -fsigned-char - -msse2 - -mfpmath=sse - -pthread - ) + -fexceptions + -fno-math-errno + -fno-strict-aliasing + -fsigned-char + -msse2 + -mfpmath=sse + -pthread + -Wno-parentheses + -Wno-deprecated + -Wno-unused-but-set-variable + -Wno-unused-variable + -fvisibility=hidden + ) - # force this platform to accept TOS via external browser - add_definitions(-DEXTERNAL_TOS) - - add_definitions(-DAPPID=secondlife) - add_compile_options(-fvisibility=hidden) - # don't catch SIGCHLD in our base application class for the viewer - some of - # our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The - # viewer doesn't need to catch SIGCHLD anyway. - add_definitions(-DLL_IGNORE_SIGCHLD) if (ADDRESS_SIZE EQUAL 32) add_compile_options(-march=pentium4) endif (ADDRESS_SIZE EQUAL 32) - #add_compile_options(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2 + if (NOT USESYSTEMLIBS) # this stops us requiring a really recent glibc at runtime add_compile_options(-fno-stack-protector) @@ -195,11 +195,8 @@ if (LINUX OR DARWIN) set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor") - set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}") - set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}") - - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m${ADDRESS_SIZE}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m${ADDRESS_SIZE}") + add_compile_options(${GCC_CXX_WARNINGS}) + add_compile_options(-m${ADDRESS_SIZE}) endif (LINUX OR DARWIN) @@ -207,7 +204,7 @@ if (USESYSTEMLIBS) add_definitions(-DLL_USESYSTEMLIBS=1) if (LINUX AND ADDRESS_SIZE EQUAL 32) - add_definitions(-march=pentiumpro) + add_compile_options(-march=pentiumpro) endif (LINUX AND ADDRESS_SIZE EQUAL 32) else (USESYSTEMLIBS) -- cgit v1.2.3 From 0980a943413dadb0d77f36798f1dd5347994da74 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 9 Apr 2022 20:15:07 +0200 Subject: Bump cmake version needed up to 3.16 so target_precompile_headers can be used. --- indra/CMakeLists.txt | 3 ++- indra/newview/CMakeLists.txt | 12 ++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 08599b29e0..d06ea58549 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -5,7 +5,8 @@ # with the version specified ## 3.8 added VS_DEBUGGER_WORKING_DIRECTORY support # 3.13/12 is needed for add_link_options/add_compile_definitions -cmake_minimum_required(VERSION 3.13.0 FATAL_ERROR) +# 3.16 is needed for target_precompile_headers +cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR) set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING "The root project/makefile/solution name. Defaults to SecondLife.") diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e213087f40..faee40e319 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1454,11 +1454,7 @@ if (WINDOWS) # All sources added to viewer_SOURCE_FILES # at this point use it. if(USE_PRECOMPILED_HEADERS) - set_source_files_properties(llviewerprecompiledheaders.cpp - PROPERTIES - COMPILE_FLAGS "/Ycllviewerprecompiledheaders.h" - ) - set(viewer_SOURCE_FILES "${viewer_SOURCE_FILES}" llviewerprecompiledheaders.cpp) + set(viewer_SOURCE_FILES "${viewer_SOURCE_FILES}" llviewerprecompiledheaders.cpp) endif(USE_PRECOMPILED_HEADERS) # Replace the icons with the appropriate ones for the channel @@ -1742,11 +1738,7 @@ if (WINDOWS) ) if(USE_PRECOMPILED_HEADERS) - set_target_properties( - ${VIEWER_BINARY_NAME} - PROPERTIES - COMPILE_FLAGS "/Yullviewerprecompiledheaders.h" - ) + target_precompile_headers( ${VIEWER_BINARY_NAME} PRIVATE llviewerprecompiledheaders.h ) endif(USE_PRECOMPILED_HEADERS) # If adding a file to viewer_manifest.py in the WindowsManifest.construct() method, be sure to add the dependency -- cgit v1.2.3 From 7382fce79e96c03ae4eb74268817ca2ace1f46ec Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 9 Apr 2022 20:19:46 +0200 Subject: Cleanup windows step that copies input artifacts. Make sure the right paths are used, throw out files not even existing anymore. --- indra/newview/CMakeLists.txt | 39 ++++++++++++++++----------------------- indra/newview/viewer_manifest.py | 2 +- 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index faee40e319..ccd7ce47da 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1753,55 +1753,49 @@ if (WINDOWS) # stores a list in the variable myfile in which each item is a line from the input file." # And of course it's straightforward to read a text file in Python. + if( ${CMAKE_GENERATOR} STREQUAL "Ninja") + set(LL_INTDIR ${CMAKE_BUILD_TYPE}) + else() + set(LL_INTDIR ${CMAKE_CFG_INTDIR}) + endif() + set(COPY_INPUT_DEPENDENCIES # The following commented dependencies are determined at variably at build time. Can't do this here. ${CMAKE_SOURCE_DIR}/../etc/message.xml ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/llcommon.dll - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapr-1.dll - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libaprutil-1.dll - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapriconv-1.dll ${SHARED_LIB_STAGING_DIR}/Release/glod.dll ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/glod.dll - ${SHARED_LIB_STAGING_DIR}/Debug/glod.dll - ${SHARED_LIB_STAGING_DIR}/Release/libcollada14dom22.dll - ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libcollada14dom22.dll - ${SHARED_LIB_STAGING_DIR}/Debug/libcollada14dom22-d.dll ${SHARED_LIB_STAGING_DIR}/Release/openjpeg.dll ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/openjpeg.dll - ${SHARED_LIB_STAGING_DIR}/Debug/openjpegd.dll ${SHARED_LIB_STAGING_DIR}/Release/libhunspell.dll ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libhunspell.dll - ${SHARED_LIB_STAGING_DIR}/Debug/libhunspell.dll ${SHARED_LIB_STAGING_DIR}/Release/uriparser.dll ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/uriparser.dll - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/SLVoice.exe - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libsndfile-1.dll - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxoal.dll - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ca-bundle.crt + #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/SLVoice.exe + #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/libsndfile-1.dll + #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/vivoxoal.dll + ${AUTOBUILD_INSTALL_DIR}/ca-bundle.crt ${GOOGLE_PERF_TOOLS_SOURCE} ${CMAKE_CURRENT_SOURCE_DIR}/licenses-win32.txt ${CMAKE_CURRENT_SOURCE_DIR}/featuretable.txt - ${CMAKE_CURRENT_SOURCE_DIR}/featuretable_xp.txt ${viewer_APPSETTINGS_FILES} SLPlugin media_plugin_cef media_plugin_libvlc media_plugin_example - winmm_shim ) if (ADDRESS_SIZE EQUAL 64) list(APPEND COPY_INPUT_DEPENDENCIES - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxsdk_x64.dll - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ortp_x64.dll + ${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/vivoxsdk_x64.dll + ${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/ortp_x64.dll ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto-1_1-x64.dll ${ARCH_PREBUILT_DIRS_RELEASE}/libssl-1_1-x64.dll ) else (ADDRESS_SIZE EQUAL 64) list(APPEND COPY_INPUT_DEPENDENCIES - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxsdk.dll - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ortp.dll + ${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/vivoxsdk.dll + ${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/ortp.dll ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto-1_1.dll ${ARCH_PREBUILT_DIRS_RELEASE}/libssl-1_1.dll ) @@ -1817,8 +1811,8 @@ if (WINDOWS) if (OPENAL) list(APPEND COPY_INPUT_DEPENDENCIES - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/OpenAL32.dll - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/alut.dll + ${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/OpenAL32.dll + ${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/alut.dll ) endif (OPENAL) @@ -1913,7 +1907,6 @@ if (WINDOWS) add_custom_target(llpackage ALL DEPENDS ${CMAKE_CFG_INTDIR}/touched.bat - windows-setup-build-all ) # temporarily disable packaging of event_host until hg subrepos get # sorted out on the parabuild cluster... diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 5de5c71771..1885bee7da 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -504,7 +504,7 @@ class WindowsManifest(ViewerManifest): # Get shared libs from the shared libs staging directory with self.prefix(src=os.path.join(self.args['build'], os.pardir, - 'sharedlibs', self.args['configuration'])): + 'sharedlibs', self.args['buildtype'])): # Mesh 3rd party libs needed for auto LOD and collada reading try: -- cgit v1.2.3 From d01e81f4d122a1f8942f1b296b5d3a4d1cc22ec3 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 9 Apr 2022 23:40:22 +0200 Subject: Fix warning supression for Linux/OSX, this was broken after the first round of cmake changes on Windows. -Wno-unused-but-set-variable/-Wno-unused-variable moved from just Linux to also OSX (clang) as there's a lot of those in the code where newer xcode complains. Fixing all those places is going beyond the scope of modernizing cmake. --- indra/cmake/00-Common.cmake | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 4f0a6063db..d203d43545 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -132,8 +132,6 @@ if (LINUX) -pthread -Wno-parentheses -Wno-deprecated - -Wno-unused-but-set-variable - -Wno-unused-variable -fvisibility=hidden ) @@ -183,19 +181,15 @@ if (LINUX OR DARWIN) set(CMAKE_COMPILER_IS_CLANGXX 1) endif (CMAKE_CXX_COMPILER MATCHES ".*clang") - if (CMAKE_COMPILER_IS_GNUCXX) - set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs") - elseif (CMAKE_COMPILER_IS_CLANGXX) - set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs") - endif() + set(GCC_WARNINGS -Wall -Wno-sign-compare -Wno-trigraphs) if (NOT GCC_DISABLE_FATAL_WARNINGS) - set(GCC_WARNINGS "${GCC_WARNINGS} -Werror") + list(APPEND GCC_WARNINGS -Werror) endif (NOT GCC_DISABLE_FATAL_WARNINGS) - set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor") + list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor -Wno-unused-but-set-variable -Wno-unused-variable ) - add_compile_options(${GCC_CXX_WARNINGS}) + add_compile_options(${GCC_WARNINGS}) add_compile_options(-m${ADDRESS_SIZE}) endif (LINUX OR DARWIN) -- cgit v1.2.3 From 07d388f416b64ad5ea6a79d7dee4bf9e6bab7b74 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 10 Apr 2022 23:43:15 +0200 Subject: Make LIB_NDOF define part of the targets interface --- indra/cmake/NDOF.cmake | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake index f22e2246aa..7b64b23299 100644 --- a/indra/cmake/NDOF.cmake +++ b/indra/cmake/NDOF.cmake @@ -24,13 +24,11 @@ if (NDOF) elseif (DARWIN OR LINUX) set_target_libraries( ndof::ndof ndofdev) endif (WINDOWS) - set(NDOF_FOUND 1) + target_compile_definitions( ndof::ndof INTERFACE LIB_NDOF=1) endif (USESYSTEMLIBS) endif (NDOF) -if (NDOF_FOUND) - add_definitions(-DLIB_NDOF=1) -else (NDOF_FOUND) +if (NOT NDOF_FOUND) message(STATUS "Building without N-DoF joystick support") -endif (NDOF_FOUND) +endif () -- cgit v1.2.3 From d3521b4462195cfe882b2cc8eb4e7c5e948c0fb6 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 13 Apr 2022 10:28:46 +0200 Subject: Remove obsolete and unmaintained USE_SYSTEMLIBS --- indra/cmake/00-Common.cmake | 33 ++++-------- indra/cmake/APR.cmake | 74 +++++++++++++-------------- indra/cmake/Audio.cmake | 22 +++----- indra/cmake/Boost.cmake | 85 ++++++++++++++----------------- indra/cmake/CEFPlugin.cmake | 9 +--- indra/cmake/CMakeLists.txt | 14 +----- indra/cmake/CURL.cmake | 18 +++---- indra/cmake/Copy3rdPartyLibs.cmake | 10 ++-- indra/cmake/DBusGlib.cmake | 29 ++++------- indra/cmake/DragDrop.cmake | 16 +++--- indra/cmake/EXPAT.cmake | 30 +++++------ indra/cmake/ExamplePlugin.cmake | 7 +-- indra/cmake/FindAPR.cmake | 94 ----------------------------------- indra/cmake/FindGLH.cmake | 30 ----------- indra/cmake/FindGooglePerfTools.cmake | 66 ------------------------ indra/cmake/FindHUNSPELL.cmake | 38 -------------- indra/cmake/FindJsonCpp.cmake | 60 ---------------------- indra/cmake/FindNDOF.cmake | 39 --------------- indra/cmake/FindOpenJPEG.cmake | 50 ------------------- indra/cmake/FindSCP.cmake | 40 --------------- indra/cmake/FindURIPARSER.cmake | 46 ----------------- indra/cmake/FindXmlRpcEpi.cmake | 48 ------------------ indra/cmake/FindZLIBNG.cmake | 46 ----------------- indra/cmake/FreeType.cmake | 12 ++--- indra/cmake/GLEXT.cmake | 12 ++--- indra/cmake/GLH.cmake | 6 +-- indra/cmake/GLOD.cmake | 6 +-- indra/cmake/GStreamer010Plugin.cmake | 10 +--- indra/cmake/Hunspell.cmake | 28 +++++------ indra/cmake/JPEG.cmake | 22 ++++---- indra/cmake/JsonCpp.cmake | 22 ++++---- indra/cmake/LLAddBuildTest.cmake | 10 +--- indra/cmake/LLWindow.cmake | 23 +++------ indra/cmake/LibVLCPlugin.cmake | 11 ++-- indra/cmake/NDOF.cmake | 27 ++++------ indra/cmake/NGHTTP2.cmake | 22 ++++---- indra/cmake/OPENAL.cmake | 9 +--- indra/cmake/OpenJPEG.cmake | 12 ++--- indra/cmake/OpenSSL.cmake | 22 ++++---- indra/cmake/PNG.cmake | 21 +++----- indra/cmake/PulseAudio.cmake | 27 ++++------ indra/cmake/Tut.cmake | 4 +- indra/cmake/UI.cmake | 87 +++++++++++--------------------- indra/cmake/URIPARSER.cmake | 22 ++++---- indra/cmake/Variables.cmake | 1 - indra/cmake/ViewerMiscLibs.cmake | 14 +++--- indra/cmake/XmlRpcEpi.cmake | 10 ++-- indra/cmake/ZLIBNG.cmake | 18 +++---- indra/cmake/bugsplat.cmake | 28 +++++------ indra/newview/CMakeLists.txt | 8 +-- 50 files changed, 306 insertions(+), 1092 deletions(-) delete mode 100644 indra/cmake/FindAPR.cmake delete mode 100644 indra/cmake/FindGLH.cmake delete mode 100644 indra/cmake/FindGooglePerfTools.cmake delete mode 100644 indra/cmake/FindHUNSPELL.cmake delete mode 100644 indra/cmake/FindJsonCpp.cmake delete mode 100644 indra/cmake/FindNDOF.cmake delete mode 100644 indra/cmake/FindOpenJPEG.cmake delete mode 100644 indra/cmake/FindSCP.cmake delete mode 100644 indra/cmake/FindURIPARSER.cmake delete mode 100644 indra/cmake/FindXmlRpcEpi.cmake delete mode 100644 indra/cmake/FindZLIBNG.cmake diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index d203d43545..54b74b14fb 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -139,12 +139,10 @@ if (LINUX) add_compile_options(-march=pentium4) endif (ADDRESS_SIZE EQUAL 32) - if (NOT USESYSTEMLIBS) - # this stops us requiring a really recent glibc at runtime - add_compile_options(-fno-stack-protector) - # linking can be very memory-hungry, especially the final viewer link - set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory") - endif (NOT USESYSTEMLIBS) + # this stops us requiring a really recent glibc at runtime + add_compile_options(-fno-stack-protector) + # linking can be very memory-hungry, especially the final viewer link + set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory") set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}") endif (LINUX) @@ -194,21 +192,12 @@ if (LINUX OR DARWIN) endif (LINUX OR DARWIN) -if (USESYSTEMLIBS) - add_definitions(-DLL_USESYSTEMLIBS=1) - - if (LINUX AND ADDRESS_SIZE EQUAL 32) - add_compile_options(-march=pentiumpro) - endif (LINUX AND ADDRESS_SIZE EQUAL 32) - -else (USESYSTEMLIBS) - set(${ARCH}_linux_INCLUDES - atk-1.0 - glib-2.0 - gstreamer-0.10 - gtk-2.0 - pango-1.0 - ) -endif (USESYSTEMLIBS) +set(${ARCH}_linux_INCLUDES + atk-1.0 + glib-2.0 + gstreamer-0.10 + gtk-2.0 + pango-1.0 + ) endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index 5a7c504af8..63ea195fad 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -7,43 +7,39 @@ endif() create_target( apr::apr) -if (USESYSTEMLIBS) - include(FindAPR) -else (USESYSTEMLIBS) - use_prebuilt_binary(apr_suite) - if (WINDOWS) - if (LLCOMMON_LINK_SHARED) - set(APR_selector "lib") - else (LLCOMMON_LINK_SHARED) - set(APR_selector "") - endif (LLCOMMON_LINK_SHARED) - set_target_libraries( apr::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 - ) - elseif (DARWIN) - if (LLCOMMON_LINK_SHARED) - set(APR_selector "0.dylib") - set(APRUTIL_selector "0.dylib") - else (LLCOMMON_LINK_SHARED) - set(APR_selector "a") - set(APRUTIL_selector "a") - endif (LLCOMMON_LINK_SHARED) +use_prebuilt_binary(apr_suite) +if (WINDOWS) + if (LLCOMMON_LINK_SHARED) + set(APR_selector "lib") + else (LLCOMMON_LINK_SHARED) + set(APR_selector "") + endif (LLCOMMON_LINK_SHARED) + set_target_libraries( apr::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 + ) +elseif (DARWIN) + if (LLCOMMON_LINK_SHARED) + set(APR_selector "0.dylib") + set(APRUTIL_selector "0.dylib") + else (LLCOMMON_LINK_SHARED) + set(APR_selector "a") + set(APRUTIL_selector "a") + endif (LLCOMMON_LINK_SHARED) - set_target_libraries( apr::apr - libapr-1.${APR_selector} - libaprutil-1.${APRUTIL_selector} - iconv - ) - else (WINDOWS) - set_target_libraries( apr::apr - apr-1 - aprutil-1 - iconv - uuid - rt - ) - endif (WINDOWS) - set_target_include_dirs( apr::apr ${LIBS_PREBUILT_DIR}/include/apr-1 ) -endif (USESYSTEMLIBS) + set_target_libraries( apr::apr + libapr-1.${APR_selector} + libaprutil-1.${APRUTIL_selector} + iconv + ) +else (WINDOWS) + set_target_libraries( apr::apr + apr-1 + aprutil-1 + iconv + uuid + rt + ) +endif (WINDOWS) +set_target_include_dirs( apr::apr ${LIBS_PREBUILT_DIR}/include/apr-1 ) diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake index bc11e62de5..bf95a8eef1 100644 --- a/indra/cmake/Audio.cmake +++ b/indra/cmake/Audio.cmake @@ -6,20 +6,12 @@ if(TARGET vorbis::vorbis) endif() create_target(vorbis::vorbis) -if (USESYSTEMLIBS) - include(FindPkgConfig) - pkg_check_modules(OGG REQUIRED ogg) - pkg_check_modules(VORBIS REQUIRED vorbis) - pkg_check_modules(VORBISENC REQUIRED vorbisenc) - pkg_check_modules(VORBISFILE REQUIRED vorbisfile) -else (USESYSTEMLIBS) - use_prebuilt_binary(ogg_vorbis) - set_target_include_dirs( vorbis::vorbis ${LIBS_PREBUILT_DIR}/include ) +use_prebuilt_binary(ogg_vorbis) +set_target_include_dirs( vorbis::vorbis ${LIBS_PREBUILT_DIR}/include ) - if (WINDOWS) - set_target_libraries(vorbis::vorbis ogg_static vorbis_static vorbisenc_static vorbisfile_static ) - else (WINDOWS) - set_target_libraries(vorbis::vorbis ogg vorbis vorbisenc vorbisfile ) - endif (WINDOWS) -endif (USESYSTEMLIBS) +if (WINDOWS) + set_target_libraries(vorbis::vorbis ogg_static vorbis_static vorbisenc_static vorbisfile_static ) +else (WINDOWS) + set_target_libraries(vorbis::vorbis ogg vorbis vorbisenc vorbisfile ) +endif (WINDOWS) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 8e5ef66af8..2102ee3887 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -9,55 +9,42 @@ create_target( boost::boost ) set(Boost_FIND_QUIETLY ON) set(Boost_FIND_REQUIRED ON) -if (USESYSTEMLIBS) - include(FindBoost) - - set(BOOST_CONTEXT_LIBRARY boost_context-mt) - set(BOOST_FIBER_LIBRARY boost_fiber-mt) - set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt) - set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt) - set(BOOST_REGEX_LIBRARY boost_regex-mt) - set(BOOST_SIGNALS_LIBRARY boost_signals-mt) - set(BOOST_SYSTEM_LIBRARY boost_system-mt) - set(BOOST_THREAD_LIBRARY boost_thread-mt) -else (USESYSTEMLIBS) - 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 - libboost_context-mt${addrsfx} - libboost_fiber-mt${addrsfx} - libboost_filesystem-mt${addrsfx} - libboost_program_options-mt${addrsfx} - libboost_regex-mt${addrsfx} - libboost_system-mt${addrsfx} - libboost_thread-mt${addrsfx}) - elseif (LINUX) - set_target_libraries( boost::boost - boost_context-mt${addrsfx} - boost_fiber-mt${addrsfx} - boost_filesystem-mt${addrsfx} - boost_program_options-mt${addrsfx} - boost_regex-mt${addrsfx} - boost_signals-mt${addrsfx} - boost_system-mt${addrsfx} - boost_thread-mt${addrsfx}) - elseif (DARWIN) - set_target_libraries( boost::boost - boost_context-mt${addrsfx} - boost_fiber-mt${addrsfx} - boost_filesystem-mt${addrsfx} - boost_program_options-mt${addrsfx} - boost_regex-mt${addrsfx} - boost_system-mt${addrsfx} - boost_thread-mt${addrsfx}) - endif (WINDOWS) -endif (USESYSTEMLIBS) +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 + libboost_context-mt${addrsfx} + libboost_fiber-mt${addrsfx} + libboost_filesystem-mt${addrsfx} + libboost_program_options-mt${addrsfx} + libboost_regex-mt${addrsfx} + libboost_system-mt${addrsfx} + libboost_thread-mt${addrsfx}) +elseif (LINUX) + set_target_libraries( boost::boost + boost_context-mt${addrsfx} + boost_fiber-mt${addrsfx} + boost_filesystem-mt${addrsfx} + boost_program_options-mt${addrsfx} + boost_regex-mt${addrsfx} + boost_signals-mt${addrsfx} + boost_system-mt${addrsfx} + boost_thread-mt${addrsfx}) +elseif (DARWIN) + set_target_libraries( boost::boost + boost_context-mt${addrsfx} + boost_fiber-mt${addrsfx} + boost_filesystem-mt${addrsfx} + boost_program_options-mt${addrsfx} + boost_regex-mt${addrsfx} + boost_system-mt${addrsfx} + boost_thread-mt${addrsfx}) +endif (WINDOWS) if (LINUX) set(BOOST_SYSTEM_LIBRARY ${BOOST_SYSTEM_LIBRARY} rt) diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 706730b226..bcce4cfa05 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -7,13 +7,8 @@ if(TARGET cef::cef) endif() create_target( cef::cef ) -if (USESYSTEMLIBS) - set(CEFPLUGIN OFF CACHE BOOL - "CEFPLUGIN support for the llplugin/llmedia test apps.") -else (USESYSTEMLIBS) - use_prebuilt_binary(dullahan) - set_target_include_dirs( cef::cef ${LIBS_PREBUILT_DIR}/include/cef) -endif (USESYSTEMLIBS) +use_prebuilt_binary(dullahan) +set_target_include_dirs( cef::cef ${LIBS_PREBUILT_DIR}/include/cef) if (WINDOWS) set_target_libraries( cef::cef diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 812e35390f..48b08b31d6 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -23,18 +23,8 @@ set(cmake_SOURCE_FILES DeploySharedLibs.cmake DragDrop.cmake EXPAT.cmake - FindAPR.cmake - FindAutobuild.cmake - FindGLH.cmake - FindHUNSPELL.cmake - FindJsonCpp.cmake - FindNDOF.cmake - FindOpenJPEG.cmake - FindSCP.cmake - FindURIPARSER.cmake - FindXmlRpcEpi.cmake - FindZLIBNG.cmake - FMODSTUDIO.cmake + FindAutobuild.cmake + FMODSTUDIO.cmake FreeType.cmake GLEXT.cmake GLH.cmake diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index d91eb2e2fd..455d420e48 100644 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -6,14 +6,10 @@ if( TARGET libcurl::libcurl ) endif() create_target(libcurl::libcurl) -if (USESYSTEMLIBS) - include(FindCURL) -else (USESYSTEMLIBS) - use_prebuilt_binary(curl) - if (WINDOWS) - set_target_libraries(libcurl::libcurl libcurl.lib) - else (WINDOWS) - set_target_libraries(libcurl::libcurl libcurl.a) - endif (WINDOWS) - set_target_include_dirs( libcurl::libcurl ${LIBS_PREBUILT_DIR}/include) -endif (USESYSTEMLIBS) +use_prebuilt_binary(curl) +if (WINDOWS) + set_target_libraries(libcurl::libcurl libcurl.lib) +else (WINDOWS) + set_target_libraries(libcurl::libcurl libcurl.a) +endif (WINDOWS) +set_target_include_dirs( libcurl::libcurl ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index b20d23cead..d5b8e6c712 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -280,9 +280,7 @@ to_staging_dirs( ${release_files} ) -if(NOT USESYSTEMLIBS) - add_custom_target( - stage_third_party_libs ALL - DEPENDS ${third_party_targets} - ) -endif(NOT USESYSTEMLIBS) +add_custom_target( + stage_third_party_libs ALL + DEPENDS ${third_party_targets} +) diff --git a/indra/cmake/DBusGlib.cmake b/indra/cmake/DBusGlib.cmake index 5e46b6711a..7c95bf8c20 100644 --- a/indra/cmake/DBusGlib.cmake +++ b/indra/cmake/DBusGlib.cmake @@ -1,24 +1,17 @@ # -*- cmake -*- include(Prebuilt) -if (USESYSTEMLIBS) - include(FindPkgConfig) - - pkg_check_modules(DBUSGLIB REQUIRED dbus-glib-1) - -elseif (LINUX) - use_prebuilt_binary(dbus_glib) - set(DBUSGLIB_FOUND ON FORCE BOOL) - set(DBUSGLIB_INCLUDE_DIRS - ${LIBS_PREBUILT_DIR}/include/dbus - ) - # We don't need to explicitly link against dbus-glib itself, because - # the viewer probes for the system's copy at runtime. - set(DBUSGLIB_LIBRARIES - gobject-2.0 - glib-2.0 - ) -endif (USESYSTEMLIBS) +use_prebuilt_binary(dbus_glib) +set(DBUSGLIB_FOUND ON FORCE BOOL) +set(DBUSGLIB_INCLUDE_DIRS + ${LIBS_PREBUILT_DIR}/include/dbus + ) +# We don't need to explicitly link against dbus-glib itself, because +# the viewer probes for the system's copy at runtime. +set(DBUSGLIB_LIBRARIES + gobject-2.0 + glib-2.0 + ) if (DBUSGLIB_FOUND) set(DBUSGLIB ON CACHE BOOL "Build with dbus-glib message bus support.") diff --git a/indra/cmake/DragDrop.cmake b/indra/cmake/DragDrop.cmake index 73ef59b18f..cbbf5747a7 100644 --- a/indra/cmake/DragDrop.cmake +++ b/indra/cmake/DragDrop.cmake @@ -1,20 +1,16 @@ # -*- cmake -*- - set(OS_DRAG_DROP ON CACHE BOOL "Build the viewer with OS level drag and drop turned on or off") - - if (OS_DRAG_DROP) +set(OS_DRAG_DROP ON CACHE BOOL "Build the viewer with OS level drag and drop turned on or off") +if (OS_DRAG_DROP) if (WINDOWS) - add_definitions(-DLL_OS_DRAGDROP_ENABLED=1) + add_definitions(-DLL_OS_DRAGDROP_ENABLED=1) endif (WINDOWS) - if (DARWIN) - add_definitions(-DLL_OS_DRAGDROP_ENABLED=1) + add_definitions(-DLL_OS_DRAGDROP_ENABLED=1) endif (DARWIN) - if (LINUX) - add_definitions(-DLL_OS_DRAGDROP_ENABLED=0) + add_definitions(-DLL_OS_DRAGDROP_ENABLED=0) endif (LINUX) - - endif (OS_DRAG_DROP) +endif (OS_DRAG_DROP) diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake index 6f6503ca4d..fb0467987b 100644 --- a/indra/cmake/EXPAT.cmake +++ b/indra/cmake/EXPAT.cmake @@ -6,20 +6,16 @@ if( TARGET expat::expat ) endif() create_target( expat::expat INTERFACE IMPORTED ) -if (USESYSTEMLIBS) - include(FindEXPAT) -else (USESYSTEMLIBS) - use_prebuilt_binary(expat) - if (WINDOWS) - set_target_libraries( expat::expat libexpatMT ) - set(EXPAT_COPY libexpatMT.dll) - else (WINDOWS) - set_target_libraries( expat::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 ) -endif (USESYSTEMLIBS) +use_prebuilt_binary(expat) +if (WINDOWS) + set_target_libraries( expat::expat libexpatMT ) + set(EXPAT_COPY libexpatMT.dll) +else (WINDOWS) + set_target_libraries( expat::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 ) diff --git a/indra/cmake/ExamplePlugin.cmake b/indra/cmake/ExamplePlugin.cmake index 5d826c1f66..c7ffaf024e 100644 --- a/indra/cmake/ExamplePlugin.cmake +++ b/indra/cmake/ExamplePlugin.cmake @@ -2,13 +2,8 @@ include(Linking) include(Prebuilt) -if (USESYSTEMLIBS) - set(EXAMPLEPLUGIN OFF CACHE BOOL +set(EXAMPLEPLUGIN ON CACHE BOOL "EXAMPLEPLUGIN support for the llplugin/llmedia test apps.") -else (USESYSTEMLIBS) - set(EXAMPLEPLUGIN ON CACHE BOOL - "EXAMPLEPLUGIN support for the llplugin/llmedia test apps.") -endif (USESYSTEMLIBS) if (WINDOWS) elseif (DARWIN) diff --git a/indra/cmake/FindAPR.cmake b/indra/cmake/FindAPR.cmake deleted file mode 100644 index 906b6c9452..0000000000 --- a/indra/cmake/FindAPR.cmake +++ /dev/null @@ -1,94 +0,0 @@ -# -*- cmake -*- - -# - Find Apache Portable Runtime -# Find the APR includes and libraries -# This module defines -# APR_INCLUDE_DIR and APRUTIL_INCLUDE_DIR, where to find apr.h, etc. -# APR_LIBRARIES and APRUTIL_LIBRARIES, the libraries needed to use APR. -# APR_FOUND and APRUTIL_FOUND, If false, do not try to use APR. -# also defined, but not for general use are -# APR_LIBRARY and APRUTIL_LIBRARY, where to find the APR library. - -# APR first. - -FIND_PATH(APR_INCLUDE_DIR apr.h -/usr/local/include/apr-1 -/usr/local/include/apr-1.0 -/usr/include/apr-1 -/usr/include/apr-1.0 -) - -SET(APR_NAMES ${APR_NAMES} apr-1) -FIND_LIBRARY(APR_LIBRARY - NAMES ${APR_NAMES} - PATHS /usr/lib /usr/local/lib - ) - -IF (APR_LIBRARY AND APR_INCLUDE_DIR) - SET(APR_LIBRARIES ${APR_LIBRARY}) - SET(APR_FOUND "YES") -ELSE (APR_LIBRARY AND APR_INCLUDE_DIR) - SET(APR_FOUND "NO") -ENDIF (APR_LIBRARY AND APR_INCLUDE_DIR) - - -IF (APR_FOUND) - IF (NOT APR_FIND_QUIETLY) - MESSAGE(STATUS "Found APR: ${APR_LIBRARIES}") - ENDIF (NOT APR_FIND_QUIETLY) -ELSE (APR_FOUND) - IF (APR_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find APR library") - ENDIF (APR_FIND_REQUIRED) -ENDIF (APR_FOUND) - -# Deprecated declarations. -SET (NATIVE_APR_INCLUDE_PATH ${APR_INCLUDE_DIR} ) -GET_FILENAME_COMPONENT (NATIVE_APR_LIB_PATH ${APR_LIBRARY} PATH) - -MARK_AS_ADVANCED( - APR_LIBRARY - APR_INCLUDE_DIR - ) - -# Next, APRUTIL. - -FIND_PATH(APRUTIL_INCLUDE_DIR apu.h -/usr/local/include/apr-1 -/usr/local/include/apr-1.0 -/usr/include/apr-1 -/usr/include/apr-1.0 -) - -SET(APRUTIL_NAMES ${APRUTIL_NAMES} aprutil-1) -FIND_LIBRARY(APRUTIL_LIBRARY - NAMES ${APRUTIL_NAMES} - PATHS /usr/lib /usr/local/lib - ) - -IF (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR) - SET(APRUTIL_LIBRARIES ${APRUTIL_LIBRARY}) - SET(APRUTIL_FOUND "YES") -ELSE (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR) - SET(APRUTIL_FOUND "NO") -ENDIF (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR) - - -IF (APRUTIL_FOUND) - IF (NOT APRUTIL_FIND_QUIETLY) - MESSAGE(STATUS "Found APRUTIL: ${APRUTIL_LIBRARIES}") - ENDIF (NOT APRUTIL_FIND_QUIETLY) -ELSE (APRUTIL_FOUND) - IF (APRUTIL_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find APRUTIL library") - ENDIF (APRUTIL_FIND_REQUIRED) -ENDIF (APRUTIL_FOUND) - -# Deprecated declarations. -SET (NATIVE_APRUTIL_INCLUDE_PATH ${APRUTIL_INCLUDE_DIR} ) -GET_FILENAME_COMPONENT (NATIVE_APRUTIL_LIB_PATH ${APRUTIL_LIBRARY} PATH) - -MARK_AS_ADVANCED( - APRUTIL_LIBRARY - APRUTIL_INCLUDE_DIR - ) diff --git a/indra/cmake/FindGLH.cmake b/indra/cmake/FindGLH.cmake deleted file mode 100644 index 3d16adaf03..0000000000 --- a/indra/cmake/FindGLH.cmake +++ /dev/null @@ -1,30 +0,0 @@ -# -*- cmake -*- - -# - Find GLH -# Find the Graphic Library Helper includes. -# This module defines -# GLH_INCLUDE_DIR, where to find glh/glh_linear.h. -# GLH_FOUND, If false, do not try to use GLH. - -find_path(GLH_INCLUDE_DIR glh/glh_linear.h - NO_SYSTEM_ENVIRONMENT_PATH - ) - -if (GLH_INCLUDE_DIR) - set(GLH_FOUND "YES") -else (GLH_INCLUDE_DIR) - set(GLH_FOUND "NO") -endif (GLH_INCLUDE_DIR) - -if (GLH_FOUND) - if (NOT GLH_FIND_QUIETLY) - message(STATUS "Found GLH: ${GLH_INCLUDE_DIR}") - set(GLH_FIND_QUIETLY TRUE) # Only alert us the first time - endif (NOT GLH_FIND_QUIETLY) -else (GLH_FOUND) - if (GLH_FIND_REQUIRED) - message(FATAL_ERROR "Could not find GLH") - endif (GLH_FIND_REQUIRED) -endif (GLH_FOUND) - -mark_as_advanced(GLH_INCLUDE_DIR) diff --git a/indra/cmake/FindGooglePerfTools.cmake b/indra/cmake/FindGooglePerfTools.cmake deleted file mode 100644 index bb125d538e..0000000000 --- a/indra/cmake/FindGooglePerfTools.cmake +++ /dev/null @@ -1,66 +0,0 @@ -# -*- cmake -*- - -# - Find Google perftools -# Find the Google perftools includes and libraries -# This module defines -# GOOGLE_PERFTOOLS_INCLUDE_DIR, where to find heap-profiler.h, etc. -# GOOGLE_PERFTOOLS_FOUND, If false, do not try to use Google perftools. -# also defined for general use are -# TCMALLOC_LIBRARIES, where to find the tcmalloc library. -# STACKTRACE_LIBRARIES, where to find the stacktrace library. -# PROFILER_LIBRARIES, where to find the profiler library. - -FIND_PATH(GOOGLE_PERFTOOLS_INCLUDE_DIR google/heap-profiler.h -/usr/local/include -/usr/include -) - -SET(TCMALLOC_NAMES ${TCMALLOC_NAMES} tcmalloc) -FIND_LIBRARY(TCMALLOC_LIBRARY - NAMES ${TCMALLOC_NAMES} - PATHS /usr/lib /usr/local/lib - ) - -IF (TCMALLOC_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR) - SET(TCMALLOC_LIBRARIES ${TCMALLOC_LIBRARY}) - SET(GOOGLE_PERFTOOLS_FOUND "YES") -ELSE (TCMALLOC_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR) - SET(GOOGLE_PERFTOOLS_FOUND "NO") -ENDIF (TCMALLOC_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR) - -SET(STACKTRACE_NAMES ${STACKTRACE_NAMES} stacktrace) -FIND_LIBRARY(STACKTRACE_LIBRARY - NAMES ${STACKTRACE_LIBRARY} - PATHS /usr/lib /usr/local/lib - ) - -IF (STACKTRACE_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR) - SET(STACKTRACE_LIBRARIES ${STACKTRACE_LIBRARY}) -ENDIF (STACKTRACE_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR) - -SET(PROFILER_NAMES ${PROFILER_NAMES} profiler) -FIND_LIBRARY(PROFILER_LIBRARY - NAMES ${PROFILER_LIBRARY} - PATHS /usr/lib /usr/local/lib - ) - -IF (PROFILER_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR) - SET(PROFILER_LIBRARIES ${PROFILER_LIBRARY}) -ENDIF (PROFILER_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR) - -IF (GOOGLE_PERFTOOLS_FOUND) - IF (NOT GOOGLE_PERFTOOLS_FIND_QUIETLY) - MESSAGE(STATUS "Found Google perftools: ${GOOGLE_PERFTOOLS_LIBRARIES}") - ENDIF (NOT GOOGLE_PERFTOOLS_FIND_QUIETLY) -ELSE (GOOGLE_PERFTOOLS_FOUND) - IF (GOOGLE_PERFTOOLS_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find Google perftools library") - ENDIF (GOOGLE_PERFTOOLS_FIND_REQUIRED) -ENDIF (GOOGLE_PERFTOOLS_FOUND) - -MARK_AS_ADVANCED( - TCMALLOC_LIBRARY - STACKTRACE_LIBRARY - PROFILER_LIBRARY - GOOGLE_PERFTOOLS_INCLUDE_DIR - ) diff --git a/indra/cmake/FindHUNSPELL.cmake b/indra/cmake/FindHUNSPELL.cmake deleted file mode 100644 index d411bdb9e5..0000000000 --- a/indra/cmake/FindHUNSPELL.cmake +++ /dev/null @@ -1,38 +0,0 @@ -# -*- cmake -*- - -# - Find HUNSPELL -# This module defines -# HUNSPELL_INCLUDE_DIR, where to find libhunspell.h, etc. -# HUNSPELL_LIBRARY, the library needed to use HUNSPELL. -# HUNSPELL_FOUND, If false, do not try to use HUNSPELL. - -find_path(HUNSPELL_INCLUDE_DIR hunspell.h - PATH_SUFFIXES hunspell - ) - -set(HUNSPELL_NAMES ${HUNSPELL_NAMES} libhunspell-1.3 libhunspell) -find_library(HUNSPELL_LIBRARY - NAMES ${HUNSPELL_NAMES} - ) - -if (HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR) - set(HUNSPELL_FOUND "YES") -else (HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR) - set(HUNSPELL_FOUND "NO") -endif (HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR) - - -if (HUNSPELL_FOUND) - if (NOT HUNSPELL_FIND_QUIETLY) - message(STATUS "Found Hunspell: Library in '${HUNSPELL_LIBRARY}' and header in '${HUNSPELL_INCLUDE_DIR}' ") - endif (NOT HUNSPELL_FIND_QUIETLY) -else (HUNSPELL_FOUND) - if (HUNSPELL_FIND_REQUIRED) - message(FATAL_ERROR " * * *\nCould not find HUNSPELL library! * * *") - endif (HUNSPELL_FIND_REQUIRED) -endif (HUNSPELL_FOUND) - -mark_as_advanced( - HUNSPELL_LIBRARY - HUNSPELL_INCLUDE_DIR - ) diff --git a/indra/cmake/FindJsonCpp.cmake b/indra/cmake/FindJsonCpp.cmake deleted file mode 100644 index 9398779cff..0000000000 --- a/indra/cmake/FindJsonCpp.cmake +++ /dev/null @@ -1,60 +0,0 @@ -# -*- cmake -*- - -# - Find JSONCpp -# Find the JSONCpp includes and library -# This module defines -# JSONCPP_INCLUDE_DIR, where to find json.h, etc. -# JSONCPP_LIBRARIES, the libraries needed to use jsoncpp. -# JSONCPP_FOUND, If false, do not try to use jsoncpp. -# also defined, but not for general use are -# JSONCPP_LIBRARY, where to find the jsoncpp library. - -FIND_PATH(JSONCPP_INCLUDE_DIR jsoncpp/json.h -/usr/local/include -/usr/include -) - -# Get the GCC compiler version -EXEC_PROGRAM(${CMAKE_CXX_COMPILER} - ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion - OUTPUT_VARIABLE _gcc_COMPILER_VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - -# Try to find a library that was compiled with the same compiler version as we currently use. -SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so) -IF (USESYSTEMLIBS) - # On standalone, assume that the system installed library was compiled with the used compiler. - SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson.so) -ENDIF (USESYSTEMLIBS) -FIND_LIBRARY(JSONCPP_LIBRARY - NAMES ${JSONCPP_NAMES} - PATHS /usr/lib /usr/local/lib - ) - -IF (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR) - SET(JSONCPP_LIBRARIES ${JSONCPP_LIBRARY}) - SET(JSONCPP_FOUND "YES") -ELSE (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR) - SET(JSONCPP_FOUND "NO") -ENDIF (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR) - - -IF (JSONCPP_FOUND) - IF (NOT JSONCPP_FIND_QUIETLY) - MESSAGE(STATUS "Found JSONCpp: ${JSONCPP_LIBRARIES}") - ENDIF (NOT JSONCPP_FIND_QUIETLY) -ELSE (JSONCPP_FOUND) - IF (JSONCPP_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find JSONCpp library") - ENDIF (JSONCPP_FIND_REQUIRED) -ENDIF (JSONCPP_FOUND) - -# Deprecated declarations. -SET (NATIVE_JSONCPP_INCLUDE_PATH ${JSONCPP_INCLUDE_DIR} ) -GET_FILENAME_COMPONENT (NATIVE_JSONCPP_LIB_PATH ${JSONCPP_LIBRARY} PATH) - -MARK_AS_ADVANCED( - JSONCPP_LIBRARY - JSONCPP_INCLUDE_DIR - ) diff --git a/indra/cmake/FindNDOF.cmake b/indra/cmake/FindNDOF.cmake deleted file mode 100644 index 6dcf590a53..0000000000 --- a/indra/cmake/FindNDOF.cmake +++ /dev/null @@ -1,39 +0,0 @@ -# -*- cmake -*- - -# - Find NDOF -# Find the NDOF includes and library -# This module defines -# NDOF_INCLUDE_DIR, where to find ndofdev_external.h, etc. -# NDOF_LIBRARY, the library needed to use NDOF. -# NDOF_FOUND, If false, do not try to use NDOF. - -find_path(NDOF_INCLUDE_DIR ndofdev_external.h - PATH_SUFFIXES ndofdev - ) - -set(NDOF_NAMES ${NDOF_NAMES} ndofdev libndofdev) -find_library(NDOF_LIBRARY - NAMES ${NDOF_NAMES} - ) - -if (NDOF_LIBRARY AND NDOF_INCLUDE_DIR) - set(NDOF_FOUND "YES") -else (NDOF_LIBRARY AND NDOF_INCLUDE_DIR) - set(NDOF_FOUND "NO") -endif (NDOF_LIBRARY AND NDOF_INCLUDE_DIR) - - -if (NDOF_FOUND) - if (NOT NDOF_FIND_QUIETLY) - message(STATUS "Found NDOF: Library in '${NDOF_LIBRARY}' and header in '${NDOF_INCLUDE_DIR}' ") - endif (NOT NDOF_FIND_QUIETLY) -else (NDOF_FOUND) - if (NDOF_FIND_REQUIRED) - message(FATAL_ERROR " * * *\nCould not find NDOF library!\nIf you don't need Space Navigator Joystick support you can skip this test by configuring with -DNDOF:BOOL=OFF\n * * *") - endif (NDOF_FIND_REQUIRED) -endif (NDOF_FOUND) - -mark_as_advanced( - NDOF_LIBRARY - NDOF_INCLUDE_DIR - ) diff --git a/indra/cmake/FindOpenJPEG.cmake b/indra/cmake/FindOpenJPEG.cmake deleted file mode 100644 index 949384eec4..0000000000 --- a/indra/cmake/FindOpenJPEG.cmake +++ /dev/null @@ -1,50 +0,0 @@ -# -*- cmake -*- - -# - Find OpenJPEG -# Find the OpenJPEG includes and library -# This module defines -# OPENJPEG_INCLUDE_DIR, where to find openjpeg.h, etc. -# OPENJPEG_LIBRARIES, the libraries needed to use OpenJPEG. -# OPENJPEG_FOUND, If false, do not try to use OpenJPEG. -# also defined, but not for general use are -# OPENJPEG_LIBRARY, where to find the OpenJPEG library. - -FIND_PATH(OPENJPEG_INCLUDE_DIR openjpeg.h -/usr/local/include/openjpeg -/usr/local/include -/usr/include/openjpeg -/usr/include -) - -SET(OPENJPEG_NAMES ${OPENJPEG_NAMES} openjpeg) -FIND_LIBRARY(OPENJPEG_LIBRARY - NAMES ${OPENJPEG_NAMES} - PATHS /usr/lib /usr/local/lib - ) - -IF (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR) - SET(OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARY}) - SET(OPENJPEG_FOUND "YES") -ELSE (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR) - SET(OPENJPEG_FOUND "NO") -ENDIF (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR) - - -IF (OPENJPEG_FOUND) - IF (NOT OPENJPEG_FIND_QUIETLY) - MESSAGE(STATUS "Found OpenJPEG: ${OPENJPEG_LIBRARIES}") - ENDIF (NOT OPENJPEG_FIND_QUIETLY) -ELSE (OPENJPEG_FOUND) - IF (OPENJPEG_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find OpenJPEG library") - ENDIF (OPENJPEG_FIND_REQUIRED) -ENDIF (OPENJPEG_FOUND) - -# Deprecated declarations. -SET (NATIVE_OPENJPEG_INCLUDE_PATH ${OPENJPEG_INCLUDE_DIR} ) -GET_FILENAME_COMPONENT (NATIVE_OPENJPEG_LIB_PATH ${OPENJPEG_LIBRARY} PATH) - -MARK_AS_ADVANCED( - OPENJPEG_LIBRARY - OPENJPEG_INCLUDE_DIR - ) diff --git a/indra/cmake/FindSCP.cmake b/indra/cmake/FindSCP.cmake deleted file mode 100644 index ea02102908..0000000000 --- a/indra/cmake/FindSCP.cmake +++ /dev/null @@ -1,40 +0,0 @@ -# -*- cmake -*- -# -# Find the OpenSSH scp ("secure copy") or Putty pscp command. -# -# Input variables: -# SCP_FIND_REQUIRED - set this if configuration should fail without scp -# -# Output variables: -# -# SCP_FOUND - set if scp was found -# SCP_EXECUTABLE - path to scp or pscp executable -# SCP_BATCH_FLAG - how to put scp/pscp into batch mode - -SET(SCP_EXECUTABLE) -IF (WINDOWS) - FIND_PROGRAM(SCP_EXECUTABLE NAMES pscp pscp.exe) -ELSE (WINDOWS) - FIND_PROGRAM(SCP_EXECUTABLE NAMES scp scp.exe) -ENDIF (WINDOWS) - -IF (SCP_EXECUTABLE) - SET(SCP_FOUND ON) -ELSE (SCP_EXECUTABLE) - SET(SCP_FOUND OFF) -ENDIF (SCP_EXECUTABLE) - -IF (SCP_FOUND) - GET_FILENAME_COMPONENT(_scp_name ${SCP_EXECUTABLE} NAME_WE) - IF (_scp_name STREQUAL scp) - SET(SCP_BATCH_FLAG -B) - ELSE (_scp_name STREQUAL scp) - SET(SCP_BATCH_FLAG -batch) - ENDIF (_scp_name STREQUAL scp) -ELSE (SCP_FOUND) - IF (SCP_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find scp or pscp executable") - ENDIF (SCP_FIND_REQUIRED) -ENDIF (SCP_FOUND) - -MARK_AS_ADVANCED(SCP_EXECUTABLE SCP_FOUND SCP_BATCH_FLAG) diff --git a/indra/cmake/FindURIPARSER.cmake b/indra/cmake/FindURIPARSER.cmake deleted file mode 100644 index 8ab9f0f4ed..0000000000 --- a/indra/cmake/FindURIPARSER.cmake +++ /dev/null @@ -1,46 +0,0 @@ -# -*- cmake -*- - -# - Find uriparser -# Find the URIPARSER includes and library -# This module defines -# URIPARSER_INCLUDE_DIRS, where to find uriparser.h, etc. -# URIPARSER_LIBRARIES, the libraries needed to use uriparser. -# URIPARSER_FOUND, If false, do not try to use uriparser. -# -# This FindURIPARSER is about 43 times as fast the one provided with cmake (2.8.x), -# because it doesn't look up the version of uriparser, resulting in a dramatic -# speed up for configure (from 4 minutes 22 seconds to 6 seconds). -# -# Note: Since this file is only used for standalone, the windows -# specific parts were left out. - -FIND_PATH(URIPARSER_INCLUDE_DIR uriparser/uri.h - NO_SYSTEM_ENVIRONMENT_PATH - ) - -FIND_LIBRARY(URIPARSER_LIBRARY uriparser) - -if (URIPARSER_LIBRARY AND URIPARSER_INCLUDE_DIR) - SET(URIPARSER_INCLUDE_DIRS ${URIPARSER_INCLUDE_DIR}) - SET(URIPARSER_LIBRARIES ${URIPARSER_LIBRARY}) - SET(URIPARSER_FOUND "YES") -else (URIPARSER_LIBRARY AND URIPARSER_INCLUDE_DIR) - SET(URIPARSER_FOUND "NO") -endif (URIPARSER_LIBRARY AND URIPARSER_INCLUDE_DIR) - -if (URIPARSER_FOUND) - if (NOT URIPARSER_FIND_QUIETLY) - message(STATUS "Found URIPARSER: ${URIPARSER_LIBRARIES}") - SET(URIPARSER_FIND_QUIETLY TRUE) - endif (NOT URIPARSER_FIND_QUIETLY) -else (URIPARSER_FOUND) - if (URIPARSER_FIND_REQUIRED) - message(FATAL_ERROR "Could not find URIPARSER library") - endif (URIPARSER_FIND_REQUIRED) -endif (URIPARSER_FOUND) - -mark_as_advanced( - URIPARSER_LIBRARY - URIPARSER_INCLUDE_DIR - ) - diff --git a/indra/cmake/FindXmlRpcEpi.cmake b/indra/cmake/FindXmlRpcEpi.cmake deleted file mode 100644 index ba217e7467..0000000000 --- a/indra/cmake/FindXmlRpcEpi.cmake +++ /dev/null @@ -1,48 +0,0 @@ -# -*- cmake -*- - -# - Find XMLRPC-EPI -# Find the XMLRPC-EPI includes and library -# This module defines -# XMLRPCEPI_INCLUDE_DIR, where to find jpeglib.h, etc. -# XMLRPCEPI_LIBRARIES, the libraries needed to use XMLRPC-EPI. -# XMLRPCEPI_FOUND, If false, do not try to use XMLRPC-EPI. -# also defined, but not for general use are -# XMLRPCEPI_LIBRARY, where to find the XMLRPC-EPI library. - -FIND_PATH(XMLRPCEPI_INCLUDE_DIR xmlrpc-epi/xmlrpc.h -/usr/local/include -/usr/include -) - -SET(XMLRPCEPI_NAMES ${XMLRPCEPI_NAMES} xmlrpc-epi) -FIND_LIBRARY(XMLRPCEPI_LIBRARY - NAMES ${XMLRPCEPI_NAMES} - PATHS /usr/lib /usr/local/lib - ) - -IF (XMLRPCEPI_LIBRARY AND XMLRPCEPI_INCLUDE_DIR) - SET(XMLRPCEPI_LIBRARIES ${XMLRPCEPI_LIBRARY}) - SET(XMLRPCEPI_FOUND "YES") -ELSE (XMLRPCEPI_LIBRARY AND XMLRPCEPI_INCLUDE_DIR) - SET(XMLRPCEPI_FOUND "NO") -ENDIF (XMLRPCEPI_LIBRARY AND XMLRPCEPI_INCLUDE_DIR) - - -IF (XMLRPCEPI_FOUND) - IF (NOT XMLRPCEPI_FIND_QUIETLY) - MESSAGE(STATUS "Found XMLRPC-EPI: ${XMLRPCEPI_LIBRARIES}") - ENDIF (NOT XMLRPCEPI_FIND_QUIETLY) -ELSE (XMLRPCEPI_FOUND) - IF (XMLRPCEPI_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find XMLRPC-EPI library") - ENDIF (XMLRPCEPI_FIND_REQUIRED) -ENDIF (XMLRPCEPI_FOUND) - -# Deprecated declarations. -SET (NATIVE_XMLRPCEPI_INCLUDE_PATH ${XMLRPCEPI_INCLUDE_DIR} ) -GET_FILENAME_COMPONENT (NATIVE_XMLRPCEPI_LIB_PATH ${XMLRPCEPI_LIBRARY} PATH) - -MARK_AS_ADVANCED( - XMLRPCEPI_LIBRARY - XMLRPCEPI_INCLUDE_DIR - ) diff --git a/indra/cmake/FindZLIBNG.cmake b/indra/cmake/FindZLIBNG.cmake deleted file mode 100644 index 6e3c8cdddb..0000000000 --- a/indra/cmake/FindZLIBNG.cmake +++ /dev/null @@ -1,46 +0,0 @@ -# -*- cmake -*- - -# - Find zlib-ng -# Find the ZLIB includes and library -# This module defines -# ZLIBNG_INCLUDE_DIRS, where to find zlib.h, etc. -# ZLIBNG_LIBRARIES, the libraries needed to use zlib. -# ZLIBNG_FOUND, If false, do not try to use zlib. -# -# This FindZLIBNG is about 43 times as fast the one provided with cmake (2.8.x), -# because it doesn't look up the version of zlib, resulting in a dramatic -# speed up for configure (from 4 minutes 22 seconds to 6 seconds). -# -# Note: Since this file is only used for standalone, the windows -# specific parts were left out. - -FIND_PATH(ZLIBNG_INCLUDE_DIR zlib.h - NO_SYSTEM_ENVIRONMENT_PATH - ) - -FIND_LIBRARY(ZLIBNG_LIBRARY z) - -if (ZLIBNG_LIBRARY AND ZLIBNG_INCLUDE_DIR) - SET(ZLIBNG_INCLUDE_DIRS ${ZLIBNG_INCLUDE_DIR}) - SET(ZLIBNG_LIBRARIES ${ZLIBNG_LIBRARY}) - SET(ZLIBNG_FOUND "YES") -else (ZLIBNG_LIBRARY AND ZLIBNG_INCLUDE_DIR) - SET(ZLIBNG_FOUND "NO") -endif (ZLINGB_LIBRARY AND ZLIBNG_INCLUDE_DIR) - -if (ZLIBNG_FOUND) - if (NOT ZLIBNG_FIND_QUIETLY) - message(STATUS "Found ZLIBNG: ${ZLIBNG_LIBRARIES}") - SET(ZLIBNG_FIND_QUIETLY TRUE) - endif (NOT ZLIBNG_FIND_QUIETLY) -else (ZLIBNG_FOUND) - if (ZLIBNG_FIND_REQUIRED) - message(FATAL_ERROR "Could not find ZLIBNG library") - endif (ZLIBNG_FIND_REQUIRED) -endif (ZLIBNG_FOUND) - -mark_as_advanced( - ZLIBNG_LIBRARY - ZLIBNG_INCLUDE_DIR - ) - diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake index 66f4ae0140..429bb5060b 100644 --- a/indra/cmake/FreeType.cmake +++ b/indra/cmake/FreeType.cmake @@ -6,13 +6,7 @@ if( TARGET freetype::freetype ) endif() create_target( freetype::freetype) -if (USESYSTEMLIBS) - include(FindPkgConfig) - - pkg_check_modules(FREETYPE REQUIRED freetype2) -else (USESYSTEMLIBS) - use_prebuilt_binary(freetype) - set_target_include_dirs( freetype::freetype ${LIBS_PREBUILT_DIR}/include/freetype2/) - set_target_libraries( freetype::freetype freetype ) -endif (USESYSTEMLIBS) +use_prebuilt_binary(freetype) +set_target_include_dirs( freetype::freetype ${LIBS_PREBUILT_DIR}/include/freetype2/) +set_target_libraries( freetype::freetype freetype ) diff --git a/indra/cmake/GLEXT.cmake b/indra/cmake/GLEXT.cmake index 9fd3923bfd..6562082d7e 100644 --- a/indra/cmake/GLEXT.cmake +++ b/indra/cmake/GLEXT.cmake @@ -1,10 +1,8 @@ # -*- cmake -*- include(Prebuilt) -if (NOT USESYSTEMLIBS) - if (WINDOWS OR LINUX) - use_prebuilt_binary(glext) - endif (WINDOWS OR LINUX) - use_prebuilt_binary(glh_linear) - set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) -endif (NOT USESYSTEMLIBS) +if (WINDOWS OR LINUX) + use_prebuilt_binary(glext) +endif (WINDOWS OR LINUX) +use_prebuilt_binary(glh_linear) +set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/GLH.cmake b/indra/cmake/GLH.cmake index d5262f2efa..d7e89afaec 100644 --- a/indra/cmake/GLH.cmake +++ b/indra/cmake/GLH.cmake @@ -4,8 +4,4 @@ include(Prebuilt) set(GLH_FIND_REQUIRED TRUE) set(GLH_FIND_QUIETLY TRUE) -if (USESYSTEMLIBS) - include(FindGLH) -else (USESYSTEMLIBS) - use_prebuilt_binary(glh_linear) -endif (USESYSTEMLIBS) +use_prebuilt_binary(glh_linear) diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake index 8d41db4ea3..1a33644e9e 100644 --- a/indra/cmake/GLOD.cmake +++ b/indra/cmake/GLOD.cmake @@ -6,11 +6,7 @@ if( TARGET glod::glod ) endif() create_target( glod::glod ) -if (NOT USESYSTEMLIBS) - use_prebuilt_binary(glod) -endif (NOT USESYSTEMLIBS) - - +use_prebuilt_binary(glod) set(GLODLIB ON CACHE BOOL "Using GLOD library") diff --git a/indra/cmake/GStreamer010Plugin.cmake b/indra/cmake/GStreamer010Plugin.cmake index 3fbc40ef8f..848d4f7fc6 100644 --- a/indra/cmake/GStreamer010Plugin.cmake +++ b/indra/cmake/GStreamer010Plugin.cmake @@ -1,12 +1,6 @@ # -*- cmake -*- include(Prebuilt) - -if (USESYSTEMLIBS) - include(FindPkgConfig) - - pkg_check_modules(GSTREAMER010 REQUIRED gstreamer-0.10) - pkg_check_modules(GSTREAMER010_PLUGINS_BASE REQUIRED gstreamer-plugins-base-0.10) -elseif (LINUX) +if (LINUX) use_prebuilt_binary(gstreamer) # possible libxml2 should have its own .cmake file instead use_prebuilt_binary(libxml2) @@ -26,7 +20,7 @@ elseif (LINUX) gthread-2.0 glib-2.0 ) -endif (USESYSTEMLIBS) +endif () if (GSTREAMER010_FOUND AND GSTREAMER010_PLUGINS_BASE_FOUND) set(GSTREAMER010 ON CACHE BOOL "Build with GStreamer-0.10 streaming media support.") diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake index 970b06b81f..81702cbd77 100644 --- a/indra/cmake/Hunspell.cmake +++ b/indra/cmake/Hunspell.cmake @@ -6,19 +6,15 @@ if( TARGET hunspell::hunspell ) endif() create_target( hunspell::hunspell ) -if (USESYSTEMLIBS) - include(FindHUNSPELL) -else (USESYSTEMLIBS) - use_prebuilt_binary(libhunspell) - if (WINDOWS) - set_target_libraries( hunspell::hunspell libhunspell) - elseif(DARWIN) - set_target_libraries( hunspell::hunspell hunspell-1.3) - elseif(LINUX) - set_target_libraries( hunspell::hunspell hunspell-1.3) - else() - message(FATAL_ERROR "Invalid platform") - endif() - set_target_include_dirs( hunspell::hunspell ${LIBS_PREBUILT_DIR}/include/hunspell) - use_prebuilt_binary(dictionaries) -endif (USESYSTEMLIBS) +use_prebuilt_binary(libhunspell) +if (WINDOWS) + set_target_libraries( hunspell::hunspell libhunspell) +elseif(DARWIN) + set_target_libraries( hunspell::hunspell hunspell-1.3) +elseif(LINUX) + set_target_libraries( hunspell::hunspell hunspell-1.3) +else() + message(FATAL_ERROR "Invalid platform") +endif() +set_target_include_dirs( hunspell::hunspell ${LIBS_PREBUILT_DIR}/include/hunspell) +use_prebuilt_binary(dictionaries) diff --git a/indra/cmake/JPEG.cmake b/indra/cmake/JPEG.cmake index 7245ca7b36..d3bec7901f 100644 --- a/indra/cmake/JPEG.cmake +++ b/indra/cmake/JPEG.cmake @@ -8,16 +8,12 @@ if( TARGET jpeglib::jpeglib ) endif() create_target(jpeglib::jpeglib) -if (USESYSTEMLIBS) - include(FindJPEG) -else (USESYSTEMLIBS) - use_prebuilt_binary(jpeglib) - if (LINUX) - set_target_libraries( jpeglib::jpeglib jpeg) - elseif (DARWIN) - set_target_libraries( jpeglib::jpeglib jpeg) - elseif (WINDOWS) - set_target_libraries( jpeglib::jpeglib jpeglib) - endif (LINUX) - set_target_include_dirs( jpeglib::jpeglib ${LIBS_PREBUILT_DIR}/include) -endif (USESYSTEMLIBS) +use_prebuilt_binary(jpeglib) +if (LINUX) + set_target_libraries( jpeglib::jpeglib jpeg) +elseif (DARWIN) + set_target_libraries( jpeglib::jpeglib jpeg) +elseif (WINDOWS) + set_target_libraries( jpeglib::jpeglib jpeglib) +endif (LINUX) +set_target_include_dirs( jpeglib::jpeglib ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake index 14bfd32b6b..139735ed05 100644 --- a/indra/cmake/JsonCpp.cmake +++ b/indra/cmake/JsonCpp.cmake @@ -6,16 +6,12 @@ if( TARGET jsoncpp::jsoncpp ) endif() create_target( jsoncpp::jsoncpp) -if (USESYSTEMLIBS) - include(FindJsonCpp) -else (USESYSTEMLIBS) - use_prebuilt_binary(jsoncpp) - if (WINDOWS) - set_target_libraries( jsoncpp::jsoncpp json_libmd.lib ) - elseif (DARWIN) - set_target_libraries( jsoncpp::jsoncpp libjson_darwin_libmt.a ) - elseif (LINUX) - set_target_libraries( jsoncpp::jsoncpp libjson_linux-gcc-4.1.3_libmt.a ) - endif (WINDOWS) - set_target_include_dirs( jsoncpp::jsoncpp ${LIBS_PREBUILT_DIR}/include/json) -endif (USESYSTEMLIBS) +use_prebuilt_binary(jsoncpp) +if (WINDOWS) + set_target_libraries( jsoncpp::jsoncpp json_libmd.lib ) +elseif (DARWIN) + set_target_libraries( jsoncpp::jsoncpp libjson_darwin_libmt.a ) +elseif (LINUX) + set_target_libraries( jsoncpp::jsoncpp libjson_linux-gcc-4.1.3_libmt.a ) +endif (WINDOWS) +set_target_include_dirs( jsoncpp::jsoncpp ${LIBS_PREBUILT_DIR}/include/json) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 1a8003ea7f..2fa9a7cd96 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -223,10 +223,6 @@ FUNCTION(LL_ADD_INTEGRATION_TEST COMPILE_DEFINITIONS "LL_TEST=${testname};LL_TEST_${testname}" ) - if(USESYSTEMLIBS) - SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}") - endif(USESYSTEMLIBS) - if (USE_BUGSPLAT) SET_PROPERTY(SOURCE ${source_files} APPEND PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}") @@ -304,10 +300,6 @@ MACRO(SET_TEST_PATH LISTVAR) set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources ${SHARED_LIB_STAGING_DIR}/Release/Resources /usr/lib) ELSE(WINDOWS) # Linux uses a single staging directory anyway. - IF (USESYSTEMLIBS) - set(${LISTVAR} ${CMAKE_BINARY_DIR}/llcommon /usr/lib /usr/local/lib) - ELSE (USESYSTEMLIBS) - set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib) - ENDIF (USESYSTEMLIBS) + set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib) ENDIF(WINDOWS) ENDMACRO(SET_TEST_PATH) diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index d0dca3dfdd..42d2a0f2c4 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -9,22 +9,11 @@ if( TARGET sdl::sdl) endif() create_target(sdl::sdl) -if (USESYSTEMLIBS) - include(FindSDL) - - # This should be done by FindSDL. Sigh. - mark_as_advanced( - SDLMAIN_LIBRARY - SDL_INCLUDE_DIR - SDL_LIBRARY - ) -else (USESYSTEMLIBS) - 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) - endif (LINUX) -endif (USESYSTEMLIBS) +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) +endif (LINUX) diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake index 2adedbfae3..12ba1720c7 100644 --- a/indra/cmake/LibVLCPlugin.cmake +++ b/indra/cmake/LibVLCPlugin.cmake @@ -7,15 +7,10 @@ if( TARGET libvlc::libvlc ) endif() create_target( libvlc::libvlc ) -if (USESYSTEMLIBS) - set(LIBVLCPLUGIN OFF CACHE BOOL +use_prebuilt_binary(vlc-bin) +set(LIBVLCPLUGIN ON CACHE BOOL "LIBVLCPLUGIN support for the llplugin/llmedia test apps.") -else (USESYSTEMLIBS) - use_prebuilt_binary(vlc-bin) - set(LIBVLCPLUGIN ON CACHE BOOL - "LIBVLCPLUGIN support for the llplugin/llmedia test apps.") - set(VLC_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/vlc) -endif (USESYSTEMLIBS) +set(VLC_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/vlc) if (WINDOWS) set_target_libraries( libvlc::libvlc diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake index 7b64b23299..e5ec962f4c 100644 --- a/indra/cmake/NDOF.cmake +++ b/indra/cmake/NDOF.cmake @@ -9,23 +9,18 @@ endif() create_target( ndof::ndof ) if (NDOF) - if (USESYSTEMLIBS) - set(NDOF_FIND_REQUIRED ON) - include(FindNDOF) - else (USESYSTEMLIBS) - if (WINDOWS OR DARWIN) - use_prebuilt_binary(libndofdev) - elseif (LINUX) - use_prebuilt_binary(open-libndofdev) - endif (WINDOWS OR DARWIN) + if (WINDOWS OR DARWIN) + use_prebuilt_binary(libndofdev) + elseif (LINUX) + use_prebuilt_binary(open-libndofdev) + endif (WINDOWS OR DARWIN) - if (WINDOWS) - set_target_libraries( ndof::ndof libndofdev) - elseif (DARWIN OR LINUX) - set_target_libraries( ndof::ndof ndofdev) - endif (WINDOWS) - target_compile_definitions( ndof::ndof INTERFACE LIB_NDOF=1) - endif (USESYSTEMLIBS) + if (WINDOWS) + set_target_libraries( ndof::ndof libndofdev) + elseif (DARWIN OR LINUX) + set_target_libraries( ndof::ndof ndofdev) + endif (WINDOWS) + target_compile_definitions( ndof::ndof INTERFACE LIB_NDOF=1) endif (NDOF) if (NOT NDOF_FOUND) diff --git a/indra/cmake/NGHTTP2.cmake b/indra/cmake/NGHTTP2.cmake index 5215af5dd9..b1a0d33102 100644 --- a/indra/cmake/NGHTTP2.cmake +++ b/indra/cmake/NGHTTP2.cmake @@ -5,16 +5,12 @@ if( TARGET nghttp2::nghttp2 ) endif() create_target( nghttp2::nghttp2 ) -if (USESYSTEMLIBS) - include(FindNGHTTP2) -else (USESYSTEMLIBS) - use_prebuilt_binary(nghttp2) - if (WINDOWS) - set_target_libraries( nghttp2::nghttp2 ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib) - elseif (DARWIN) - set_target_libraries( nghttp2::nghttp2 libnghttp2.dylib) - else (WINDOWS) - set_target_libraries( nghttp2::nghttp2 libnghttp2.a ) - endif (WINDOWS) - set_target_include_dirs( nghttp2::nghttp2 ${LIBS_PREBUILT_DIR}/include/nghttp2) -endif (USESYSTEMLIBS) +use_prebuilt_binary(nghttp2) +if (WINDOWS) + set_target_libraries( nghttp2::nghttp2 ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib) +elseif (DARWIN) + set_target_libraries( nghttp2::nghttp2 libnghttp2.dylib) +else (WINDOWS) + set_target_libraries( nghttp2::nghttp2 libnghttp2.a ) +endif (WINDOWS) +set_target_include_dirs( nghttp2::nghttp2 ${LIBS_PREBUILT_DIR}/include/nghttp2) diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake index a5058b4bc3..ec60876419 100644 --- a/indra/cmake/OPENAL.cmake +++ b/indra/cmake/OPENAL.cmake @@ -16,14 +16,7 @@ if (OPENAL) create_target( openal::openal ) set_target_include_dirs( openal::openal "${LIBS_PREBUILT_DIR}/include/AL") - if (USESYSTEMLIBS) - include(FindPkgConfig) - include(FindOpenAL) - pkg_check_modules(OPENAL_LIB REQUIRED openal) - pkg_check_modules(FREEALUT_LIB REQUIRED freealut) - else (USESYSTEMLIBS) - use_prebuilt_binary(openal) - endif (USESYSTEMLIBS) + use_prebuilt_binary(openal) if(WINDOWS) set_target_libraries( openal::openal diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 67292250bb..e8aa231314 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -6,11 +6,7 @@ if( TARGET openjpeg::openjpeg ) endif() create_target( openjpeg::openjpeg ) -if (USESYSTEMLIBS) - include(FindOpenJPEG) -else (USESYSTEMLIBS) - use_prebuilt_binary(openjpeg) - - set_target_libraries(openjpeg::openjpeg openjpeg ) - set_target_include_dirs( openjpeg::openjpeg ${LIBS_PREBUILT_DIR}/include/openjpeg) -endif (USESYSTEMLIBS) +use_prebuilt_binary(openjpeg) + +set_target_libraries(openjpeg::openjpeg openjpeg ) +set_target_include_dirs( openjpeg::openjpeg ${LIBS_PREBUILT_DIR}/include/openjpeg) diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake index 80b419c36e..0aa95922ed 100644 --- a/indra/cmake/OpenSSL.cmake +++ b/indra/cmake/OpenSSL.cmake @@ -6,17 +6,13 @@ if( TARGET openssl::openssl ) endif() create_target(openssl::openssl) -if (USESYSTEMLIBS) - include(FindOpenSSL) -else (USESYSTEMLIBS) - use_prebuilt_binary(openssl) - if (WINDOWS) - set_target_libraries(openssl::openssl libssl libcrypto) - elseif (LINUX) - set_target_libraries(openssl::openssl ssl crypto dl) - else() - set_target_libraries(openssl::openssl ssl crypto) - endif (WINDOWS) - set_target_include_dirs(openssl::openssl ${LIBS_PREBUILT_DIR}/include) -endif (USESYSTEMLIBS) +use_prebuilt_binary(openssl) +if (WINDOWS) + set_target_libraries(openssl::openssl libssl libcrypto) +elseif (LINUX) + set_target_libraries(openssl::openssl ssl crypto dl) +else() + set_target_libraries(openssl::openssl ssl crypto) +endif (WINDOWS) +set_target_include_dirs(openssl::openssl ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/PNG.cmake b/indra/cmake/PNG.cmake index cf338ebe5e..819904b6bd 100644 --- a/indra/cmake/PNG.cmake +++ b/indra/cmake/PNG.cmake @@ -6,17 +6,10 @@ if( TARGET libpng::libpng ) endif() create_target(libpng::libpng) -set(PNG_FIND_QUIETLY ON) -set(PNG_FIND_REQUIRED ON) - -if (USESYSTEMLIBS) - include(FindPNG) -else (USESYSTEMLIBS) - use_prebuilt_binary(libpng) - if (WINDOWS) - set_target_libraries(libpng::libpng libpng16) - else() - set_target_libraries(libpng::libpng png16 ) - endif() - set_target_include_dirs( libpng::libpng ${LIBS_PREBUILT_DIR}/include/libpng16) -endif (USESYSTEMLIBS) +use_prebuilt_binary(libpng) +if (WINDOWS) + set_target_libraries(libpng::libpng libpng16) +else() + set_target_libraries(libpng::libpng png16 ) +endif() +set_target_include_dirs( libpng::libpng ${LIBS_PREBUILT_DIR}/include/libpng16) diff --git a/indra/cmake/PulseAudio.cmake b/indra/cmake/PulseAudio.cmake index cce27f1bdd..1b7adc1a62 100644 --- a/indra/cmake/PulseAudio.cmake +++ b/indra/cmake/PulseAudio.cmake @@ -4,23 +4,16 @@ include(Prebuilt) set(PULSEAUDIO OFF CACHE BOOL "Build with PulseAudio support, if available.") if (PULSEAUDIO) - if (USESYSTEMLIBS) - include(FindPkgConfig) - - pkg_check_modules(PULSEAUDIO libpulse) - - elseif (LINUX) - use_prebuilt_binary(pulseaudio) - set(PULSEAUDIO_FOUND ON FORCE BOOL) - set(PULSEAUDIO_INCLUDE_DIRS - ${LIBS_PREBUILT_DIR}/include - ) - # We don't need to explicitly link against pulseaudio itself, because - # the viewer probes for the system's copy at runtime. - set(PULSEAUDIO_LIBRARIES - # none needed! - ) - endif (USESYSTEMLIBS) + use_prebuilt_binary(pulseaudio) + set(PULSEAUDIO_FOUND ON FORCE BOOL) + set(PULSEAUDIO_INCLUDE_DIRS + ${LIBS_PREBUILT_DIR}/include + ) + # We don't need to explicitly link against pulseaudio itself, because + # the viewer probes for the system's copy at runtime. + set(PULSEAUDIO_LIBRARIES + # none needed! + ) endif (PULSEAUDIO) if (PULSEAUDIO_FOUND) diff --git a/indra/cmake/Tut.cmake b/indra/cmake/Tut.cmake index e11a3c3314..ad93830803 100644 --- a/indra/cmake/Tut.cmake +++ b/indra/cmake/Tut.cmake @@ -1,6 +1,4 @@ # -*- cmake -*- include(Prebuilt) -if (NOT USESYSTEMLIBS) - use_prebuilt_binary(tut) -endif(NOT USESYSTEMLIBS) +use_prebuilt_binary(tut) diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index 77fd505df3..c12dca2ab9 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -2,67 +2,36 @@ include(Prebuilt) include(FreeType) -if (USESYSTEMLIBS) - include(FindPkgConfig) - - if (LINUX) - set(PKGCONFIG_PACKAGES - atk - cairo - gdk-2.0 - gdk-pixbuf-2.0 - glib-2.0 - gmodule-2.0 - gtk+-2.0 - gthread-2.0 - libpng - pango - pangoft2 - pangox - pangoxft - sdl - ) - endif (LINUX) - - foreach(pkg ${PKGCONFIG_PACKAGES}) - pkg_check_modules(${pkg} REQUIRED ${pkg}) - include_directories(${${pkg}_INCLUDE_DIRS}) - link_directories(${${pkg}_LIBRARY_DIRS}) - list(APPEND UI_LIBRARIES ${${pkg}_LIBRARIES}) - add_definitions(${${pkg}_CFLAGS_OTHERS}) - endforeach(pkg) -else (USESYSTEMLIBS) - if (LINUX) - use_prebuilt_binary(gtk-atk-pango-glib) - endif (LINUX) +if (LINUX) + use_prebuilt_binary(gtk-atk-pango-glib) +endif (LINUX) - if (LINUX) - set(UI_LIBRARIES - atk-1.0 - gdk-x11-2.0 - gdk_pixbuf-2.0 - Xinerama - glib-2.0 - gmodule-2.0 - gobject-2.0 - gthread-2.0 - gtk-x11-2.0 - pango-1.0 - pangoft2-1.0 - pangox-1.0 - pangoxft-1.0 - ${FREETYPE_LIBRARIES} - ) - endif (LINUX) +if (LINUX) + set(UI_LIBRARIES + atk-1.0 + gdk-x11-2.0 + gdk_pixbuf-2.0 + Xinerama + glib-2.0 + gmodule-2.0 + gobject-2.0 + gthread-2.0 + gtk-x11-2.0 + pango-1.0 + pangoft2-1.0 + pangox-1.0 + pangoxft-1.0 + ${FREETYPE_LIBRARIES} + ) +endif (LINUX) - include_directories ( - ${LIBS_PREBUILT_DIR}/include - ${LIBS_PREBUILT_DIR}/include - ) - foreach(include ${${LL_ARCH}_INCLUDES}) - include_directories(${LIBS_PREBUILT_DIR}/include/${include}) - endforeach(include) -endif (USESYSTEMLIBS) +include_directories ( + ${LIBS_PREBUILT_DIR}/include + ${LIBS_PREBUILT_DIR}/include +) +foreach(include ${${LL_ARCH}_INCLUDES}) + include_directories(${LIBS_PREBUILT_DIR}/include/${include}) +endforeach(include) if (LINUX) add_definitions(-DLL_GTK=1 -DLL_X11=1) diff --git a/indra/cmake/URIPARSER.cmake b/indra/cmake/URIPARSER.cmake index 55b38fca28..3afd8cd6c9 100644 --- a/indra/cmake/URIPARSER.cmake +++ b/indra/cmake/URIPARSER.cmake @@ -7,16 +7,12 @@ create_target( uriparser::uriparser ) include(Prebuilt) -if (USESYSTEMLIBS) - include(FindURIPARSER) -else (USESYSTEMLIBS) - use_prebuilt_binary(uriparser) - if (WINDOWS) - set_target_libraries( uriparser::uriparser uriparser) - elseif (LINUX) - set_target_libraries( uriparser::uriparser uriparser) - elseif (DARWIN) - set_target_libraries( uriparser::uriparser liburiparser.dylib) - endif (WINDOWS) - set_target_include_dirs( uriparser::uriparser ${LIBS_PREBUILT_DIR}/include/uriparser) -endif (USESYSTEMLIBS) +use_prebuilt_binary(uriparser) +if (WINDOWS) + set_target_libraries( uriparser::uriparser uriparser) +elseif (LINUX) + set_target_libraries( uriparser::uriparser uriparser) +elseif (DARWIN) + set_target_libraries( uriparser::uriparser liburiparser.dylib) +endif (WINDOWS) +set_target_include_dirs( uriparser::uriparser ${LIBS_PREBUILT_DIR}/include/uriparser) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index e72475cbc4..56916504b5 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -214,7 +214,6 @@ set(ENABLE_SIGNING OFF CACHE BOOL "Enable signing the viewer") set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if necessary.") set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside") -set(USESYSTEMLIBS OFF CACHE BOOL "Use libraries from your system rather than Linden-supplied prebuilt libraries.") set(USE_PRECOMPILED_HEADERS ON CACHE BOOL "Enable use of precompiled header directives where supported.") diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index fc5bdedb5a..1dff854855 100644 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -1,12 +1,10 @@ # -*- cmake -*- include(Prebuilt) -if (NOT USESYSTEMLIBS) - if (LINUX) - use_prebuilt_binary(libuuid) - use_prebuilt_binary(fontconfig) - endif (LINUX) - use_prebuilt_binary(libhunspell) - use_prebuilt_binary(slvoice) -endif(NOT USESYSTEMLIBS) +if (LINUX) + use_prebuilt_binary(libuuid) + use_prebuilt_binary(fontconfig) +endif (LINUX) +use_prebuilt_binary(libhunspell) +use_prebuilt_binary(slvoice) diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index 75b94acc50..28a9a10e40 100644 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -6,10 +6,6 @@ if( TARGET xmlrpc-epi::xmlrpc-epi ) endif() create_target( xmlrpc-epi::xmlrpc-epi ) -if (USESYSTEMLIBS) - include(FindXmlRpcEpi) -else (USESYSTEMLIBS) - 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) -endif (USESYSTEMLIBS) +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) diff --git a/indra/cmake/ZLIBNG.cmake b/indra/cmake/ZLIBNG.cmake index 5aaca60664..d5e882cb68 100644 --- a/indra/cmake/ZLIBNG.cmake +++ b/indra/cmake/ZLIBNG.cmake @@ -7,14 +7,10 @@ if( TARGET zlib-ng::zlib-ng ) endif() create_target(zlib-ng::zlib-ng) -if (USESYSTEMLIBS) - include(FindZLIBNG) -else (USESYSTEMLIBS) - use_prebuilt_binary(zlib-ng) - if (WINDOWS) - set_target_libraries( zlib-ng::zlib-ng zlib ) - else() - set_target_libraries( zlib-ng::zlib-ng z ) - endif (WINDOWS) - set_target_include_dirs( zlib-ng::zlib-ng ${LIBS_PREBUILT_DIR}/include/zlib-ng) -endif (USESYSTEMLIBS) +use_prebuilt_binary(zlib-ng) +if (WINDOWS) + set_target_libraries( zlib-ng::zlib-ng zlib ) +else() + set_target_libraries( zlib-ng::zlib-ng z ) +endif (WINDOWS) +set_target_include_dirs( zlib-ng::zlib-ng ${LIBS_PREBUILT_DIR}/include/zlib-ng) diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake index 820ca8652c..75d5239b47 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -15,25 +15,21 @@ endif() create_target(bugsplat::bugsplat) if (USE_BUGSPLAT) - if (NOT USESYSTEMLIBS) - include(Prebuilt) - use_prebuilt_binary(bugsplat) - if (WINDOWS) - set_target_libraries( bugsplat::bugsplat + include(Prebuilt) + use_prebuilt_binary(bugsplat) + if (WINDOWS) + set_target_libraries( bugsplat::bugsplat ${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib ) - elseif (DARWIN) - find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED + elseif (DARWIN) + find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}") - set_target_libraries( bugsplat::bugsplat - ${BUGSPLAT_LIBRARIES} - ) - else (WINDOWS) - message(FATAL_ERROR "BugSplat is not supported; add -DUSE_BUGSPLAT=OFF") - endif (WINDOWS) - else (NOT USESYSTEMLIBS) - include(FindBUGSPLAT) - endif (NOT USESYSTEMLIBS) + set_target_libraries( bugsplat::bugsplat + ${BUGSPLAT_LIBRARIES} + ) + else (WINDOWS) + message(FATAL_ERROR "BugSplat is not supported; add -DUSE_BUGSPLAT=OFF") + endif (WINDOWS) set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name") diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index ccd7ce47da..9b48e5064e 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1553,9 +1553,7 @@ if (WINDOWS) SOURCE_GROUP("Resource Files" FILES ${viewer_RESOURCE_FILES}) - if (NOT USESYSTEMLIBS) - list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES}) - endif (NOT USESYSTEMLIBS) + list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES}) # see EXP-1765 - theory is opengl32.lib needs to be included before gdi32.lib (windows libs) set(viewer_LIBRARIES @@ -1673,9 +1671,7 @@ source_group("Character File" FILES ${viewer_CHARACTER_FILES}) set_source_files_properties(${viewer_CHARACTER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) -if (NOT USESYSTEMLIBS) - list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES}) -endif (NOT USESYSTEMLIBS) +list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES}) if (WINDOWS) file(GLOB viewer_INSTALLER_FILES installers/windows/*.nsi) -- cgit v1.2.3 From 2c9ede0ccc3b6a27ca418fcb6e7a91eb87b261e9 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 13 Apr 2022 10:29:10 +0200 Subject: Remove another old remnant of the debug config. --- indra/media_plugins/cef/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 8d14714020..94281465e7 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -71,7 +71,6 @@ if (WINDOWS) media_plugin_cef PROPERTIES LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMT /IGNORE:4099" - LINK_FLAGS_DEBUG "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMTD /IGNORE:4099" ) endif (WINDOWS) -- cgit v1.2.3 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(-) 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 From 6417836e69aa9250b19955937fe9cd0965c4c8ba Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 13 Apr 2022 19:27:02 +0200 Subject: FindSCP.cmake is used when INSTALL_PROPRIETARY is set. Not sure what the latter does, but I suppose some internal logic on the LL build farm. --- indra/cmake/FindSCP.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 indra/cmake/FindSCP.cmake diff --git a/indra/cmake/FindSCP.cmake b/indra/cmake/FindSCP.cmake new file mode 100644 index 0000000000..ea02102908 --- /dev/null +++ b/indra/cmake/FindSCP.cmake @@ -0,0 +1,40 @@ +# -*- cmake -*- +# +# Find the OpenSSH scp ("secure copy") or Putty pscp command. +# +# Input variables: +# SCP_FIND_REQUIRED - set this if configuration should fail without scp +# +# Output variables: +# +# SCP_FOUND - set if scp was found +# SCP_EXECUTABLE - path to scp or pscp executable +# SCP_BATCH_FLAG - how to put scp/pscp into batch mode + +SET(SCP_EXECUTABLE) +IF (WINDOWS) + FIND_PROGRAM(SCP_EXECUTABLE NAMES pscp pscp.exe) +ELSE (WINDOWS) + FIND_PROGRAM(SCP_EXECUTABLE NAMES scp scp.exe) +ENDIF (WINDOWS) + +IF (SCP_EXECUTABLE) + SET(SCP_FOUND ON) +ELSE (SCP_EXECUTABLE) + SET(SCP_FOUND OFF) +ENDIF (SCP_EXECUTABLE) + +IF (SCP_FOUND) + GET_FILENAME_COMPONENT(_scp_name ${SCP_EXECUTABLE} NAME_WE) + IF (_scp_name STREQUAL scp) + SET(SCP_BATCH_FLAG -B) + ELSE (_scp_name STREQUAL scp) + SET(SCP_BATCH_FLAG -batch) + ENDIF (_scp_name STREQUAL scp) +ELSE (SCP_FOUND) + IF (SCP_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find scp or pscp executable") + ENDIF (SCP_FIND_REQUIRED) +ENDIF (SCP_FOUND) + +MARK_AS_ADVANCED(SCP_EXECUTABLE SCP_FOUND SCP_BATCH_FLAG) -- cgit v1.2.3 From db8bc696847a4bba46e61f368f9ba17ad37ad4ab Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 13 Apr 2022 21:27:27 +0200 Subject: Dependency on target xml-rpc-epi got lost, bring it back --- indra/llmessage/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index 334a55348c..5f48ea60dc 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -204,6 +204,7 @@ target_link_libraries( llfilesystem llmath llcorehttp + ll::xmlrpc-epi ) set_target_include_dirs( llmessage ${CMAKE_CURRENT_SOURCE_DIR}) -- cgit v1.2.3 From 5aea7576b0c3494c7f1051f63c7414ae18060ced Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 14:20:31 +0200 Subject: Simple reformat with CLion --- indra/cmake/CMakeLists.txt | 131 ++++++++++++++++++++++----------------------- 1 file changed, 65 insertions(+), 66 deletions(-) diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 48b08b31d6..c8e71b604f 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -5,82 +5,81 @@ include(00-Common) project(cmake) set(cmake_SOURCE_FILES - CMakeLists.txt - - 00-Common.cmake - APR.cmake - Audio.cmake - Boost.cmake - bugsplat.cmake - BuildVersion.cmake - CEFPlugin.cmake - CEFPlugin.cmake - CMakeCopyIfDifferent.cmake - ConfigurePkgConfig.cmake - CURL.cmake - Copy3rdPartyLibs.cmake - DBusGlib.cmake - DeploySharedLibs.cmake - DragDrop.cmake - EXPAT.cmake + CMakeLists.txt + 00-Common.cmake + APR.cmake + Audio.cmake + Boost.cmake + bugsplat.cmake + BuildVersion.cmake + CEFPlugin.cmake + CEFPlugin.cmake + CMakeCopyIfDifferent.cmake + ConfigurePkgConfig.cmake + CURL.cmake + Copy3rdPartyLibs.cmake + DBusGlib.cmake + DeploySharedLibs.cmake + DragDrop.cmake + EXPAT.cmake FindAutobuild.cmake FMODSTUDIO.cmake - FreeType.cmake - GLEXT.cmake - GLH.cmake - GLOD.cmake - GoogleMock.cmake - Havok.cmake - Hunspell.cmake + FreeType.cmake + GLEXT.cmake + GLH.cmake + GLOD.cmake + GoogleMock.cmake + Havok.cmake + Hunspell.cmake JsonCpp.cmake - LLAddBuildTest.cmake - LLAppearance.cmake - LLAudio.cmake - LLCommon.cmake - LLImage.cmake - LLKDU.cmake - LLPhysicsExtensions.cmake - LLPrimitive.cmake - LLSharedLibs.cmake - LLTestCommand.cmake - LLWindow.cmake - Linking.cmake - NDOF.cmake - OPENAL.cmake - OpenGL.cmake - OpenJPEG.cmake - OpenSSL.cmake - PNG.cmake - PluginAPI.cmake - Prebuilt.cmake - PulseAudio.cmake - Python.cmake - TemplateCheck.cmake - Tut.cmake - UI.cmake - UnixInstall.cmake - URIPARSER.cmake - Variables.cmake - ViewerMiscLibs.cmake - VisualLeakDetector.cmake - LibVLCPlugin.cmake - XmlRpcEpi.cmake - ZLIBNG.cmake - ) + LLAddBuildTest.cmake + LLAppearance.cmake + LLAudio.cmake + LLCommon.cmake + LLImage.cmake + LLKDU.cmake + LLPhysicsExtensions.cmake + LLPrimitive.cmake + LLSharedLibs.cmake + LLTestCommand.cmake + LLWindow.cmake + Linking.cmake + NDOF.cmake + OPENAL.cmake + OpenGL.cmake + OpenJPEG.cmake + OpenSSL.cmake + PNG.cmake + PluginAPI.cmake + Prebuilt.cmake + PulseAudio.cmake + Python.cmake + TemplateCheck.cmake + Tut.cmake + UI.cmake + UnixInstall.cmake + URIPARSER.cmake + Variables.cmake + ViewerMiscLibs.cmake + VisualLeakDetector.cmake + LibVLCPlugin.cmake + XmlRpcEpi.cmake + ZLIBNG.cmake + ) source_group("Shared Rules" FILES ${cmake_SOURCE_FILES}) set(master_SOURCE_FILES - ../CMakeLists.txt - ) + ../CMakeLists.txt + ) source_group("Master Rules" FILES ${master_SOURCE_FILES}) set_source_files_properties(${cmake_SOURCE_FILES} ${master_SOURCE_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) + PROPERTIES HEADER_FILE_ONLY TRUE) add_library(cmake - cmake_dummy.cpp - ${cmake_SOURCE_FILES} - ${master_SOURCE_FILES} - ) + cmake_dummy.cpp + ${cmake_SOURCE_FILES} + ${master_SOURCE_FILES} + ) -- cgit v1.2.3 From c8eb53859fb9b9f59d5ce8ef67f4011e95e34a9a Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 14:21:26 +0200 Subject: Remove unused code --- indra/cmake/ExamplePlugin.cmake | 5 ----- 1 file changed, 5 deletions(-) diff --git a/indra/cmake/ExamplePlugin.cmake b/indra/cmake/ExamplePlugin.cmake index c7ffaf024e..6234035474 100644 --- a/indra/cmake/ExamplePlugin.cmake +++ b/indra/cmake/ExamplePlugin.cmake @@ -4,8 +4,3 @@ include(Prebuilt) set(EXAMPLEPLUGIN ON CACHE BOOL "EXAMPLEPLUGIN support for the llplugin/llmedia test apps.") - -if (WINDOWS) -elseif (DARWIN) -elseif (LINUX) -endif (WINDOWS) -- cgit v1.2.3 From bb85651d987a6cb969de7dd7c2b130411de6203c Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 15:29:02 +0200 Subject: Create a new target ll::oslibrary to link against libs specific to the OS compiled on. This gets rid of the a few OS specific set and uses variables (which some even seemed mostly duplicate like WINDOWS_LIBRARIES ans UI_LIBRARIES) and it also solves the problem of having them to tack on every target, as of no they come as a transitive dependency from llcommon --- indra/cmake/LLAddBuildTest.cmake | 2 - indra/cmake/Linking.cmake | 70 ++++++++++++++-------- .../llimage_libtest/CMakeLists.txt | 14 ----- .../integration_tests/llui_libtest/CMakeLists.txt | 16 ----- indra/llcommon/CMakeLists.txt | 13 +--- indra/llcorehttp/CMakeLists.txt | 2 - indra/llfilesystem/CMakeLists.txt | 9 +-- indra/llinventory/CMakeLists.txt | 2 +- indra/llmessage/CMakeLists.txt | 17 +----- indra/llplugin/slplugin/CMakeLists.txt | 8 --- indra/llui/CMakeLists.txt | 4 +- indra/llxml/CMakeLists.txt | 1 - indra/newview/CMakeLists.txt | 16 ----- indra/test/CMakeLists.txt | 2 - 14 files changed, 52 insertions(+), 124 deletions(-) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index a3c873b389..9412475640 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -46,8 +46,6 @@ INCLUDE(GoogleMock) SET(alltest_LIBRARIES llcommon ll::googlemock - ${PTHREAD_LIBRARY} - ${WINDOWS_LIBRARIES} ) IF(NOT "${project}" STREQUAL "llmath") # add llmath as a dep unless the tested module *is* llmath! diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index 4a57a6a3ef..ccbb27ca42 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -55,32 +55,50 @@ endif (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release") link_directories(${AUTOBUILD_LIBS_INSTALL_DIRS}) +create_target(ll::oslibraries) + if (LINUX) - set(DL_LIBRARY dl) - set(PTHREAD_LIBRARY pthread) -else (LINUX) - set(DL_LIBRARY "") - set(PTHREAD_LIBRARY "") -endif (LINUX) + set_target_libraries( ll::oslibraries + dl + pthread + rt) +elseif (WINDOWS) + set_target_libraries( ll::oslibraries + advapi32 + shell32 + ws2_32 + mswsock + psapi + winmm + netapi32 + wldap32 + gdi32 + user32 + ole32 + dbghelp + legacy_stdio_definitions + ) +else() + include(CMakeFindFrameworks) + find_library(COREFOUNDATION_LIBRARY CoreFoundation) + find_library(CARBON_LIBRARY Carbon) + find_library(COCOA_LIBRARY Cocoa) + find_library(IOKIT_LIBRARY IOKit) + + find_library(AGL_LIBRARY AGL) + find_library(APPKIT_LIBRARY AppKit) + find_library(COREAUDIO_LIBRARY CoreAudio) + + set_target_libraries( ll::oslibraries + ${COCOA_LIBRARY} + ${IOKIT_LIBRARY} + ${COREFOUNDATION_LIBRARY} + ${CARBON_LIBRARY} + ${AGL_LIBRARY} + ${APPKITT_LIBRARY} + ${COREAUDIO_LIBRARY} + ) +endif() + -if (WINDOWS) - set(WINDOWS_LIBRARIES - advapi32 - shell32 - ws2_32 - mswsock - psapi - winmm - netapi32 - wldap32 - gdi32 - user32 - ole32 - dbghelp - ) -else (WINDOWS) - set(WINDOWS_LIBRARIES "") -endif (WINDOWS) - -mark_as_advanced(DL_LIBRARY PTHREAD_LIBRARY WINDOWS_LIBRARIES) diff --git a/indra/integration_tests/llimage_libtest/CMakeLists.txt b/indra/integration_tests/llimage_libtest/CMakeLists.txt index 9ac3498d09..00da3e7efc 100644 --- a/indra/integration_tests/llimage_libtest/CMakeLists.txt +++ b/indra/integration_tests/llimage_libtest/CMakeLists.txt @@ -48,19 +48,6 @@ set_target_properties(llimage_libtest FALSE ) -# OS-specific libraries -if (DARWIN) - include(CMakeFindFrameworks) - find_library(COREFOUNDATION_LIBRARY CoreFoundation) - set(OS_LIBRARIES ${COREFOUNDATION_LIBRARY}) -elseif (WINDOWS) - set(OS_LIBRARIES) -elseif (LINUX) - set(OS_LIBRARIES) -else (DARWIN) - message(FATAL_ERROR "Unknown platform") -endif (DARWIN) - # Libraries on which this application depends on # Sort by high-level to low-level target_link_libraries(llimage_libtest @@ -71,7 +58,6 @@ target_link_libraries(llimage_libtest llimage llkdu llimagej2coj - ${OS_LIBRARIES} ) if (DARWIN) diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt index baa814fb8b..ef6107fe66 100644 --- a/indra/integration_tests/llui_libtest/CMakeLists.txt +++ b/indra/integration_tests/llui_libtest/CMakeLists.txt @@ -57,21 +57,6 @@ list(APPEND llui_libtest_SOURCE_FILES ${llui_libtest_HEADER_FILES}) add_executable(llui_libtest ${llui_libtest_SOURCE_FILES}) -# Link with OS-specific libraries for LLWindow dependency -if (DARWIN) - find_library(COCOA_LIBRARY Cocoa) - find_library(IOKIT_LIBRARY IOKit) - set(OS_LIBRARIES ${COCOA_LIBRARY} ${IOKIT_LIBRARY}) -elseif (WINDOWS) - #ll_stack_trace needs this now... - list(APPEND WINDOWS_LIBRARIES dbghelp) - set(OS_LIBRARIES ${WINDOWS_LIBRARIES}) -elseif (LINUX) - set(OS_LIBRARIES) -else (DARWIN) - message(FATAL_ERROR "unknown platform") -endif (DARWIN) - # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level target_link_libraries(llui_libtest @@ -83,7 +68,6 @@ target_link_libraries(llui_libtest llimage llkdu llimagej2coj - ${OS_LIBRARIES} ) if (WINDOWS) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index c934d47cc9..4673630a8e 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -278,21 +278,15 @@ target_link_libraries( ll::expat ll::jsoncpp ll::zlib-ng - ${WINDOWS_LIBRARIES} ll::boost ${GOOGLE_PERFTOOLS_LIBRARIES} ll::uriparser + ll::oslibraries ) set_target_include_dirs( llcommon ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories( llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ) -if (DARWIN) - include(CMakeFindFrameworks) - find_library(CARBON_LIBRARY Carbon) - target_link_libraries(llcommon ${CARBON_LIBRARY}) -endif (DARWIN) - add_dependencies(llcommon stage_third_party_libs) if (LL_TESTS) @@ -303,10 +297,7 @@ if (LL_TESTS) LL_ADD_PROJECT_UNIT_TESTS(llcommon "${llcommon_TEST_SOURCE_FILES}") #set(TEST_DEBUG on) - set(test_libs llcommon - ${WINDOWS_LIBRARIES} - ll::googlemock - ) + set(test_libs llcommon) LL_ADD_INTEGRATION_TEST(bitpack "" "${test_libs}") LL_ADD_INTEGRATION_TEST(classic_callback "" "${test_libs}") LL_ADD_INTEGRATION_TEST(commonmisc "" "${test_libs}") diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index 041c90b174..0d45814d86 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -122,7 +122,6 @@ if (LL_TESTS AND LLCOREHTTP_TESTS) # set(TEST_DEBUG on) set(test_libs llcorehttp - ${WINDOWS_LIBRARIES} llmessage llcommon ) @@ -188,7 +187,6 @@ endif (DARWIN) set(example_libs ${LEGACY_STDIO_LIBS} llcorehttp - ${WINDOWS_LIBRARIES} llmessage llcommon ) diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index dfc290a48b..7274c3b450 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -65,13 +65,6 @@ target_link_libraries(llfilesystem ) set_target_include_dirs( llfilesystem ${CMAKE_CURRENT_SOURCE_DIR}) -if (DARWIN) - include(CMakeFindFrameworks) - find_library(COCOA_LIBRARY Cocoa) - target_link_libraries(llfilesystem ${COCOA_LIBRARY}) -endif (DARWIN) - - # Add tests if (LL_TESTS) include(LLAddBuildTest) @@ -87,7 +80,7 @@ if (LL_TESTS) LL_ADD_PROJECT_UNIT_TESTS(llfilesystem "${llfilesystem_TEST_SOURCE_FILES}") # INTEGRATION TESTS - set(test_libs llmath llcommon llfilesystem ${WINDOWS_LIBRARIES}) + set(test_libs llmath llcommon llfilesystem ) # TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests. LL_ADD_INTEGRATION_TEST(lldir "" "${test_libs}") diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt index ee14f0a46e..7d193f5512 100644 --- a/indra/llinventory/CMakeLists.txt +++ b/indra/llinventory/CMakeLists.txt @@ -71,7 +71,7 @@ if (LL_TESTS) LL_ADD_PROJECT_UNIT_TESTS(llinventory "${llinventory_TEST_SOURCE_FILES}") #set(TEST_DEBUG on) - set(test_libs llinventory llmath llcorehttp llfilesystem ${WINDOWS_LIBRARIES}) + set(test_libs llinventory llmath llcorehttp llfilesystem ) LL_ADD_INTEGRATION_TEST(inventorymisc "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llparcel "" "${test_libs}") endif (LL_TESTS) diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index 5f48ea60dc..20435d991a 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -220,27 +220,14 @@ if (LL_TESTS) LL_ADD_PROJECT_UNIT_TESTS(llmessage "${llmessage_TEST_SOURCE_FILES}") # set(TEST_DEBUG on) - -if (LINUX) - set(test_libs - ${WINDOWS_LIBRARIES} - llfilesystem - llmath - llcorehttp - llmessage - llcommon - rt - ) -else (LINUX) + set(test_libs - ${WINDOWS_LIBRARIES} llfilesystem llmath llcorehttp llmessage llcommon - ) -endif(LINUX) + ) #LL_ADD_INTEGRATION_TEST(llavatarnamecache "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llhost "" "${test_libs}") diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 7725489c3e..05e311f7e4 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -5,12 +5,6 @@ include(LLCommon) include(Linking) include(PluginAPI) -if (DARWIN) - include(CMakeFindFrameworks) - find_library(COCOA_LIBRARY Cocoa) -endif (DARWIN) - - ### SLPlugin set(SLPlugin_SOURCE_FILES @@ -60,8 +54,6 @@ target_link_libraries(SLPlugin ) if (DARWIN) - # Mac version needs to link against Carbon - target_link_libraries(SLPlugin ${COCOA_LIBRARY}) # Make sure the app bundle has a Resources directory (it will get populated by viewer-manifest.py later) add_custom_command( TARGET SLPlugin POST_BUILD diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 9035095d5f..5e71b673a5 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -272,7 +272,7 @@ target_link_libraries(llui # Add tests if(LL_TESTS) include(LLAddBuildTest) - set(test_libs llmessage llcorehttp llxml llrender llcommon ll::hunspell ${WINDOWS_LIBRARIES}) + set(test_libs llmessage llcorehttp llxml llrender llcommon ll::hunspell) 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 ll::hunspell ${WINDOWS_LIBRARIES}) + set(test_libs llui llmessage llcorehttp llxml llrender llcommon ll::hunspell ) LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}") endif(NOT LINUX) endif(LL_TESTS) diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt index 5953cb79e8..fc680e6da5 100644 --- a/indra/llxml/CMakeLists.txt +++ b/indra/llxml/CMakeLists.txt @@ -55,7 +55,6 @@ if (LL_TESTS) llxml llmath llcommon - ${WINDOWS_LIBRARIES} ) LL_ADD_INTEGRATION_TEST(llcontrol "" "${test_libs}") diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 2be83c9900..e039828221 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1372,19 +1372,6 @@ if (DARWIN) COMPILE_FLAGS "-fmodules -fcxx-modules -Wno-nullability-completeness" ) - find_library(AGL_LIBRARY AGL) - find_library(APPKIT_LIBRARY AppKit) - find_library(COCOA_LIBRARY Cocoa) - find_library(IOKIT_LIBRARY IOKit) - find_library(COREAUDIO_LIBRARY CoreAudio) - - set(viewer_LIBRARIES - ${COCOA_LIBRARY} - ${AGL_LIBRARY} - ${IOKIT_LIBRARY} - ${COREAUDIO_LIBRARY} - ) - if (USE_BUGSPLAT) list(APPEND viewer_LIBRARIES bugsplat::bugsplat @@ -1558,7 +1545,6 @@ if (WINDOWS) # see EXP-1765 - theory is opengl32.lib needs to be included before gdi32.lib (windows libs) set(viewer_LIBRARIES opengl32 - ${WINDOWS_LIBRARIES} comdlg32 dxguid kernel32 @@ -1972,7 +1958,6 @@ target_link_libraries(${VIEWER_BINARY_NAME} ll::ndof ${SMARTHEAP_LIBRARY} ${UI_LIBRARIES} - ${WINDOWS_LIBRARIES} lllogin llprimitive llappearance @@ -2358,7 +2343,6 @@ if (LL_TESTS) set(test_libs - ${WINDOWS_LIBRARIES} llfilesystem llmath llcommon diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 1c2961a18a..822574210f 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -75,8 +75,6 @@ target_link_libraries(lltest llcommon llcorehttp ll::googlemock - ${WINDOWS_LIBRARIES} - ${DL_LIBRARY} ) if (WINDOWS) -- cgit v1.2.3 From b9f94c08977ff76f41a32a2bb9f25883e578eea3 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 15:33:32 +0200 Subject: Now there is a oslibrary target get rid of some more obsolete vars: LEGACY_STDIO_LIBS (was only used for Windows) PTHREAD_LIBRARY (only Linux) LLDATABASE_LIBRARIES (that one was supposed for Linux, but never needed anyway) --- indra/CMakeLists.txt | 4 ---- indra/cmake/LLAddBuildTest.cmake | 2 -- indra/cmake/Linking.cmake | 2 +- indra/integration_tests/llimage_libtest/CMakeLists.txt | 1 - indra/integration_tests/llui_libtest/CMakeLists.txt | 1 - indra/llcorehttp/CMakeLists.txt | 1 - indra/llplugin/slplugin/CMakeLists.txt | 1 - indra/newview/CMakeLists.txt | 1 - indra/test/CMakeLists.txt | 2 -- 9 files changed, 1 insertion(+), 14 deletions(-) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index d06ea58549..c4a1ca918f 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -17,10 +17,6 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") include(Variables) include(BuildVersion) -set(LEGACY_STDIO_LIBS) -if (WINDOWS) - set(LEGACY_STDIO_LIBS legacy_stdio_definitions) -endif (WINDOWS) if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 9412475640..1f63fed613 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -204,10 +204,8 @@ FUNCTION(LL_ADD_INTEGRATION_TEST ) SET(libraries - ${LEGACY_STDIO_LIBS} ${library_dependencies} ll::googlemock - ${PTHREAD_LIBRARY} ) # Add test executable build target diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index ccbb27ca42..4d99026dfc 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -88,7 +88,7 @@ else() find_library(AGL_LIBRARY AGL) find_library(APPKIT_LIBRARY AppKit) find_library(COREAUDIO_LIBRARY CoreAudio) - + set_target_libraries( ll::oslibraries ${COCOA_LIBRARY} ${IOKIT_LIBRARY} diff --git a/indra/integration_tests/llimage_libtest/CMakeLists.txt b/indra/integration_tests/llimage_libtest/CMakeLists.txt index 00da3e7efc..a027860c0b 100644 --- a/indra/integration_tests/llimage_libtest/CMakeLists.txt +++ b/indra/integration_tests/llimage_libtest/CMakeLists.txt @@ -51,7 +51,6 @@ set_target_properties(llimage_libtest # Libraries on which this application depends on # Sort by high-level to low-level target_link_libraries(llimage_libtest - ${LEGACY_STDIO_LIBS} llcommon llfilesystem llmath diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt index ef6107fe66..51fe35df43 100644 --- a/indra/integration_tests/llui_libtest/CMakeLists.txt +++ b/indra/integration_tests/llui_libtest/CMakeLists.txt @@ -60,7 +60,6 @@ add_executable(llui_libtest ${llui_libtest_SOURCE_FILES}) # 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 diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index 0d45814d86..e2bd9ae5b8 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -185,7 +185,6 @@ endif (DARWIN) ) set(example_libs - ${LEGACY_STDIO_LIBS} llcorehttp llmessage llcommon diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 05e311f7e4..9daf7d327c 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -46,7 +46,6 @@ set_target_properties(SLPlugin endif () target_link_libraries(SLPlugin - ${LEGACY_STDIO_LIBS} llplugin llmessage llcommon diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e039828221..9af6ddcca6 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1937,7 +1937,6 @@ endif (WINDOWS) # modern version. target_link_libraries(${VIEWER_BINARY_NAME} - ${LEGACY_STDIO_LIBS} llaudio llcharacter llimage diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 822574210f..23f80d1ef9 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -65,8 +65,6 @@ if (USE_BUGSPLAT) endif (USE_BUGSPLAT) target_link_libraries(lltest - ${LEGACY_STDIO_LIBS} - ${LLDATABASE_LIBRARIES} llinventory llmessage llmath -- cgit v1.2.3 From a9774d34279daf98f1f0fad6e22e32c65280d6a0 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 15:35:13 +0200 Subject: Request C++ standard via standard cmake. --- indra/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index c4a1ca918f..138a4504e4 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -13,6 +13,7 @@ set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING project(${ROOT_PROJECT_NAME}) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") +set(CXX_STANDARD 14) include(Variables) include(BuildVersion) -- cgit v1.2.3 From e45a6a0f689d12659ccb1d323e0fa6d791c2a74e Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 15:35:41 +0200 Subject: Remove obsolete message --- indra/cmake/NDOF.cmake | 3 --- 1 file changed, 3 deletions(-) diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake index 75936425ff..fd7a650612 100644 --- a/indra/cmake/NDOF.cmake +++ b/indra/cmake/NDOF.cmake @@ -21,7 +21,4 @@ if (NDOF) target_compile_definitions( ll::ndof INTERFACE LIB_NDOF=1) endif (NDOF) -if (NOT NDOF_FOUND) - message(STATUS "Building without N-DoF joystick support") -endif () -- cgit v1.2.3 From c0c5ac0e3984ffe1911455cd22554fdd0cb05f68 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 17:12:24 +0200 Subject: Only try copy voice files from slvoice_src_dir if that variable is set (seems to be the case for Windows) --- indra/cmake/Copy3rdPartyLibs.cmake | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index d5b8e6c712..7d187b5eef 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -260,13 +260,16 @@ endif(WINDOWS) # Curiously, slvoice_files are only copied to SHARED_LIB_STAGING_DIR_RELEASE. # It's unclear whether this is oversight or intentional, but anyway leave the # single copy_if_different command rather than using to_staging_dirs. -copy_if_different( - ${slvoice_src_dir} - "${SHARED_LIB_STAGING_DIR_RELEASE}" - out_targets - ${slvoice_files} + +if( slvoice_src_dir ) + copy_if_different( + ${slvoice_src_dir} + "${SHARED_LIB_STAGING_DIR_RELEASE}" + out_targets + ${slvoice_files} ) -list(APPEND third_party_targets ${out_targets}) + list(APPEND third_party_targets ${out_targets}) +endif() to_staging_dirs( ${vivox_lib_dir} -- cgit v1.2.3 From 4c1ce6bd72803536445525130d4dd627910961a3 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 17:13:28 +0200 Subject: Fix a typo. --- indra/cmake/Linking.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index 4d99026dfc..253c24f927 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -95,7 +95,7 @@ else() ${COREFOUNDATION_LIBRARY} ${CARBON_LIBRARY} ${AGL_LIBRARY} - ${APPKITT_LIBRARY} + ${APPKIT_LIBRARY} ${COREAUDIO_LIBRARY} ) endif() -- cgit v1.2.3 From 7d6bb21c9cfc6d46cae4f8c4fcffabd23325629e Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 17:13:52 +0200 Subject: Remove unset GOOGLEMOCK_INCLUDE_DIRS variable. --- indra/cmake/LLAddBuildTest.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 1f63fed613..9bdcb7d6a2 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -41,7 +41,6 @@ INCLUDE(GoogleMock) SET(alltest_INCLUDE_DIRS ${LIBS_OPEN_DIR}/test - ${GOOGLEMOCK_INCLUDE_DIRS} ) SET(alltest_LIBRARIES llcommon -- cgit v1.2.3 From 3eec716b240167cda6a5c652584152af8756b56d Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 17:17:32 +0200 Subject: Do not use ${ARCH}_linux_INCLUDES atm --- indra/cmake/00-Common.cmake | 8 -------- indra/cmake/UI.cmake | 25 +++++++++++++++++++++---- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index ec0e195b56..5320fc193c 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -190,11 +190,3 @@ if (LINUX OR DARWIN) endif (LINUX OR DARWIN) -set(${ARCH}_linux_INCLUDES - atk-1.0 - glib-2.0 - gstreamer-0.10 - gtk-2.0 - pango-1.0 - ) - diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index c12dca2ab9..ee95547136 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -28,10 +28,27 @@ endif (LINUX) include_directories ( ${LIBS_PREBUILT_DIR}/include ${LIBS_PREBUILT_DIR}/include -) -foreach(include ${${LL_ARCH}_INCLUDES}) - include_directories(${LIBS_PREBUILT_DIR}/include/${include}) -endforeach(include) + ) + + +# The following made no real sense +# - ${ARCH}_linux_INCLUDES was set in 00-Common.cmake, +# - Here ist is used, but as ${${LL_ARCH}_INCLUDES} +# It would make more sense to use one form ($LL_ARCH) +# Leave this out for the moment, but come back when looking at the Linux build + +#set(${ARCH}_linux_INCLUDES +# atk-1.0 +# glib-2.0 +# gstreamer-0.10 +# gtk-2.0 +# pango-1.0 +# ) +#foreach(include ${${LL_ARCH}_INCLUDES}) +# set_target_include_dirs( ll::uilibraries +# ${LIBS_PREBUILT_DIR}/include/${include} +# ) +#endforeach(include) if (LINUX) add_definitions(-DLL_GTK=1 -DLL_X11=1) -- cgit v1.2.3 From 5803625db552900fd54c248c1f41e2f04bf66d62 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 17:18:38 +0200 Subject: Remove undefined variable GOOGLE_PERFTOOLS_LIBRARIES --- indra/llcommon/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 4673630a8e..11849c3766 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -279,7 +279,6 @@ target_link_libraries( ll::jsoncpp ll::zlib-ng ll::boost - ${GOOGLE_PERFTOOLS_LIBRARIES} ll::uriparser ll::oslibraries ) -- cgit v1.2.3 From f673b958fe36b19e999ab881255006d1d1d94bc0 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 17:20:16 +0200 Subject: Go back to more modern way to compile the physics stub --- indra/newview/CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 9af6ddcca6..500794bab1 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -57,14 +57,12 @@ if (NOT HAVOK_TPV) # which includes a CMakeList.txt and then this whole source tree gets pushed into out build ... :/ # To make matters worse there is a internal assumption about the structure of the viewers CMake layout, # which means we need to duct tape this togther ... - get_property( LLCOMMON_INCLUDE_DIRS TARGET llcommon PROPERTY INTERFACE_INCLUDE_DIRECTORIES ) - get_property( LLMATH_INCLUDE_DIRS TARGET llmath PROPERTY INTERFACE_INCLUDE_DIRECTORIES ) add_subdirectory(${LLPHYSICSEXTENSIONS_SRC_DIR} llphysicsextensions) # Another hack that works with newer cmake versions: - #cmake_policy( SET CMP0079 NEW) - #target_link_libraries(llphysicsextensionsstub llcommon llmath) + cmake_policy( SET CMP0079 NEW) + target_link_libraries(llphysicsextensionsstub llcommon llmath) endif (NOT HAVOK_TPV) -- cgit v1.2.3 From 924fa0fa78b41c7e8486c1ed29764afb1e32fd7e Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 17:28:26 +0200 Subject: create target ll::uilibraries to have one common target that defines what each operation system needs as dependencies on OS gui libraries. --- indra/cmake/UI.cmake | 27 ++++++++++++++++++++----- indra/linux_crash_logger/CMakeLists.txt | 4 +--- indra/llmath/CMakeLists.txt | 2 +- indra/llwindow/CMakeLists.txt | 6 +++--- indra/newview/CMakeLists.txt | 36 ++++++++------------------------- 5 files changed, 35 insertions(+), 40 deletions(-) diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index ee95547136..03eb1b3fc4 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -6,8 +6,10 @@ if (LINUX) use_prebuilt_binary(gtk-atk-pango-glib) endif (LINUX) +create_target( ll::uilibraries ) + if (LINUX) - set(UI_LIBRARIES + set_target_libraries( ll::uilibraries atk-1.0 gdk-x11-2.0 gdk_pixbuf-2.0 @@ -21,12 +23,27 @@ if (LINUX) pangoft2-1.0 pangox-1.0 pangoxft-1.0 - ${FREETYPE_LIBRARIES} + Xinerama + ll::freetype ) endif (LINUX) +if( WINDOWS ) + set_target_libraries( ll::uilibraries + opengl32 + comdlg32 + dxguid + kernel32 + odbc32 + odbccp32 + oleaut32 + shell32 + Vfw32 + wer + winspool + ) +endif() -include_directories ( - ${LIBS_PREBUILT_DIR}/include +set_target_include_dirs( ll::uilibraries ${LIBS_PREBUILT_DIR}/include ) @@ -51,5 +68,5 @@ include_directories ( #endforeach(include) if (LINUX) - add_definitions(-DLL_GTK=1 -DLL_X11=1) + set_target_properties(ll::uilibraries PROPERTIES COMPILE_DEFINITIONS LL_GTK=1 LL_X11=1 ) endif (LINUX) diff --git a/indra/linux_crash_logger/CMakeLists.txt b/indra/linux_crash_logger/CMakeLists.txt index daa78f77ff..594cb34ce4 100644 --- a/indra/linux_crash_logger/CMakeLists.txt +++ b/indra/linux_crash_logger/CMakeLists.txt @@ -68,9 +68,7 @@ target_link_libraries(linux-crash-logger llmath llcorehttp llcommon - ${UI_LIBRARIES} - ll::freetype - ${LIBRT_LIBRARY} + ll::uilibraries ) add_custom_target(linux-crash-logger-target ALL diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index fd7b831719..4c4e59811d 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -122,7 +122,7 @@ if (LL_TESTS) LL_ADD_PROJECT_UNIT_TESTS(llmath "${llmath_TEST_SOURCE_FILES}") # INTEGRATION TESTS - set(test_libs llmath llcommon ${WINDOWS_LIBRARIES}) + set(test_libs llmath llcommon) # TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests. LL_ADD_INTEGRATION_TEST(alignment "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llbbox llbbox.cpp "${test_libs}") diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index c997bbdf59..4c2f8149b4 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -59,9 +59,9 @@ set(llwindow_LINK_LIBRARIES # Sort by high-level to low-level if (LINUX) set(llwindow_LINK_LIBRARIES APPEND - ${UI_LIBRARIES} # for GTK - ${SDL_LIBRARY} - fontconfig # For FCInit and other FC* functions. + ll::uilibraries + ll::sdl + ll::fontconfig # For FCInit and other FC* functions. ) list(APPEND viewer_SOURCE_FILES diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 500794bab1..3ec0c2179c 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1409,12 +1409,6 @@ if (LINUX) LIST(APPEND viewer_SOURCE_FILES llappviewerlinux_api_dbus.cpp) SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed") - set(viewer_LIBRARIES - Xinerama - ) - if (OPENAL) - LIST(APPEND viewer_LIBRARIES ${OPENAL_LIBRARIES}) - endif (OPENAL) endif (LINUX) if (WINDOWS) @@ -1540,21 +1534,6 @@ if (WINDOWS) list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES}) -# see EXP-1765 - theory is opengl32.lib needs to be included before gdi32.lib (windows libs) - set(viewer_LIBRARIES - opengl32 - comdlg32 - dxguid - kernel32 - odbc32 - odbccp32 - oleaut32 - shell32 - Vfw32 - wer - winspool - ) - find_library(INTEL_MEMOPS_LIBRARY NAMES ll_intel_memops PATHS @@ -1563,8 +1542,10 @@ if (WINDOWS) ) mark_as_advanced(INTEL_MEMOPS_LIBRARY) + if (INTEL_MEMOPS_LIBRARY) - list(APPEND viewer_LIBRARIES ${INTEL_MEMOPS_LIBRARY}) + create_target( ll::intel_memops ) + set_target_libraries( ll::intel_memops ${INTEL_MEMOPS_LIBRARY} ) endif (INTEL_MEMOPS_LIBRARY) if (ADDRESS_SIZE EQUAL 64) @@ -1576,9 +1557,6 @@ if (WINDOWS) LIST(APPEND viewer_SOURCE_FILES windows.manifest) endif (ADDRESS_SIZE EQUAL 64) - if (OPENAL) - LIST(APPEND viewer_LIBRARIES ${OPENAL_LIBRARIES}) - endif (OPENAL) endif (WINDOWS) # Add the xui files. This is handy for searching for xui elements @@ -1950,11 +1928,9 @@ target_link_libraries(${VIEWER_BINARY_NAME} llmath llcorehttp llcommon - ${viewer_LIBRARIES} ll::glod ll::ndof - ${SMARTHEAP_LIBRARY} - ${UI_LIBRARIES} + ll::uilibraries lllogin llprimitive llappearance @@ -1963,6 +1939,10 @@ target_link_libraries(${VIEWER_BINARY_NAME} ll::bugsplat ) +if( TARGET ll::intel_memops ) + target_link_libraries(${VIEWER_BINARY_NAME} ll::intel_memops ) +endif() + if( TARGET ll::nvapi ) target_link_libraries(${VIEWER_BINARY_NAME} ll::nvapi ) endif() -- cgit v1.2.3 From bb35d5a59965235fa212299f11138da7b253760e Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 17:30:09 +0200 Subject: Remove some more obsolete includes (UnixInstall) and include_directories() --- indra/llfilesystem/CMakeLists.txt | 10 ---------- indra/llmessage/CMakeLists.txt | 6 ------ indra/newview/CMakeLists.txt | 7 ------- 3 files changed, 23 deletions(-) diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index 7274c3b450..882f5b8fba 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -4,12 +4,6 @@ project(llfilesystem) include(00-Common) include(LLCommon) -include(UnixInstall) - -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ) set(llfilesystem_SOURCE_FILES lldir.cpp @@ -73,10 +67,6 @@ if (LL_TESTS) lldiriterator.cpp ) - set_source_files_properties(lldiriterator.cpp - PROPERTIES - LL_TEST_ADDITIONAL_LIBRARIES "${cache_BOOST_LIBRARIES}" - ) LL_ADD_PROJECT_UNIT_TESTS(llfilesystem "${llfilesystem_TEST_SOURCE_FILES}") # INTEGRATION TESTS diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index 20435d991a..623798176b 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -15,12 +15,6 @@ include(JsonCpp) include_directories (${CMAKE_CURRENT_SOURCE_DIR}) -include_directories( - ${LLCOREHTTP_INCLUDE_DIRS} - ${LLMESSAGE_INCLUDE_DIRS} - ${LLFILESYSTEM_INCLUDE_DIRS} - ) - set(llmessage_SOURCE_FILES llassetstorage.cpp llavatarname.cpp diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 3ec0c2179c..3d1d9e0266 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -40,7 +40,6 @@ include(PNG) include(TemplateCheck) include(ThreeJS) include(UI) -include(UnixInstall) include(ViewerMiscLibs) include(ViewerManager) include(VisualLeakDetector) @@ -1370,12 +1369,6 @@ if (DARWIN) COMPILE_FLAGS "-fmodules -fcxx-modules -Wno-nullability-completeness" ) - if (USE_BUGSPLAT) - list(APPEND viewer_LIBRARIES - bugsplat::bugsplat - ) - endif (USE_BUGSPLAT) - # Add resource files to the project. set(viewer_RESOURCE_FILES secondlife.icns -- cgit v1.2.3 From cf08197ad39679de253e33e5775c45af3fac0cba Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 17:30:54 +0200 Subject: Use variable LLSTARTUP_COMPILE_FLAGS only when it is defined. --- indra/newview/CMakeLists.txt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 3d1d9e0266..4a143bb4d8 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1639,22 +1639,24 @@ if (WINDOWS) list(APPEND viewer_SOURCE_FILES ${viewer_INSTALLER_FILES}) endif (WINDOWS) -if (OPENAL) +if (TARGET ll::openal ) set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_OPENAL") -endif (OPENAL) +endif () -if (FMODSTUDIO) +if (TARGET ll::fmodstudio) set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMODSTUDIO") -endif (FMODSTUDIO) - -set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") +endif () if (HAVOK OR HAVOK_TPV) set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_HAVOK") endif (HAVOK OR HAVOK_TPV) -# progress view disables/enables icons based on available packages -set_source_files_properties(llprogressview.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") +if( DEFINED LLSTARTUP_COMPILE_FLAGS ) + # progress view disables/enables icons based on available packages + set_source_files_properties(llprogressview.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") + + set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") +endif() if (GLODLIB) set_source_files_properties(llfloatermodelpreview.cpp PROPERTIES COMPILE_FLAGS "-DLL_GLOD") -- cgit v1.2.3 From cc48def709c2a6eca90c690bd63491011ad68d36 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 18:03:04 +0200 Subject: Initialize variables so that calling cmake with "--warn-unused-vars --warn-uninitialized" does not make it go all crazy. --- indra/cmake/FMODSTUDIO.cmake | 2 ++ indra/cmake/Prebuilt.cmake | 44 +++++++++++++++++++++----------------------- indra/cmake/bugsplat.cmake | 2 ++ 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index 653d96f86a..334d46caf9 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -34,5 +34,7 @@ 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) diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 9e8adf5af1..603368304c 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -23,40 +23,38 @@ endif ("${CMAKE_SOURCE_DIR}/../autobuild.xml" IS_NEWER_THAN "${PREBUILD_TRACKING # of previous attempts is serialized in the file # ${PREBUILD_TRACKING_DIR}/${_binary}_installed) macro (use_prebuilt_binary _binary) - if (NOT DEFINED USESYSTEMLIBS_${_binary}) - set(USESYSTEMLIBS_${_binary} ${USESYSTEMLIBS}) - endif (NOT DEFINED USESYSTEMLIBS_${_binary}) + if( NOT DEFINED ${_binary}_installed ) + set( ${_binary}_installed "") + endif() - if (NOT USESYSTEMLIBS_${_binary}) if("${${_binary}_installed}" STREQUAL "" AND EXISTS "${PREBUILD_TRACKING_DIR}/${_binary}_installed") - file(READ ${PREBUILD_TRACKING_DIR}/${_binary}_installed "${_binary}_installed") - if(DEBUG_PREBUILT) - message(STATUS "${_binary}_installed: \"${${_binary}_installed}\"") - endif(DEBUG_PREBUILT) + file(READ ${PREBUILD_TRACKING_DIR}/${_binary}_installed "${_binary}_installed") + if(DEBUG_PREBUILT) + message(STATUS "${_binary}_installed: \"${${_binary}_installed}\"") + endif(DEBUG_PREBUILT) endif("${${_binary}_installed}" STREQUAL "" AND EXISTS "${PREBUILD_TRACKING_DIR}/${_binary}_installed") if(${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/${_binary}_installed OR NOT ${${_binary}_installed} EQUAL 0) - if(DEBUG_PREBUILT) - message(STATUS "cd ${CMAKE_SOURCE_DIR} && ${AUTOBUILD_EXECUTABLE} install + if(DEBUG_PREBUILT) + message(STATUS "cd ${CMAKE_SOURCE_DIR} && ${AUTOBUILD_EXECUTABLE} install --install-dir=${AUTOBUILD_INSTALL_DIR} ${_binary} ") - endif(DEBUG_PREBUILT) - execute_process(COMMAND "${AUTOBUILD_EXECUTABLE}" - install - --install-dir=${AUTOBUILD_INSTALL_DIR} - ${_binary} - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" - RESULT_VARIABLE ${_binary}_installed - ) - file(WRITE ${PREBUILD_TRACKING_DIR}/${_binary}_installed "${${_binary}_installed}") + endif(DEBUG_PREBUILT) + execute_process(COMMAND "${AUTOBUILD_EXECUTABLE}" + install + --install-dir=${AUTOBUILD_INSTALL_DIR} + ${_binary} + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + RESULT_VARIABLE ${_binary}_installed + ) + file(WRITE ${PREBUILD_TRACKING_DIR}/${_binary}_installed "${${_binary}_installed}") endif(${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/${_binary}_installed OR NOT ${${_binary}_installed} EQUAL 0) if(NOT ${_binary}_installed EQUAL 0) - message(FATAL_ERROR - "Failed to download or unpack prebuilt '${_binary}'." - " Process returned ${${_binary}_installed}.") + message(FATAL_ERROR + "Failed to download or unpack prebuilt '${_binary}'." + " Process returned ${${_binary}_installed}.") endif (NOT ${_binary}_installed EQUAL 0) - endif (NOT USESYSTEMLIBS_${_binary}) endmacro (use_prebuilt_binary _binary) function( create_target name ) diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake index ce5660aa05..af2d7bd9f2 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -33,5 +33,7 @@ if (USE_BUGSPLAT) set_target_include_dirs( ll::bugsplat ${LIBS_PREBUILT_DIR}/include/bugsplat) set_property( TARGET ll::bugsplat APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS LL_BUGSPLAT) +else() + set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name") endif (USE_BUGSPLAT) -- cgit v1.2.3 From 1434b4ff96963854c96a7dc5f9d8475a97cc1184 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 19:35:27 +0200 Subject: Remove unused variable. --- indra/cmake/00-Common.cmake | 5 ----- 1 file changed, 5 deletions(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 5320fc193c..25ab731842 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -171,12 +171,7 @@ if (DARWIN) ##set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.") endif (DARWIN) - if (LINUX OR DARWIN) - if (CMAKE_CXX_COMPILER MATCHES ".*clang") - set(CMAKE_COMPILER_IS_CLANGXX 1) - endif (CMAKE_CXX_COMPILER MATCHES ".*clang") - set(GCC_WARNINGS -Wall -Wno-sign-compare -Wno-trigraphs) if (NOT GCC_DISABLE_FATAL_WARNINGS) -- cgit v1.2.3 From ddc2c0265dface6cc17eae1c81c9ba246dc57078 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 19:36:15 +0200 Subject: slvoice_src_dir seems generally not used/ever valid. Not 100% sure what's with that, maybe it gets set by LLs teamcity builds? --- indra/cmake/Copy3rdPartyLibs.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 7d187b5eef..79b8c5775a 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -33,7 +33,13 @@ if(WINDOWS) #******************************* # VIVOX - *NOTE: no debug version set(vivox_lib_dir "${ARCH_PREBUILT_DIRS_RELEASE}") - set(slvoice_src_dir "${ARCH_PREBUILT_BIN_RELEASE}") + + # ND, it seems there is no such thing defined. At least when building a viewer + # Does this maybe matter on some LL buildserver? Otherwise this and the snippet using slvoice_src_dir + # can all go + if( ARCH_PREBUILT_BIN_RELEASE ) + set(slvoice_src_dir "${ARCH_PREBUILT_BIN_RELEASE}") + endif() set(slvoice_files SLVoice.exe ) if (ADDRESS_SIZE EQUAL 64) list(APPEND vivox_libs -- cgit v1.2.3 From 4d4caaaf1f5d0e486bdaa6fb57c00e04c201c6db Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 19:49:08 +0200 Subject: Removed unused HEADLESS case. --- indra/cmake/LLAppearance.cmake | 5 ----- 1 file changed, 5 deletions(-) diff --git a/indra/cmake/LLAppearance.cmake b/indra/cmake/LLAppearance.cmake index 99399d349a..bf34b13714 100644 --- a/indra/cmake/LLAppearance.cmake +++ b/indra/cmake/LLAppearance.cmake @@ -4,11 +4,6 @@ include(Variables) include(Boost) include(LLCoreHttp) -if (BUILD_HEADLESS) - set(LLAPPEARANCE_HEADLESS_LIBRARIES - llappearanceheadless - ) -endif (BUILD_HEADLESS) -- cgit v1.2.3 From 64fbf878a419346a3191246c97ab61dece7b7787 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 19:49:55 +0200 Subject: Cleanup --- indra/cmake/GLH.cmake | 3 --- 1 file changed, 3 deletions(-) diff --git a/indra/cmake/GLH.cmake b/indra/cmake/GLH.cmake index d7e89afaec..b420ad413f 100644 --- a/indra/cmake/GLH.cmake +++ b/indra/cmake/GLH.cmake @@ -1,7 +1,4 @@ # -*- cmake -*- include(Prebuilt) -set(GLH_FIND_REQUIRED TRUE) -set(GLH_FIND_QUIETLY TRUE) - use_prebuilt_binary(glh_linear) -- cgit v1.2.3 From 5c05466bc4eaf3bd8eaa5153629ea19d17a0b3c2 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 19:50:26 +0200 Subject: Remove unused HEADLESS case --- indra/cmake/OpenGL.cmake | 6 ------ 1 file changed, 6 deletions(-) diff --git a/indra/cmake/OpenGL.cmake b/indra/cmake/OpenGL.cmake index 2259c99293..bf7cd8366a 100644 --- a/indra/cmake/OpenGL.cmake +++ b/indra/cmake/OpenGL.cmake @@ -2,11 +2,5 @@ include(Variables) include(Prebuilt) - -if (BUILD_HEADLESS) - SET(OPENGL_glu_LIBRARY GLU) - SET(OPENGL_HEADLESS_LIBRARIES OSMesa16 dl GLU) -endif (BUILD_HEADLESS) - include(FindOpenGL) -- cgit v1.2.3 From 4934b65298b0f2bcf8898c87ec6f46f8d1412277 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 19:51:02 +0200 Subject: Cleanup --- indra/cmake/GLEXT.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/cmake/GLEXT.cmake b/indra/cmake/GLEXT.cmake index 6562082d7e..f6c39fe137 100644 --- a/indra/cmake/GLEXT.cmake +++ b/indra/cmake/GLEXT.cmake @@ -4,5 +4,5 @@ include(Prebuilt) if (WINDOWS OR LINUX) use_prebuilt_binary(glext) endif (WINDOWS OR LINUX) + use_prebuilt_binary(glh_linear) -set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) -- cgit v1.2.3 From 7bd0b8306b85d6657b79b658dc2e35c11e082142 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 19:51:24 +0200 Subject: Make Pulseaudio.cmake just error out. a) it is broken (there is no 3p for example), the define it sets it used. The vrabiables it did set are unused. There is a case to probe for pulseaudio and this is the Linux volume catcher. But for that it is only necessary to detect the system include to get a few defines and functions --- indra/cmake/PulseAudio.cmake | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/indra/cmake/PulseAudio.cmake b/indra/cmake/PulseAudio.cmake index 1b7adc1a62..303db97db6 100644 --- a/indra/cmake/PulseAudio.cmake +++ b/indra/cmake/PulseAudio.cmake @@ -1,21 +1,4 @@ # -*- cmake -*- include(Prebuilt) -set(PULSEAUDIO OFF CACHE BOOL "Build with PulseAudio support, if available.") - -if (PULSEAUDIO) - use_prebuilt_binary(pulseaudio) - set(PULSEAUDIO_FOUND ON FORCE BOOL) - set(PULSEAUDIO_INCLUDE_DIRS - ${LIBS_PREBUILT_DIR}/include - ) - # We don't need to explicitly link against pulseaudio itself, because - # the viewer probes for the system's copy at runtime. - set(PULSEAUDIO_LIBRARIES - # none needed! - ) -endif (PULSEAUDIO) - -if (PULSEAUDIO_FOUND) - add_definitions(-DLL_PULSEAUDIO_ENABLED=1) -endif (PULSEAUDIO_FOUND) +message( FATAL_ERROR "Pulseaudio cmake file is broken" ) -- cgit v1.2.3 From d006f01c649d557b6e61a5d1d15b24acb839cb8c Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 19:53:25 +0200 Subject: Cleanup, remove unused variable --- indra/cmake/LibVLCPlugin.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake index 1648bfd942..fd2ee13569 100644 --- a/indra/cmake/LibVLCPlugin.cmake +++ b/indra/cmake/LibVLCPlugin.cmake @@ -8,7 +8,6 @@ create_target( ll::libvlc ) use_prebuilt_binary(vlc-bin) set(LIBVLCPLUGIN ON CACHE BOOL "LIBVLCPLUGIN support for the llplugin/llmedia test apps.") -set(VLC_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/vlc) if (WINDOWS) set_target_libraries( ll::libvlc -- cgit v1.2.3 From 9b34575ba829fd082a301f6b210b472cfb948c2a Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 19:53:51 +0200 Subject: Include Linking to pull in the definition of ARCH_PREBUILT_DIRS_RELEASE --- indra/cmake/NGHTTP2.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/cmake/NGHTTP2.cmake b/indra/cmake/NGHTTP2.cmake index e92f0da2ef..3007d6f914 100644 --- a/indra/cmake/NGHTTP2.cmake +++ b/indra/cmake/NGHTTP2.cmake @@ -1,3 +1,4 @@ +include(Linking) include(Prebuilt) include_guard() -- cgit v1.2.3 From 0eb2d8056a9d7c858545987cec74a4d604dcd5b5 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 19:55:58 +0200 Subject: Pull in LL_GLOD=1 via target, not by hand crafted magic. --- indra/cmake/GLOD.cmake | 3 +-- indra/newview/CMakeLists.txt | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake index 2d7f85030f..ab7eb38862 100644 --- a/indra/cmake/GLOD.cmake +++ b/indra/cmake/GLOD.cmake @@ -6,7 +6,6 @@ create_target( ll::glod ) use_prebuilt_binary(glod) -set(GLODLIB ON CACHE BOOL "Using GLOD library") - set_target_include_dirs( ll::glod ${LIBS_PREBUILT_DIR}/include) set_target_libraries( ll::glod GLOD ) +target_compile_definitions( ll::glod INTERFACE LL_GLOD=1) \ No newline at end of file diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 4a143bb4d8..018314bca6 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1658,10 +1658,6 @@ if( DEFINED LLSTARTUP_COMPILE_FLAGS ) set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") endif() -if (GLODLIB) - set_source_files_properties(llfloatermodelpreview.cpp PROPERTIES COMPILE_FLAGS "-DLL_GLOD") -endif (GLODLIB) - list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES}) set_source_files_properties(${viewer_HEADER_FILES} -- cgit v1.2.3 From c7ea88046b8442c2c2bfd34c447adef094a4ee2d Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 19:57:35 +0200 Subject: Remove undefined variables --- indra/newview/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 018314bca6..e2c9592f6b 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1724,7 +1724,6 @@ if (WINDOWS) #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/libsndfile-1.dll #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/vivoxoal.dll ${AUTOBUILD_INSTALL_DIR}/ca-bundle.crt - ${GOOGLE_PERF_TOOLS_SOURCE} ${CMAKE_CURRENT_SOURCE_DIR}/licenses-win32.txt ${CMAKE_CURRENT_SOURCE_DIR}/featuretable.txt ${viewer_APPSETTINGS_FILES} @@ -1925,7 +1924,6 @@ target_link_libraries(${VIEWER_BINARY_NAME} lllogin llprimitive llappearance - ${LLPHYSICS_LIBRARIES} ${LLPHYSICSEXTENSIONS_LIBRARIES} ll::bugsplat ) -- cgit v1.2.3 From 2c3507a9d2a32749df695ee04f7612c3049c86c8 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 19:58:17 +0200 Subject: Cleanup plugin, create proper target for link libraries. Remove unused variables. --- indra/cmake/PluginAPI.cmake | 6 +++--- indra/llplugin/slplugin/CMakeLists.txt | 15 +++++++-------- indra/media_plugins/cef/CMakeLists.txt | 1 - 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/indra/cmake/PluginAPI.cmake b/indra/cmake/PluginAPI.cmake index d1649e8248..8c29f4a3c8 100644 --- a/indra/cmake/PluginAPI.cmake +++ b/indra/cmake/PluginAPI.cmake @@ -1,7 +1,9 @@ # -*- cmake -*- +create_target( ll::pluginlibraries) + if (WINDOWS) - set(PLUGIN_API_WINDOWS_LIBRARIES + set_target_libraries( ll::pluginlibraries wsock32 ws2_32 psapi @@ -9,8 +11,6 @@ if (WINDOWS) advapi32 user32 ) -else (WINDOWS) - set(PLUGIN_API_WINDOWS_LIBRARIES "") endif (WINDOWS) diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 9daf7d327c..1fa4f0346d 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -20,10 +20,9 @@ if (DARWIN) ) endif (DARWIN) -set_source_files_properties(${SLPlugin_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - if (SLPlugin_HEADER_FILES) + set_source_files_properties(${SLPlugin_HEADER_FILES} + PROPERTIES HEADER_FILE_ONLY TRUE) list(APPEND SLPlugin_SOURCE_FILES ${SLPlugin_HEADER_FILES}) endif (SLPlugin_HEADER_FILES) @@ -46,11 +45,11 @@ set_target_properties(SLPlugin endif () target_link_libraries(SLPlugin - llplugin - llmessage - llcommon - ${PLUGIN_API_WINDOWS_LIBRARIES} -) + llplugin + llmessage + llcommon + ll::pluginlibraries + ) if (DARWIN) # Make sure the app bundle has a Resources directory (it will get populated by viewer-manifest.py later) diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 94281465e7..c4cf292dde 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -63,7 +63,6 @@ add_library(media_plugin_cef target_link_libraries(media_plugin_cef media_plugin_base cef::cef - ${media_plugin_cef_LINK_LIBRARIES} ) if (WINDOWS) -- cgit v1.2.3 From 3ac18ad9932b4e2fda8e850bd18a524fb1593520 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 22:08:40 +0200 Subject: Streamline bugsplat target: - Fix usage of bugsplat::bugsplat by using ll::bugsplat - Use bugsplat define by importing target not by using hand crafted magic --- indra/cmake/bugsplat.cmake | 8 +++++--- indra/llcommon/CMakeLists.txt | 6 +----- indra/test/CMakeLists.txt | 4 ---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake index af2d7bd9f2..9057ae2272 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -16,20 +16,22 @@ if (USE_BUGSPLAT) include(Prebuilt) use_prebuilt_binary(bugsplat) if (WINDOWS) - set_target_libraries( bugsplat::bugsplat + set_target_libraries( ll::bugsplat ${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib ) elseif (DARWIN) find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}") - set_target_libraries( bugsplat::bugsplat + set_target_libraries( ll::bugsplat ${BUGSPLAT_LIBRARIES} ) else (WINDOWS) message(FATAL_ERROR "BugSplat is not supported; add -DUSE_BUGSPLAT=OFF") endif (WINDOWS) - set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name") + if( NOT BUGSPLAT_DB ) + message( FATAL_ERROR "You need to set BUGSPLAT_DB when setting USE_BUGSPLAT" ) + endif() set_target_include_dirs( ll::bugsplat ${LIBS_PREBUILT_DIR}/include/bugsplat) set_property( TARGET ll::bugsplat APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS LL_BUGSPLAT) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 11849c3766..d5c57bbeaf 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -247,11 +247,6 @@ set(llcommon_HEADER_FILES set_source_files_properties(${llcommon_HEADER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) -if (USE_BUGSPLAT) - set_source_files_properties(${llcommon_SOURCE_FILES} - PROPERTIES COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}") -endif (USE_BUGSPLAT) - list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES}) if(LLCOMMON_LINK_SHARED) @@ -275,6 +270,7 @@ endif(LLCOMMON_LINK_SHARED) target_link_libraries( llcommon ll::apr + ll::bugsplat ll::expat ll::jsoncpp ll::zlib-ng diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 23f80d1ef9..aae299e6ca 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -60,10 +60,6 @@ list(APPEND test_SOURCE_FILES ${test_HEADER_FILES}) add_executable(lltest ${test_SOURCE_FILES}) -if (USE_BUGSPLAT) - set_target_properties(lltest PROPERTIES COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}") -endif (USE_BUGSPLAT) - target_link_libraries(lltest llinventory llmessage -- cgit v1.2.3 From a950940adb1508908313253a9e5118801b2f6d89 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 22:57:09 +0200 Subject: 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 --- indra/cmake/Copy3rdPartyLibs.cmake | 18 +++++++++-------- indra/cmake/FMODSTUDIO.cmake | 16 +++++++++++---- indra/cmake/OPENAL.cmake | 17 ++++++++-------- indra/llaudio/CMakeLists.txt | 8 ++++---- indra/newview/CMakeLists.txt | 40 +++++++++++++++----------------------- 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}" -- cgit v1.2.3 From 5994ca8531e51534c83f737a0962471e55f14167 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 22:58:06 +0200 Subject: Remove another place where there was some hand crafted logic to deal with bugsplat defines --- indra/cmake/LLAddBuildTest.cmake | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 9bdcb7d6a2..a97d2584ae 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -84,11 +84,6 @@ INCLUDE(GoogleMock) MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_SOURCE_FILES ${${name}_test_SOURCE_FILES}") ENDIF(LL_TEST_VERBOSE) - if (USE_BUGSPLAT) - SET_PROPERTY(SOURCE ${${name}_test_SOURCE_FILES} - APPEND PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}") - endif (USE_BUGSPLAT) - # Headers GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_HEADER_FILES ${source} LL_TEST_ADDITIONAL_HEADER_FILES) SET(${name}_test_HEADER_FILES ${name}.h ${${name}_test_additional_HEADER_FILES}) @@ -218,11 +213,6 @@ FUNCTION(LL_ADD_INTEGRATION_TEST COMPILE_DEFINITIONS "LL_TEST=${testname};LL_TEST_${testname}" ) - if (USE_BUGSPLAT) - SET_PROPERTY(SOURCE ${source_files} - APPEND PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}") - endif (USE_BUGSPLAT) - # The following was copied to llcorehttp/CMakeLists.txt's texture_load target. # Any changes made here should be replicated there. if (WINDOWS) -- cgit v1.2.3 From 34b5c5e89066171a3b98c58edc1185559ebcc75e Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 23:01:00 +0200 Subject: Switch to USE_OPENAL --- autobuild.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 3b9eaa0ff0..c1277bf2d3 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3129,7 +3129,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors ${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN} -DINSTALL_PROPRIETARY=FALSE -DUSE_KDU=FALSE - -DOPENAL:BOOL=ON + -DUSE_OPENAL:BOOL=ON name @@ -3200,7 +3200,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors -DUNATTENDED:BOOL=ON -DINSTALL_PROPRIETARY=FALSE -DUSE_KDU=FALSE - -DOPENAL:BOOL=ON + -DUSE_OPENAL:BOOL=ON name -- cgit v1.2.3 From 6d0bba9c03da0d8aca5e88fcb9289cb2f89f3467 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 17 Apr 2022 17:32:14 +0200 Subject: Switch over to standard target_link_libraries (cmake requirements are high enough now). --- indra/cmake/APR.cmake | 6 +++--- indra/cmake/Audio.cmake | 4 ++-- indra/cmake/Boost.cmake | 6 +++--- indra/cmake/CEFPlugin.cmake | 4 ++-- indra/cmake/CURL.cmake | 4 ++-- indra/cmake/EXPAT.cmake | 4 ++-- indra/cmake/FMODSTUDIO.cmake | 8 ++++---- indra/cmake/FreeType.cmake | 2 +- indra/cmake/GLOD.cmake | 2 +- indra/cmake/GoogleMock.cmake | 7 +++---- indra/cmake/Hunspell.cmake | 6 +++--- indra/cmake/JPEG.cmake | 6 +++--- indra/cmake/JsonCpp.cmake | 6 +++--- indra/cmake/LLKDU.cmake | 4 ++-- indra/cmake/LLPhysicsExtensions.cmake | 6 +++--- indra/cmake/LLPrimitive.cmake | 16 ++++++++-------- indra/cmake/LLWindow.cmake | 2 +- indra/cmake/LibVLCPlugin.cmake | 6 +++--- indra/cmake/Linking.cmake | 6 +++--- indra/cmake/NDOF.cmake | 4 ++-- indra/cmake/NGHTTP2.cmake | 6 +++--- indra/cmake/NVAPI.cmake | 2 +- indra/cmake/OPENAL.cmake | 4 ++-- indra/cmake/OpenJPEG.cmake | 2 +- indra/cmake/OpenSSL.cmake | 6 +++--- indra/cmake/PNG.cmake | 4 ++-- indra/cmake/PluginAPI.cmake | 2 +- indra/cmake/Prebuilt.cmake | 4 +--- indra/cmake/UI.cmake | 4 ++-- indra/cmake/URIPARSER.cmake | 6 +++--- indra/cmake/XmlRpcEpi.cmake | 2 +- indra/cmake/ZLIBNG.cmake | 4 ++-- indra/cmake/bugsplat.cmake | 4 ++-- indra/newview/CMakeLists.txt | 2 +- 34 files changed, 79 insertions(+), 82 deletions(-) diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index 269b0f3000..a389c09a37 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -12,7 +12,7 @@ if (WINDOWS) else (LLCOMMON_LINK_SHARED) set(APR_selector "") endif (LLCOMMON_LINK_SHARED) - set_target_libraries( ll::apr + target_link_libraries( ll::apr INTERFACE ${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 @@ -26,13 +26,13 @@ elseif (DARWIN) set(APRUTIL_selector "a") endif (LLCOMMON_LINK_SHARED) - set_target_libraries( ll::apr + target_link_libraries( ll::apr INTERFACE libapr-1.${APR_selector} libaprutil-1.${APRUTIL_selector} iconv ) else (WINDOWS) - set_target_libraries( ll::apr + target_link_libraries( ll::apr INTERFACE apr-1 aprutil-1 iconv diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake index e533d1ac00..0441f370db 100644 --- a/indra/cmake/Audio.cmake +++ b/indra/cmake/Audio.cmake @@ -8,8 +8,8 @@ use_prebuilt_binary(ogg_vorbis) set_target_include_dirs( ll::vorbis ${LIBS_PREBUILT_DIR}/include ) if (WINDOWS) - set_target_libraries(ll::vorbis ogg_static vorbis_static vorbisenc_static vorbisfile_static ) + target_link_libraries(ll::vorbis INTERFACE ogg_static vorbis_static vorbisenc_static vorbisfile_static ) else (WINDOWS) - set_target_libraries(ll::vorbis ogg vorbis vorbisenc vorbisfile ) + target_link_libraries(ll::vorbis INTERFACE ogg vorbis vorbisenc vorbisfile ) endif (WINDOWS) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index ac6151ffe3..e713d50fc1 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -11,7 +11,7 @@ use_prebuilt_binary(boost) set(addrsfx "-x${ADDRESS_SIZE}") if (WINDOWS) - set_target_libraries( ll::boost + target_link_libraries( ll::boost INTERFACE libboost_context-mt${addrsfx} libboost_fiber-mt${addrsfx} libboost_filesystem-mt${addrsfx} @@ -20,7 +20,7 @@ if (WINDOWS) libboost_system-mt${addrsfx} libboost_thread-mt${addrsfx}) elseif (LINUX) - set_target_libraries( ll::boost + target_link_libraries( ll::boost INTERFACE boost_context-mt${addrsfx} boost_fiber-mt${addrsfx} boost_filesystem-mt${addrsfx} @@ -30,7 +30,7 @@ elseif (LINUX) boost_system-mt${addrsfx} boost_thread-mt${addrsfx}) elseif (DARWIN) - set_target_libraries( ll::boost + target_link_libraries( ll::boost INTERFACE 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 6dba5e26ac..41d1b521f7 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -9,7 +9,7 @@ use_prebuilt_binary(dullahan) set_target_include_dirs( cef::cef ${LIBS_PREBUILT_DIR}/include/cef) if (WINDOWS) - set_target_libraries( cef::cef + target_link_libraries( cef::cef INTERFACE libcef.lib libcef_dll_wrapper.lib dullahan.lib @@ -25,7 +25,7 @@ elseif (DARWIN) message(FATAL_ERROR "CEF not found") endif() - set_target_libraries( cef::cef + target_link_libraries( cef::cef INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libcef_dll_wrapper.a ${ARCH_PREBUILT_DIRS_RELEASE}/libdullahan.a ${APPKIT_LIBRARY} diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index 2a5ea67ff3..ee00113f75 100644 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -6,8 +6,8 @@ create_target(ll::libcurl) use_prebuilt_binary(curl) if (WINDOWS) - set_target_libraries(ll::libcurl libcurl.lib) + target_link_libraries(ll::libcurl INTERFACE libcurl.lib) else (WINDOWS) - set_target_libraries(ll::libcurl libcurl.a) + target_link_libraries(ll::libcurl INTERFACE libcurl.a) endif (WINDOWS) set_target_include_dirs( ll::libcurl ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake index 85bb146a4a..44e83c2e47 100644 --- a/indra/cmake/EXPAT.cmake +++ b/indra/cmake/EXPAT.cmake @@ -6,10 +6,10 @@ create_target( ll::expat INTERFACE IMPORTED ) use_prebuilt_binary(expat) if (WINDOWS) - set_target_libraries( ll::expat libexpatMT ) + target_link_libraries( ll::expat INTERFACE libexpatMT ) set(EXPAT_COPY libexpatMT.dll) else (WINDOWS) - set_target_libraries( ll::expat expat ) + target_link_libraries( ll::expat INTERFACE expat ) if (DARWIN) set(EXPAT_COPY libexpat.1.dylib libexpat.dylib) else () diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index b84a177748..aec86125e8 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -23,7 +23,7 @@ if (USE_FMODSTUDIO) if (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR) # If the path have been specified in the arguments, use that - set_target_libraries(fmodstudio::fmodstudio ${FMODSTUDIO_LIBRARY}) + target_link_libraries(fmodstudio::fmodstudio INTERFACE ${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 @@ -32,12 +32,12 @@ if (USE_FMODSTUDIO) include(Prebuilt) use_prebuilt_binary(fmodstudio) if (WINDOWS) - set_target_libraries( ll::fmodstudio fmod_vc) + target_link_libraries( ll::fmodstudio INTERFACE fmod_vc) elseif (DARWIN) #despite files being called libfmod.dylib, we are searching for fmod - set_target_libraries( ll::fmodstudio fmod) + target_link_libraries( ll::fmodstudio INTERFACE fmod) elseif (LINUX) - set_target_libraries( ll::fmodstudio fmod) + target_link_libraries( ll::fmodstudio INTERFACE fmod) endif (WINDOWS) set_target_include_dirs(ll::fmodstudio ${LIBS_PREBUILT_DIR}/include/fmodstudio) diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake index 243f22586b..d0e17050bd 100644 --- a/indra/cmake/FreeType.cmake +++ b/indra/cmake/FreeType.cmake @@ -6,5 +6,5 @@ create_target( ll::freetype) use_prebuilt_binary(freetype) set_target_include_dirs( ll::freetype ${LIBS_PREBUILT_DIR}/include/freetype2/) -set_target_libraries( ll::freetype freetype ) +target_link_libraries( ll::freetype INTERFACE freetype ) diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake index ab7eb38862..f1532510c5 100644 --- a/indra/cmake/GLOD.cmake +++ b/indra/cmake/GLOD.cmake @@ -7,5 +7,5 @@ create_target( ll::glod ) use_prebuilt_binary(glod) set_target_include_dirs( ll::glod ${LIBS_PREBUILT_DIR}/include) -set_target_libraries( ll::glod GLOD ) +target_link_libraries( ll::glod INTERFACE GLOD ) target_compile_definitions( ll::glod INTERFACE LL_GLOD=1) \ No newline at end of file diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake index 1f161ec4ff..23558364bb 100644 --- a/indra/cmake/GoogleMock.cmake +++ b/indra/cmake/GoogleMock.cmake @@ -13,15 +13,14 @@ set_target_include_dirs( ll::googlemock if (LINUX) # VWR-24366: gmock is underlinked, it needs gtest. - set_target_libraries( ll::googlemock gmock gtest) + target_link_libraries( ll::googlemock INTERFACE gmock gtest) elseif(WINDOWS) - set_target_libraries( ll::googlemock gmock) + target_link_libraries( ll::googlemock INTERFACE gmock) set_target_include_dirs( ll::googlemock ${LIBS_PREBUILT_DIR}/include ${LIBS_PREBUILT_DIR}/include/gmock) - elseif(DARWIN) - set_target_libraries( ll::googlemock gmock gtest) + target_link_libraries( ll::googlemock INTERFACE gmock gtest) endif(LINUX) diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake index 258a27b5de..e4352c6967 100644 --- a/indra/cmake/Hunspell.cmake +++ b/indra/cmake/Hunspell.cmake @@ -6,11 +6,11 @@ create_target( ll::hunspell ) use_prebuilt_binary(libhunspell) if (WINDOWS) - set_target_libraries( ll::hunspell libhunspell) + target_link_libraries( ll::hunspell INTERFACE libhunspell) elseif(DARWIN) - set_target_libraries( ll::hunspell hunspell-1.3) + target_link_libraries( ll::hunspell INTERFACE hunspell-1.3) elseif(LINUX) - set_target_libraries( ll::hunspell hunspell-1.3) + target_link_libraries( ll::hunspell INTERFACE hunspell-1.3) endif() 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 e6ff4b7b72..d51733b413 100644 --- a/indra/cmake/JPEG.cmake +++ b/indra/cmake/JPEG.cmake @@ -8,10 +8,10 @@ create_target(ll::jpeglib) use_prebuilt_binary(jpeglib) if (LINUX) - set_target_libraries( ll::jpeglib jpeg) + target_link_libraries( ll::jpeglib INTERFACE jpeg) elseif (DARWIN) - set_target_libraries( ll::jpeglib jpeg) + target_link_libraries( ll::jpeglib INTERFACE jpeg) elseif (WINDOWS) - set_target_libraries( ll::jpeglib jpeglib) + target_link_libraries( ll::jpeglib INTERFACE jpeglib) endif (LINUX) set_target_include_dirs( ll::jpeglib ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake index a155c6ea78..7d8c5cac62 100644 --- a/indra/cmake/JsonCpp.cmake +++ b/indra/cmake/JsonCpp.cmake @@ -6,10 +6,10 @@ create_target( ll::jsoncpp) use_prebuilt_binary(jsoncpp) if (WINDOWS) - set_target_libraries( ll::jsoncpp json_libmd.lib ) + target_link_libraries( ll::jsoncpp INTERFACE json_libmd.lib ) elseif (DARWIN) - set_target_libraries( ll::jsoncpp libjson_darwin_libmt.a ) + target_link_libraries( ll::jsoncpp INTERFACE libjson_darwin_libmt.a ) elseif (LINUX) - set_target_libraries( ll::jsoncpp libjson_linux-gcc-4.1.3_libmt.a ) + target_link_libraries( ll::jsoncpp INTERFACE libjson_linux-gcc-4.1.3_libmt.a ) endif (WINDOWS) set_target_include_dirs( ll::jsoncpp ${LIBS_PREBUILT_DIR}/include/json) diff --git a/indra/cmake/LLKDU.cmake b/indra/cmake/LLKDU.cmake index a57c3d8715..08a8229a33 100644 --- a/indra/cmake/LLKDU.cmake +++ b/indra/cmake/LLKDU.cmake @@ -14,9 +14,9 @@ if (USE_KDU) include(Prebuilt) use_prebuilt_binary(kdu) if (WINDOWS) - set_target_libraries( ll::kdu kdu.lib) + target_link_libraries( ll::kdu INTERFACE kdu.lib) else (WINDOWS) - set_target_libraries( ll::kdu libkdu.a) + target_link_libraries( ll::kdu INTERFACE libkdu.a) endif (WINDOWS) set_target_include_dirs( ll::kdu diff --git a/indra/cmake/LLPhysicsExtensions.cmake b/indra/cmake/LLPhysicsExtensions.cmake index b51c4c622a..0f21ebb235 100644 --- a/indra/cmake/LLPhysicsExtensions.cmake +++ b/indra/cmake/LLPhysicsExtensions.cmake @@ -22,14 +22,14 @@ if (HAVOK) include(Havok) use_prebuilt_binary(llphysicsextensions_source) set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/src) - set_target_libraries( llphysicsextensions llphysicsextensions) + target_link_libraries( llphysicsextensions INTERFACE llphysicsextensions) elseif (HAVOK_TPV) use_prebuilt_binary(llphysicsextensions_tpv) - set_target_libraries( llphysicsextensions llphysicsextensions_tpv) + target_link_libraries( llphysicsextensions INTERFACE llphysicsextensions_tpv) else (HAVOK) use_prebuilt_binary(llphysicsextensions_stub) set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/stub) - set_target_libraries( llphysicsextensions llphysicsextensionsstub) + target_link_libraries( llphysicsextensions INTERFACE llphysicsextensionsstub) endif (HAVOK) set_target_include_dirs(llphysicsextensions ${LIBS_PREBUILT_DIR}/include/llphysicsextensions) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 0f0e2d3bbf..adb252b8ee 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -12,20 +12,20 @@ use_prebuilt_binary(pcre) use_prebuilt_binary(libxml2) create_target( ll::pcre ) -set_target_libraries( ll::pcre pcrecpp pcre ) +target_link_libraries( ll::pcre INTERFACE pcrecpp pcre ) create_target( ll::minizip-ng ) if (WINDOWS) - set_target_libraries( ll::minizip-ng libminizip ) + target_link_libraries( ll::minizip-ng INTERFACE libminizip ) else() - set_target_libraries( ll::minizip-ng minizip ) + target_link_libraries( ll::minizip-ng INTERFACE minizip ) endif() create_target( ll::libxml ) if (WINDOWS) - set_target_libraries( ll::libxml libxml2_a) + target_link_libraries( ll::libxml INTERFACE libxml2_a) else() - set_target_libraries( ll::libxml xml2) + target_link_libraries( ll::libxml INTERFACE xml2) endif() create_target( ll::colladadom ) @@ -34,9 +34,9 @@ set_target_include_dirs( ll::colladadom ${LIBS_PREBUILT_DIR}/include/collada/1.4 ) if (WINDOWS) - set_target_libraries(ll::colladadom libcollada14dom23-s ll::libxml ll::minizip-ng ) + target_link_libraries(ll::colladadom INTERFACE libcollada14dom23-s ll::libxml ll::minizip-ng ) elseif (DARWIN) - set_target_libraries(ll::colladadom collada14dom ll::libxml ll::minizip-ng) + target_link_libraries(ll::colladadom INTERFACE collada14dom ll::libxml ll::minizip-ng) elseif (LINUX) - set_target_libraries(ll::colladadom collada14dom ll::libxml ll::minizip-ng) + target_link_libraries(ll::colladadom INTERFACE 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 2bbaff942d..6ac2b58017 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -10,7 +10,7 @@ create_target(ll::sdl) if (LINUX) use_prebuilt_binary(SDL) set_target_include_dirs( ll::sdl ${LIBS_PREBUILT_DIR}/i686-linux) - set_target_libraries( ll::sdl SDL directfb fusion direct X11) + target_link_libraries( ll::sdl INTERFACE 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 fd2ee13569..b614b7304f 100644 --- a/indra/cmake/LibVLCPlugin.cmake +++ b/indra/cmake/LibVLCPlugin.cmake @@ -10,18 +10,18 @@ set(LIBVLCPLUGIN ON CACHE BOOL "LIBVLCPLUGIN support for the llplugin/llmedia test apps.") if (WINDOWS) - set_target_libraries( ll::libvlc + target_link_libraries( ll::libvlc INTERFACE libvlc.lib libvlccore.lib ) elseif (DARWIN) - set_target_libraries( ll::libvlc + target_link_libraries( ll::libvlc INTERFACE libvlc.dylib libvlccore.dylib ) elseif (LINUX) # Specify a full path to make sure we get a static link - set_target_libraries( ll::libvlc + target_link_libraries( ll::libvlc INTERFACE ${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 253c24f927..7b89e8707f 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -58,12 +58,12 @@ link_directories(${AUTOBUILD_LIBS_INSTALL_DIRS}) create_target(ll::oslibraries) if (LINUX) - set_target_libraries( ll::oslibraries + target_link_libraries( ll::oslibraries INTERFACE dl pthread rt) elseif (WINDOWS) - set_target_libraries( ll::oslibraries + target_link_libraries( ll::oslibraries INTERFACE advapi32 shell32 ws2_32 @@ -89,7 +89,7 @@ else() find_library(APPKIT_LIBRARY AppKit) find_library(COREAUDIO_LIBRARY CoreAudio) - set_target_libraries( ll::oslibraries + target_link_libraries( ll::oslibraries INTERFACE ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREFOUNDATION_LIBRARY} diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake index fd7a650612..6daf0e0741 100644 --- a/indra/cmake/NDOF.cmake +++ b/indra/cmake/NDOF.cmake @@ -14,9 +14,9 @@ if (NDOF) endif (WINDOWS OR DARWIN) if (WINDOWS) - set_target_libraries( ll::ndof libndofdev) + target_link_libraries( ll::ndof INTERFACE libndofdev) elseif (DARWIN OR LINUX) - set_target_libraries( ll::ndof ndofdev) + target_link_libraries( ll::ndof INTERFACE ndofdev) endif (WINDOWS) target_compile_definitions( ll::ndof INTERFACE LIB_NDOF=1) endif (NDOF) diff --git a/indra/cmake/NGHTTP2.cmake b/indra/cmake/NGHTTP2.cmake index 3007d6f914..fdff9a72fa 100644 --- a/indra/cmake/NGHTTP2.cmake +++ b/indra/cmake/NGHTTP2.cmake @@ -6,10 +6,10 @@ create_target( ll::nghttp2 ) use_prebuilt_binary(nghttp2) if (WINDOWS) - set_target_libraries( ll::nghttp2 ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib) + target_link_libraries( ll::nghttp2 INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib) elseif (DARWIN) - set_target_libraries( ll::nghttp2 libnghttp2.dylib) + target_link_libraries( ll::nghttp2 INTERFACE libnghttp2.dylib) else (WINDOWS) - set_target_libraries( ll::nghttp2 libnghttp2.a ) + target_link_libraries( ll::nghttp2 INTERFACE libnghttp2.a ) endif (WINDOWS) set_target_include_dirs( ll::nghttp2 ${LIBS_PREBUILT_DIR}/include/nghttp2) diff --git a/indra/cmake/NVAPI.cmake b/indra/cmake/NVAPI.cmake index 63e5dd12de..b06cc78087 100644 --- a/indra/cmake/NVAPI.cmake +++ b/indra/cmake/NVAPI.cmake @@ -6,7 +6,7 @@ set(NVAPI ON CACHE BOOL "Use NVAPI.") if (NVAPI) if (WINDOWS) create_target( ll::nvapi ) - set_target_libraries( ll::nvapi nvapi) + target_link_libraries( ll::nvapi INTERFACE nvapi) use_prebuilt_binary(nvapi) endif (WINDOWS) endif (NVAPI) diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake index b50610c554..8bbb657aea 100644 --- a/indra/cmake/OPENAL.cmake +++ b/indra/cmake/OPENAL.cmake @@ -18,12 +18,12 @@ if (USE_OPENAL) use_prebuilt_binary(openal) if(WINDOWS) - set_target_libraries( ll::openal + target_link_libraries( ll::openal INTERFACE OpenAL32 alut ) elseif(LINUX) - set_target_libraries( ll::openal + target_link_libraries( ll::openal INTERFACE openal alut ) diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 7d4d0f467a..139f6bc7d7 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -6,5 +6,5 @@ create_target( ll::openjpeg ) use_prebuilt_binary(openjpeg) -set_target_libraries(ll::openjpeg openjpeg ) +target_link_libraries(ll::openjpeg INTERFACE 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 d586396105..c7be08624d 100644 --- a/indra/cmake/OpenSSL.cmake +++ b/indra/cmake/OpenSSL.cmake @@ -6,11 +6,11 @@ create_target(ll::openssl) use_prebuilt_binary(openssl) if (WINDOWS) - set_target_libraries(ll::openssl libssl libcrypto) + target_link_libraries(ll::openssl INTERFACE libssl libcrypto) elseif (LINUX) - set_target_libraries(ll::openssl ssl crypto dl) + target_link_libraries(ll::openssl INTERFACE ssl crypto dl) else() - set_target_libraries(ll::openssl ssl crypto) + target_link_libraries(ll::openssl INTERFACE ssl crypto) endif (WINDOWS) set_target_include_dirs(ll::openssl ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/PNG.cmake b/indra/cmake/PNG.cmake index 2838a6b667..ef4f492ec2 100644 --- a/indra/cmake/PNG.cmake +++ b/indra/cmake/PNG.cmake @@ -6,8 +6,8 @@ create_target(ll::libpng) use_prebuilt_binary(libpng) if (WINDOWS) - set_target_libraries(ll::libpng libpng16) + target_link_libraries(ll::libpng INTERFACE libpng16) else() - set_target_libraries(ll::libpng png16 ) + target_link_libraries(ll::libpng INTERFACE png16 ) endif() set_target_include_dirs( ll::libpng ${LIBS_PREBUILT_DIR}/include/libpng16) diff --git a/indra/cmake/PluginAPI.cmake b/indra/cmake/PluginAPI.cmake index 8c29f4a3c8..076598f6cc 100644 --- a/indra/cmake/PluginAPI.cmake +++ b/indra/cmake/PluginAPI.cmake @@ -3,7 +3,7 @@ create_target( ll::pluginlibraries) if (WINDOWS) - set_target_libraries( ll::pluginlibraries + target_link_libraries( ll::pluginlibraries INTERFACE wsock32 ws2_32 psapi diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 603368304c..95117c539d 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -60,9 +60,7 @@ endmacro (use_prebuilt_binary _binary) function( create_target name ) add_library( ${name} INTERFACE IMPORTED ) endfunction() -function( set_target_libraries target ) - set_property( TARGET ${target} PROPERTY INTERFACE_LINK_LIBRARIES ${ARGN} ) -endfunction() + function( set_target_include_dirs target) set_property( TARGET ${target} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ARGN} ) endfunction() diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index 03eb1b3fc4..57b33ce34b 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -9,7 +9,7 @@ endif (LINUX) create_target( ll::uilibraries ) if (LINUX) - set_target_libraries( ll::uilibraries + target_link_libraries( ll::uilibraries INTERFACE atk-1.0 gdk-x11-2.0 gdk_pixbuf-2.0 @@ -28,7 +28,7 @@ if (LINUX) ) endif (LINUX) if( WINDOWS ) - set_target_libraries( ll::uilibraries + target_link_libraries( ll::uilibraries INTERFACE opengl32 comdlg32 dxguid diff --git a/indra/cmake/URIPARSER.cmake b/indra/cmake/URIPARSER.cmake index 35f37b4472..72e4594cdd 100644 --- a/indra/cmake/URIPARSER.cmake +++ b/indra/cmake/URIPARSER.cmake @@ -7,10 +7,10 @@ include(Prebuilt) use_prebuilt_binary(uriparser) if (WINDOWS) - set_target_libraries( ll::uriparser uriparser) + target_link_libraries( ll::uriparser INTERFACE uriparser) elseif (LINUX) - set_target_libraries( ll::uriparser uriparser) + target_link_libraries( ll::uriparser INTERFACE uriparser) elseif (DARWIN) - set_target_libraries( ll::uriparser liburiparser.dylib) + target_link_libraries( ll::uriparser INTERFACE liburiparser.dylib) endif (WINDOWS) set_target_include_dirs( ll::uriparser ${LIBS_PREBUILT_DIR}/include/uriparser) diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index b2d1d96562..417423f49c 100644 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -5,5 +5,5 @@ include_guard() create_target( ll::xmlrpc-epi ) use_prebuilt_binary(xmlrpc-epi) -set_target_libraries(ll::xmlrpc-epi xmlrpc-epi ) +target_link_libraries(ll::xmlrpc-epi INTERFACE 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 6e206f1e48..a95005e368 100644 --- a/indra/cmake/ZLIBNG.cmake +++ b/indra/cmake/ZLIBNG.cmake @@ -7,8 +7,8 @@ create_target(ll::zlib-ng) use_prebuilt_binary(zlib-ng) if (WINDOWS) - set_target_libraries( ll::zlib-ng zlib ) + target_link_libraries( ll::zlib-ng INTERFACE zlib ) else() - set_target_libraries( ll::zlib-ng z ) + target_link_libraries( ll::zlib-ng INTERFACE z ) endif (WINDOWS) 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 9057ae2272..6f22815855 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -16,13 +16,13 @@ if (USE_BUGSPLAT) include(Prebuilt) use_prebuilt_binary(bugsplat) if (WINDOWS) - set_target_libraries( ll::bugsplat + target_link_libraries( ll::bugsplat INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib ) elseif (DARWIN) find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}") - set_target_libraries( ll::bugsplat + target_link_libraries( ll::bugsplat INTERFACE ${BUGSPLAT_LIBRARIES} ) else (WINDOWS) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 50e7b53568..943e621eb8 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1538,7 +1538,7 @@ if (WINDOWS) if (INTEL_MEMOPS_LIBRARY) create_target( ll::intel_memops ) - set_target_libraries( ll::intel_memops ${INTEL_MEMOPS_LIBRARY} ) + target_link_libraries( ll::intel_memops ${INTEL_MEMOPS_LIBRARY} ) endif (INTEL_MEMOPS_LIBRARY) if (ADDRESS_SIZE EQUAL 64) -- cgit v1.2.3 From e0cf0cdfd49e5a946dcd202a083fb23f01e4f1fe Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 17 Apr 2022 18:04:57 +0200 Subject: Switch to target_include_directories All 3Ps include dirs are treated as SYSTEM, this will stop compilers stop emitting warnings from those files and greatly helps having high warning levels and not being swamped by warnings that come from external libraries. --- indra/cmake/APR.cmake | 2 +- indra/cmake/Audio.cmake | 2 +- indra/cmake/CEFPlugin.cmake | 8 ++++---- indra/cmake/CURL.cmake | 2 +- indra/cmake/EXPAT.cmake | 2 +- indra/cmake/FMODSTUDIO.cmake | 6 +++--- indra/cmake/FreeType.cmake | 2 +- indra/cmake/GLOD.cmake | 2 +- indra/cmake/GoogleMock.cmake | 4 ++-- indra/cmake/Hunspell.cmake | 2 +- indra/cmake/JPEG.cmake | 2 +- indra/cmake/JsonCpp.cmake | 2 +- indra/cmake/LLKDU.cmake | 2 +- indra/cmake/LLPhysicsExtensions.cmake | 2 +- indra/cmake/LLPrimitive.cmake | 2 +- indra/cmake/LLWindow.cmake | 2 +- indra/cmake/NGHTTP2.cmake | 2 +- indra/cmake/OPENAL.cmake | 2 +- indra/cmake/OpenJPEG.cmake | 2 +- indra/cmake/OpenSSL.cmake | 2 +- indra/cmake/PNG.cmake | 2 +- indra/cmake/Prebuilt.cmake | 4 ---- indra/cmake/UI.cmake | 4 ++-- indra/cmake/URIPARSER.cmake | 2 +- indra/cmake/XmlRpcEpi.cmake | 2 +- indra/cmake/ZLIBNG.cmake | 2 +- indra/cmake/bugsplat.cmake | 2 +- indra/llappearance/CMakeLists.txt | 4 ++-- indra/llaudio/CMakeLists.txt | 2 +- indra/llcharacter/CMakeLists.txt | 2 +- indra/llcommon/CMakeLists.txt | 2 +- indra/llcorehttp/CMakeLists.txt | 2 +- indra/llfilesystem/CMakeLists.txt | 2 +- indra/llimage/CMakeLists.txt | 2 +- indra/llinventory/CMakeLists.txt | 2 +- indra/llkdu/CMakeLists.txt | 2 +- indra/llmath/CMakeLists.txt | 2 +- indra/llmessage/CMakeLists.txt | 2 +- indra/llplugin/CMakeLists.txt | 2 +- indra/llprimitive/CMakeLists.txt | 2 +- indra/llrender/CMakeLists.txt | 2 +- indra/llui/CMakeLists.txt | 2 +- indra/llwindow/CMakeLists.txt | 2 +- indra/llxml/CMakeLists.txt | 2 +- indra/media_plugins/base/CMakeLists.txt | 2 +- indra/media_plugins/cef/CMakeLists.txt | 2 +- indra/viewer_components/login/CMakeLists.txt | 2 +- 47 files changed, 54 insertions(+), 58 deletions(-) diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index a389c09a37..a9500d2068 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -40,4 +40,4 @@ else (WINDOWS) rt ) endif (WINDOWS) -set_target_include_dirs( ll::apr ${LIBS_PREBUILT_DIR}/include/apr-1 ) +target_include_directories( ll::apr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/apr-1 ) diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake index 0441f370db..59a589cd0e 100644 --- a/indra/cmake/Audio.cmake +++ b/indra/cmake/Audio.cmake @@ -5,7 +5,7 @@ include_guard() create_target(ll::vorbis) use_prebuilt_binary(ogg_vorbis) -set_target_include_dirs( ll::vorbis ${LIBS_PREBUILT_DIR}/include ) +target_include_directories( ll::vorbis SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) if (WINDOWS) target_link_libraries(ll::vorbis INTERFACE ogg_static vorbis_static vorbisenc_static vorbisfile_static ) diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 41d1b521f7..2b5db1773b 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -3,13 +3,13 @@ include(Linking) include(Prebuilt) include_guard() -create_target( cef::cef ) +create_target( ll::cef ) use_prebuilt_binary(dullahan) -set_target_include_dirs( cef::cef ${LIBS_PREBUILT_DIR}/include/cef) +target_include_directories( ll::cef SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/cef) if (WINDOWS) - target_link_libraries( cef::cef INTERFACE + target_link_libraries( ll::cef INTERFACE libcef.lib libcef_dll_wrapper.lib dullahan.lib @@ -25,7 +25,7 @@ elseif (DARWIN) message(FATAL_ERROR "CEF not found") endif() - target_link_libraries( cef::cef INTERFACE + target_link_libraries( ll::cef INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libcef_dll_wrapper.a ${ARCH_PREBUILT_DIRS_RELEASE}/libdullahan.a ${APPKIT_LIBRARY} diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index ee00113f75..ce7711e479 100644 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -10,4 +10,4 @@ if (WINDOWS) else (WINDOWS) target_link_libraries(ll::libcurl INTERFACE libcurl.a) endif (WINDOWS) -set_target_include_dirs( ll::libcurl ${LIBS_PREBUILT_DIR}/include) +target_include_directories( ll::libcurl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake index 44e83c2e47..4947c40e02 100644 --- a/indra/cmake/EXPAT.cmake +++ b/indra/cmake/EXPAT.cmake @@ -16,4 +16,4 @@ else (WINDOWS) set(EXPAT_COPY libexpat.so.1 libexpat.so) endif () endif (WINDOWS) -set_target_include_dirs( ll::expat ${LIBS_PREBUILT_DIR}/include ) +target_include_directories( ll::expat SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index aec86125e8..a3fd9c718a 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -23,8 +23,8 @@ if (USE_FMODSTUDIO) if (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR) # If the path have been specified in the arguments, use that - target_link_libraries(fmodstudio::fmodstudio INTERFACE ${FMODSTUDIO_LIBRARY}) - set_target_include_dirs(fmodstudio::fmodstudio ${FMODSTUDIO_INCLUDE_DIR}) + target_link_libraries(ll::fmodstudio INTERFACE ${FMODSTUDIO_LIBRARY}) + target_include_directories( ll::fmodstudio SYSTEM INTERFACE ${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) @@ -40,7 +40,7 @@ if (USE_FMODSTUDIO) target_link_libraries( ll::fmodstudio INTERFACE fmod) endif (WINDOWS) - set_target_include_dirs(ll::fmodstudio ${LIBS_PREBUILT_DIR}/include/fmodstudio) + target_include_directories( ll::fmodstudio SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/fmodstudio) endif (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR) else() set( USE_FMODSTUDIO "OFF") diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake index d0e17050bd..c8454eb3b9 100644 --- a/indra/cmake/FreeType.cmake +++ b/indra/cmake/FreeType.cmake @@ -5,6 +5,6 @@ include_guard() create_target( ll::freetype) use_prebuilt_binary(freetype) -set_target_include_dirs( ll::freetype ${LIBS_PREBUILT_DIR}/include/freetype2/) +target_include_directories( ll::freetype SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/freetype2/) target_link_libraries( ll::freetype INTERFACE freetype ) diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake index f1532510c5..9070be302a 100644 --- a/indra/cmake/GLOD.cmake +++ b/indra/cmake/GLOD.cmake @@ -6,6 +6,6 @@ create_target( ll::glod ) use_prebuilt_binary(glod) -set_target_include_dirs( ll::glod ${LIBS_PREBUILT_DIR}/include) +target_include_directories( ll::glod SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) target_link_libraries( ll::glod INTERFACE GLOD ) target_compile_definitions( ll::glod INTERFACE LL_GLOD=1) \ No newline at end of file diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake index 23558364bb..01ef4de093 100644 --- a/indra/cmake/GoogleMock.cmake +++ b/indra/cmake/GoogleMock.cmake @@ -7,7 +7,7 @@ include_guard() use_prebuilt_binary(googlemock) create_target( ll::googlemock ) -set_target_include_dirs( ll::googlemock +target_include_directories( ll::googlemock SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) @@ -16,7 +16,7 @@ if (LINUX) target_link_libraries( ll::googlemock INTERFACE gmock gtest) elseif(WINDOWS) target_link_libraries( ll::googlemock INTERFACE gmock) - set_target_include_dirs( ll::googlemock + target_include_directories( ll::googlemock SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ${LIBS_PREBUILT_DIR}/include/gmock) elseif(DARWIN) diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake index e4352c6967..0994d2b5f4 100644 --- a/indra/cmake/Hunspell.cmake +++ b/indra/cmake/Hunspell.cmake @@ -12,5 +12,5 @@ elseif(DARWIN) elseif(LINUX) target_link_libraries( ll::hunspell INTERFACE hunspell-1.3) endif() -set_target_include_dirs( ll::hunspell ${LIBS_PREBUILT_DIR}/include/hunspell) +target_include_directories( ll::hunspell SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/hunspell) use_prebuilt_binary(dictionaries) diff --git a/indra/cmake/JPEG.cmake b/indra/cmake/JPEG.cmake index d51733b413..af984b6ac3 100644 --- a/indra/cmake/JPEG.cmake +++ b/indra/cmake/JPEG.cmake @@ -14,4 +14,4 @@ elseif (DARWIN) elseif (WINDOWS) target_link_libraries( ll::jpeglib INTERFACE jpeglib) endif (LINUX) -set_target_include_dirs( ll::jpeglib ${LIBS_PREBUILT_DIR}/include) +target_include_directories( ll::jpeglib SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake index 7d8c5cac62..1c354350c3 100644 --- a/indra/cmake/JsonCpp.cmake +++ b/indra/cmake/JsonCpp.cmake @@ -12,4 +12,4 @@ elseif (DARWIN) elseif (LINUX) target_link_libraries( ll::jsoncpp INTERFACE libjson_linux-gcc-4.1.3_libmt.a ) endif (WINDOWS) -set_target_include_dirs( ll::jsoncpp ${LIBS_PREBUILT_DIR}/include/json) +target_include_directories( ll::jsoncpp SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/json) diff --git a/indra/cmake/LLKDU.cmake b/indra/cmake/LLKDU.cmake index 08a8229a33..bf358cc0eb 100644 --- a/indra/cmake/LLKDU.cmake +++ b/indra/cmake/LLKDU.cmake @@ -19,7 +19,7 @@ if (USE_KDU) target_link_libraries( ll::kdu INTERFACE libkdu.a) endif (WINDOWS) - set_target_include_dirs( ll::kdu + target_include_directories( ll::kdu SYSTEM INTERFACE ${AUTOBUILD_INSTALL_DIR}/include/kdu ${LIBS_OPEN_DIR}/llkdu ) diff --git a/indra/cmake/LLPhysicsExtensions.cmake b/indra/cmake/LLPhysicsExtensions.cmake index 0f21ebb235..014ec6a98b 100644 --- a/indra/cmake/LLPhysicsExtensions.cmake +++ b/indra/cmake/LLPhysicsExtensions.cmake @@ -32,4 +32,4 @@ else (HAVOK) target_link_libraries( llphysicsextensions INTERFACE llphysicsextensionsstub) endif (HAVOK) -set_target_include_dirs(llphysicsextensions ${LIBS_PREBUILT_DIR}/include/llphysicsextensions) +target_include_directories( llphysicsextensions INTERFACE ${LIBS_PREBUILT_DIR}/include/llphysicsextensions) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index adb252b8ee..0026f183e6 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -29,7 +29,7 @@ else() endif() create_target( ll::colladadom ) -set_target_include_dirs( ll::colladadom +target_include_directories( ll::colladadom SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/collada ${LIBS_PREBUILT_DIR}/include/collada/1.4 ) diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index 6ac2b58017..fdeb4aa434 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -9,7 +9,7 @@ create_target(ll::sdl) if (LINUX) use_prebuilt_binary(SDL) - set_target_include_dirs( ll::sdl ${LIBS_PREBUILT_DIR}/i686-linux) + target_include_directories( ll::sdl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/i686-linux) target_link_libraries( ll::sdl INTERFACE SDL directfb fusion direct X11) target_compile_definitions( ll::sdl INTERFACE LL_SDL=1) endif (LINUX) diff --git a/indra/cmake/NGHTTP2.cmake b/indra/cmake/NGHTTP2.cmake index fdff9a72fa..7e59a7d9a7 100644 --- a/indra/cmake/NGHTTP2.cmake +++ b/indra/cmake/NGHTTP2.cmake @@ -12,4 +12,4 @@ elseif (DARWIN) else (WINDOWS) target_link_libraries( ll::nghttp2 INTERFACE libnghttp2.a ) endif (WINDOWS) -set_target_include_dirs( ll::nghttp2 ${LIBS_PREBUILT_DIR}/include/nghttp2) +target_include_directories( ll::nghttp2 SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/nghttp2) diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake index 8bbb657aea..faa247769b 100644 --- a/indra/cmake/OPENAL.cmake +++ b/indra/cmake/OPENAL.cmake @@ -13,7 +13,7 @@ endif() if (USE_OPENAL) create_target( ll::openal ) - set_target_include_dirs( ll::openal "${LIBS_PREBUILT_DIR}/include/AL") + target_include_directories( ll::openal SYSTEM INTERFACE "${LIBS_PREBUILT_DIR}/include/AL") target_compile_definitions( ll::openal INTERFACE LL_OPENAL=1) use_prebuilt_binary(openal) diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 139f6bc7d7..07dee5c23d 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -7,4 +7,4 @@ create_target( ll::openjpeg ) use_prebuilt_binary(openjpeg) target_link_libraries(ll::openjpeg INTERFACE openjpeg ) -set_target_include_dirs( ll::openjpeg ${LIBS_PREBUILT_DIR}/include/openjpeg) +target_include_directories( ll::openjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/openjpeg) diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake index c7be08624d..6c9abc9e7f 100644 --- a/indra/cmake/OpenSSL.cmake +++ b/indra/cmake/OpenSSL.cmake @@ -12,5 +12,5 @@ elseif (LINUX) else() target_link_libraries(ll::openssl INTERFACE ssl crypto) endif (WINDOWS) -set_target_include_dirs(ll::openssl ${LIBS_PREBUILT_DIR}/include) +target_include_directories( ll::openssl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/PNG.cmake b/indra/cmake/PNG.cmake index ef4f492ec2..5a8d3e197d 100644 --- a/indra/cmake/PNG.cmake +++ b/indra/cmake/PNG.cmake @@ -10,4 +10,4 @@ if (WINDOWS) else() target_link_libraries(ll::libpng INTERFACE png16 ) endif() -set_target_include_dirs( ll::libpng ${LIBS_PREBUILT_DIR}/include/libpng16) +target_include_directories( ll::libpng SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/libpng16) diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 95117c539d..593eb3958c 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -61,7 +61,3 @@ function( create_target name ) add_library( ${name} INTERFACE IMPORTED ) endfunction() -function( set_target_include_dirs target) - set_property( TARGET ${target} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ARGN} ) -endfunction() - diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index 57b33ce34b..c23fb6e8a7 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -43,7 +43,7 @@ if( WINDOWS ) ) endif() -set_target_include_dirs( ll::uilibraries +target_include_directories( ll::uilibraries SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) @@ -62,7 +62,7 @@ set_target_include_dirs( ll::uilibraries # pango-1.0 # ) #foreach(include ${${LL_ARCH}_INCLUDES}) -# set_target_include_dirs( ll::uilibraries +# target_include_directories( ll::uilibraries SYSTEM INTERFACE # ${LIBS_PREBUILT_DIR}/include/${include} # ) #endforeach(include) diff --git a/indra/cmake/URIPARSER.cmake b/indra/cmake/URIPARSER.cmake index 72e4594cdd..8639eab891 100644 --- a/indra/cmake/URIPARSER.cmake +++ b/indra/cmake/URIPARSER.cmake @@ -13,4 +13,4 @@ elseif (LINUX) elseif (DARWIN) target_link_libraries( ll::uriparser INTERFACE liburiparser.dylib) endif (WINDOWS) -set_target_include_dirs( ll::uriparser ${LIBS_PREBUILT_DIR}/include/uriparser) +target_include_directories( ll::uriparser SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/uriparser) diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index 417423f49c..aad9d1e476 100644 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -6,4 +6,4 @@ create_target( ll::xmlrpc-epi ) use_prebuilt_binary(xmlrpc-epi) target_link_libraries(ll::xmlrpc-epi INTERFACE xmlrpc-epi ) -set_target_include_dirs( ll::xmlrpc-epi ${LIBS_PREBUILT_DIR}/include) +target_include_directories( ll::xmlrpc-epi SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/ZLIBNG.cmake b/indra/cmake/ZLIBNG.cmake index a95005e368..a7779af3cd 100644 --- a/indra/cmake/ZLIBNG.cmake +++ b/indra/cmake/ZLIBNG.cmake @@ -11,4 +11,4 @@ if (WINDOWS) else() target_link_libraries( ll::zlib-ng INTERFACE z ) endif (WINDOWS) -set_target_include_dirs( ll::zlib-ng ${LIBS_PREBUILT_DIR}/include/zlib-ng) +target_include_directories( ll::zlib-ng SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/zlib-ng) diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake index 6f22815855..21a6e074fc 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -33,7 +33,7 @@ if (USE_BUGSPLAT) message( FATAL_ERROR "You need to set BUGSPLAT_DB when setting USE_BUGSPLAT" ) endif() - set_target_include_dirs( ll::bugsplat ${LIBS_PREBUILT_DIR}/include/bugsplat) + target_include_directories( ll::bugsplat SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/bugsplat) set_property( TARGET ll::bugsplat APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS LL_BUGSPLAT) else() set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name") diff --git a/indra/llappearance/CMakeLists.txt b/indra/llappearance/CMakeLists.txt index 321c1e1798..4516a95d80 100644 --- a/indra/llappearance/CMakeLists.txt +++ b/indra/llappearance/CMakeLists.txt @@ -71,11 +71,11 @@ target_link_libraries(llappearance llcorehttp llcommon ) -set_target_include_dirs( llappearance ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llappearance INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) if (BUILD_HEADLESS) add_library (llappearanceheadless ${llappearance_SOURCE_FILES}) - set_target_include_dirs( llappearanceheadless ${CMAKE_CURRENT_SOURCE_DIR}) + target_include_directories( llappearanceheadless INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(llappearanceheadless llcharacter diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index 220b6d8cfb..b2b479b36f 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -57,7 +57,7 @@ set_source_files_properties(${llaudio_HEADER_FILES} list(APPEND llaudio_SOURCE_FILES ${llaudio_HEADER_FILES}) add_library (llaudio ${llaudio_SOURCE_FILES}) -set_target_include_dirs( llaudio ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llaudio INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries( llaudio llcommon llmath diff --git a/indra/llcharacter/CMakeLists.txt b/indra/llcharacter/CMakeLists.txt index 59e491748d..38720eb5da 100644 --- a/indra/llcharacter/CMakeLists.txt +++ b/indra/llcharacter/CMakeLists.txt @@ -63,7 +63,7 @@ set_source_files_properties(${llcharacter_HEADER_FILES} list(APPEND llcharacter_SOURCE_FILES ${llcharacter_HEADER_FILES}) add_library (llcharacter ${llcharacter_SOURCE_FILES}) -set_target_include_dirs( llcharacter ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llcharacter INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries( llcharacter diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index d5c57bbeaf..61d6196f50 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -279,7 +279,7 @@ target_link_libraries( ll::oslibraries ) -set_target_include_dirs( llcommon ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llcommon INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories( llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ) add_dependencies(llcommon stage_third_party_libs) diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index e2bd9ae5b8..f93104b321 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -91,7 +91,7 @@ target_link_libraries( ll::openssl ll::nghttp2 ) -set_target_include_dirs( llcorehttp ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llcorehttp INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # tests diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index 882f5b8fba..537f43007a 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -57,7 +57,7 @@ add_library (llfilesystem ${llfilesystem_SOURCE_FILES}) target_link_libraries(llfilesystem llcommon ) -set_target_include_dirs( llfilesystem ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llfilesystem INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # Add tests if (LL_TESTS) diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt index 7b3c1110a2..0984493941 100644 --- a/indra/llimage/CMakeLists.txt +++ b/indra/llimage/CMakeLists.txt @@ -49,7 +49,7 @@ set_source_files_properties(${llimage_HEADER_FILES} list(APPEND llimage_SOURCE_FILES ${llimage_HEADER_FILES}) add_library (llimage ${llimage_SOURCE_FILES}) -set_target_include_dirs( llimage ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llimage INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level if (USE_KDU) diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt index 7d193f5512..16724cca53 100644 --- a/indra/llinventory/CMakeLists.txt +++ b/indra/llinventory/CMakeLists.txt @@ -60,7 +60,7 @@ list(APPEND llinventory_SOURCE_FILES ${llinventory_HEADER_FILES}) add_library (llinventory ${llinventory_SOURCE_FILES}) target_link_libraries( llinventory llcommon llmath llmessage llxml ) -set_target_include_dirs( llinventory ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llinventory INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) #add unit tests if (LL_TESTS) diff --git a/indra/llkdu/CMakeLists.txt b/indra/llkdu/CMakeLists.txt index 674ad04919..aef8dea53f 100644 --- a/indra/llkdu/CMakeLists.txt +++ b/indra/llkdu/CMakeLists.txt @@ -43,7 +43,7 @@ if (USE_KDU) add_library (llkdu ${llkdu_SOURCE_FILES}) target_link_libraries(llkdu ll::kdu llimage llcommon) - set_target_include_dirs( llkdu ${CMAKE_CURRENT_SOURCE_DIR}) + target_include_directories( llkdu INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # Add tests # ND: llkdu tests are very strange as they include stubs for KDU classes/methods diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index 4c4e59811d..9d1b4f07f3 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -103,7 +103,7 @@ list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES}) add_library (llmath ${llmath_SOURCE_FILES}) target_link_libraries(llmath llcommon) -set_target_include_dirs( llmath ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llmath INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # Add tests if (LL_TESTS) diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index 623798176b..679ff43131 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -200,7 +200,7 @@ target_link_libraries( llcorehttp ll::xmlrpc-epi ) -set_target_include_dirs( llmessage ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llmessage INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # tests if (LL_TESTS) diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt index 872d62a2bb..71801e05af 100644 --- a/indra/llplugin/CMakeLists.txt +++ b/indra/llplugin/CMakeLists.txt @@ -46,7 +46,7 @@ endif(NOT ADDRESS_SIZE EQUAL 32) list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES}) add_library (llplugin ${llplugin_SOURCE_FILES}) -set_target_include_dirs(llplugin ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llplugin INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries( llplugin llcommon llmath llrender llmessage ) add_subdirectory(slplugin) diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 79b54c9df8..d69b24a07f 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -53,7 +53,7 @@ set_source_files_properties(${llprimitive_HEADER_FILES} list(APPEND llprimitive_SOURCE_FILES ${llprimitive_HEADER_FILES}) add_library (llprimitive ${llprimitive_SOURCE_FILES}) -set_target_include_dirs( llprimitive ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llprimitive INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(llprimitive llcommon diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt index 8f9089f4b7..db672303be 100644 --- a/indra/llrender/CMakeLists.txt +++ b/indra/llrender/CMakeLists.txt @@ -89,7 +89,7 @@ if (BUILD_HEADLESS) endif (BUILD_HEADLESS) add_library (llrender ${llrender_SOURCE_FILES}) -set_target_include_dirs(llrender ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llrender INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 5e71b673a5..144923636b 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -252,7 +252,7 @@ set_source_files_properties(llurlentry.cpp list(APPEND llui_SOURCE_FILES ${llui_HEADER_FILES}) add_library (llui ${llui_SOURCE_FILES}) -set_target_include_dirs( llui ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llui INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level target_link_libraries(llui diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index 4c2f8149b4..826edf31cf 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -175,4 +175,4 @@ endif (llwindow_HEADER_FILES) ) target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES} ll::sdl) -set_target_include_dirs(llwindow ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llwindow INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt index fc680e6da5..5ac6aae78e 100644 --- a/indra/llxml/CMakeLists.txt +++ b/indra/llxml/CMakeLists.txt @@ -35,7 +35,7 @@ target_link_libraries( llxml llcommon ll::expat ) -set_target_include_dirs( llxml ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llxml INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # tests diff --git a/indra/media_plugins/base/CMakeLists.txt b/indra/media_plugins/base/CMakeLists.txt index 9da249bd27..64b6a4228d 100644 --- a/indra/media_plugins/base/CMakeLists.txt +++ b/indra/media_plugins/base/CMakeLists.txt @@ -35,4 +35,4 @@ add_library(media_plugin_base ) target_link_libraries( media_plugin_base llplugin ) -set_target_include_dirs(media_plugin_base ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( media_plugin_base INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index c4cf292dde..ae3092fff4 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -62,7 +62,7 @@ add_library(media_plugin_cef target_link_libraries(media_plugin_cef media_plugin_base - cef::cef + ll::cef ) if (WINDOWS) diff --git a/indra/viewer_components/login/CMakeLists.txt b/indra/viewer_components/login/CMakeLists.txt index 0508a17f3a..76e38acf8a 100644 --- a/indra/viewer_components/login/CMakeLists.txt +++ b/indra/viewer_components/login/CMakeLists.txt @@ -28,7 +28,7 @@ list(APPEND add_library(lllogin ${login_SOURCE_FILES} ) -set_target_include_dirs( lllogin ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( lllogin INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(lllogin llmessage -- cgit v1.2.3 From 363f2df4fa22b3eb95ff4603d73b7a042f3fefd1 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 17 Apr 2022 18:28:55 +0200 Subject: Remove function create_target and instead directly use add_library --- indra/cmake/APR.cmake | 2 +- indra/cmake/Audio.cmake | 2 +- indra/cmake/Boost.cmake | 2 +- indra/cmake/CEFPlugin.cmake | 2 +- indra/cmake/CURL.cmake | 2 +- indra/cmake/EXPAT.cmake | 2 +- indra/cmake/FMODSTUDIO.cmake | 2 +- indra/cmake/FreeType.cmake | 2 +- indra/cmake/GLOD.cmake | 2 +- indra/cmake/GoogleMock.cmake | 2 +- indra/cmake/Hunspell.cmake | 2 +- indra/cmake/JPEG.cmake | 2 +- indra/cmake/JsonCpp.cmake | 2 +- indra/cmake/LLKDU.cmake | 2 +- indra/cmake/LLPhysicsExtensions.cmake | 2 +- indra/cmake/LLPrimitive.cmake | 8 ++++---- indra/cmake/LLWindow.cmake | 2 +- indra/cmake/LibVLCPlugin.cmake | 2 +- indra/cmake/Linking.cmake | 2 +- indra/cmake/NDOF.cmake | 2 +- indra/cmake/NGHTTP2.cmake | 2 +- indra/cmake/NVAPI.cmake | 2 +- indra/cmake/OPENAL.cmake | 2 +- indra/cmake/OpenJPEG.cmake | 2 +- indra/cmake/OpenSSL.cmake | 2 +- indra/cmake/PNG.cmake | 2 +- indra/cmake/PluginAPI.cmake | 2 +- indra/cmake/Prebuilt.cmake | 4 ---- indra/cmake/UI.cmake | 4 ++-- indra/cmake/URIPARSER.cmake | 2 +- indra/cmake/XmlRpcEpi.cmake | 2 +- indra/cmake/ZLIBNG.cmake | 2 +- indra/cmake/bugsplat.cmake | 2 +- indra/newview/CMakeLists.txt | 2 +- 34 files changed, 37 insertions(+), 41 deletions(-) diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index a9500d2068..1c635d4531 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -3,7 +3,7 @@ include(Prebuilt) include_guard() -create_target( ll::apr) +add_library( ll::apr INTERFACE IMPORTED ) use_prebuilt_binary(apr_suite) if (WINDOWS) diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake index 59a589cd0e..ddba066727 100644 --- a/indra/cmake/Audio.cmake +++ b/indra/cmake/Audio.cmake @@ -2,7 +2,7 @@ include(Prebuilt) include_guard() -create_target(ll::vorbis) +add_library( ll::vorbis INTERFACE IMPORTED ) use_prebuilt_binary(ogg_vorbis) target_include_directories( ll::vorbis SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index e713d50fc1..f4f824769e 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -2,7 +2,7 @@ include(Prebuilt) include_guard() -create_target( ll::boost ) +add_library( ll::boost INTERFACE IMPORTED ) use_prebuilt_binary(boost) diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 2b5db1773b..9b77becf29 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -3,7 +3,7 @@ include(Linking) include(Prebuilt) include_guard() -create_target( ll::cef ) +add_library( ll::cef INTERFACE IMPORTED ) use_prebuilt_binary(dullahan) target_include_directories( ll::cef SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/cef) diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index ce7711e479..e8b04177c1 100644 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -2,7 +2,7 @@ include(Prebuilt) include_guard() -create_target(ll::libcurl) +add_library( ll::libcurl INTERFACE IMPORTED ) use_prebuilt_binary(curl) if (WINDOWS) diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake index 4947c40e02..8a48908401 100644 --- a/indra/cmake/EXPAT.cmake +++ b/indra/cmake/EXPAT.cmake @@ -2,7 +2,7 @@ include(Prebuilt) include_guard() -create_target( ll::expat INTERFACE IMPORTED ) +add_library( ll::expat INTERFACE IMPORTED ) use_prebuilt_binary(expat) if (WINDOWS) diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index a3fd9c718a..c5b21ac4e5 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -17,7 +17,7 @@ if(FMODSTUDIO) endif() if (USE_FMODSTUDIO) - create_target( ll::fmodstudio ) + add_library( ll::fmodstudio INTERFACE IMPORTED ) target_compile_definitions( ll::fmodstudio INTERFACE LL_FMODSTUDIO=1) if (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR) diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake index c8454eb3b9..1974e2879e 100644 --- a/indra/cmake/FreeType.cmake +++ b/indra/cmake/FreeType.cmake @@ -2,7 +2,7 @@ include(Prebuilt) include_guard() -create_target( ll::freetype) +add_library( ll::freetype INTERFACE IMPORTED ) use_prebuilt_binary(freetype) target_include_directories( ll::freetype SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/freetype2/) diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake index 9070be302a..db00a309f0 100644 --- a/indra/cmake/GLOD.cmake +++ b/indra/cmake/GLOD.cmake @@ -2,7 +2,7 @@ include(Prebuilt) include_guard() -create_target( ll::glod ) +add_library( ll::glod INTERFACE IMPORTED ) use_prebuilt_binary(glod) diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake index 01ef4de093..2036e43dd0 100644 --- a/indra/cmake/GoogleMock.cmake +++ b/indra/cmake/GoogleMock.cmake @@ -6,7 +6,7 @@ include_guard() use_prebuilt_binary(googlemock) -create_target( ll::googlemock ) +add_library( ll::googlemock INTERFACE IMPORTED ) target_include_directories( ll::googlemock SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake index 0994d2b5f4..7786418226 100644 --- a/indra/cmake/Hunspell.cmake +++ b/indra/cmake/Hunspell.cmake @@ -2,7 +2,7 @@ include(Prebuilt) include_guard() -create_target( ll::hunspell ) +add_library( ll::hunspell INTERFACE IMPORTED ) use_prebuilt_binary(libhunspell) if (WINDOWS) diff --git a/indra/cmake/JPEG.cmake b/indra/cmake/JPEG.cmake index af984b6ac3..a6ef5d4ad9 100644 --- a/indra/cmake/JPEG.cmake +++ b/indra/cmake/JPEG.cmake @@ -4,7 +4,7 @@ include(Prebuilt) include(Linking) include_guard() -create_target(ll::jpeglib) +add_library( ll::jpeglib INTERFACE IMPORTED ) use_prebuilt_binary(jpeglib) if (LINUX) diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake index 1c354350c3..0b6a82e576 100644 --- a/indra/cmake/JsonCpp.cmake +++ b/indra/cmake/JsonCpp.cmake @@ -2,7 +2,7 @@ include(Prebuilt) include_guard() -create_target( ll::jsoncpp) +add_library( ll::jsoncpp INTERFACE IMPORTED ) use_prebuilt_binary(jsoncpp) if (WINDOWS) diff --git a/indra/cmake/LLKDU.cmake b/indra/cmake/LLKDU.cmake index bf358cc0eb..fda25610da 100644 --- a/indra/cmake/LLKDU.cmake +++ b/indra/cmake/LLKDU.cmake @@ -8,7 +8,7 @@ if (INSTALL_PROPRIETARY) endif (INSTALL_PROPRIETARY) include_guard() -create_target( ll::kdu ) +add_library( ll::kdu INTERFACE IMPORTED ) if (USE_KDU) include(Prebuilt) diff --git a/indra/cmake/LLPhysicsExtensions.cmake b/indra/cmake/LLPhysicsExtensions.cmake index 014ec6a98b..9c628b84b1 100644 --- a/indra/cmake/LLPhysicsExtensions.cmake +++ b/indra/cmake/LLPhysicsExtensions.cmake @@ -11,7 +11,7 @@ if (INSTALL_PROPRIETARY) endif (INSTALL_PROPRIETARY) include_guard() -create_target(llphysicsextensions) +add_library( llphysicsextensions INTERFACE IMPORTED ) # Note that the use_prebuilt_binary macros below do not in fact include binaries; diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 0026f183e6..e643243fca 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -11,24 +11,24 @@ use_prebuilt_binary(minizip-ng) # needed for colladadom use_prebuilt_binary(pcre) use_prebuilt_binary(libxml2) -create_target( ll::pcre ) +add_library( ll::pcre INTERFACE IMPORTED ) target_link_libraries( ll::pcre INTERFACE pcrecpp pcre ) -create_target( ll::minizip-ng ) +add_library( ll::minizip-ng INTERFACE IMPORTED ) if (WINDOWS) target_link_libraries( ll::minizip-ng INTERFACE libminizip ) else() target_link_libraries( ll::minizip-ng INTERFACE minizip ) endif() -create_target( ll::libxml ) +add_library( ll::libxml INTERFACE IMPORTED ) if (WINDOWS) target_link_libraries( ll::libxml INTERFACE libxml2_a) else() target_link_libraries( ll::libxml INTERFACE xml2) endif() -create_target( ll::colladadom ) +add_library( ll::colladadom INTERFACE IMPORTED ) target_include_directories( ll::colladadom SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/collada ${LIBS_PREBUILT_DIR}/include/collada/1.4 diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index fdeb4aa434..8cf450ff21 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -5,7 +5,7 @@ include(GLEXT) include(Prebuilt) include_guard() -create_target(ll::sdl) +add_library( ll::sdl INTERFACE IMPORTED ) if (LINUX) use_prebuilt_binary(SDL) diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake index b614b7304f..599ce02844 100644 --- a/indra/cmake/LibVLCPlugin.cmake +++ b/indra/cmake/LibVLCPlugin.cmake @@ -3,7 +3,7 @@ include(Linking) include(Prebuilt) include_guard() -create_target( ll::libvlc ) +add_library( ll::libvlc INTERFACE IMPORTED ) use_prebuilt_binary(vlc-bin) set(LIBVLCPLUGIN ON CACHE BOOL diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index 7b89e8707f..5a16776e57 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -55,7 +55,7 @@ endif (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release") link_directories(${AUTOBUILD_LIBS_INSTALL_DIRS}) -create_target(ll::oslibraries) +add_library( ll::oslibraries INTERFACE IMPORTED ) if (LINUX) target_link_libraries( ll::oslibraries INTERFACE diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake index 6daf0e0741..b88fbccf2a 100644 --- a/indra/cmake/NDOF.cmake +++ b/indra/cmake/NDOF.cmake @@ -4,7 +4,7 @@ include(Prebuilt) set(NDOF ON CACHE BOOL "Use NDOF space navigator joystick library.") include_guard() -create_target( ll::ndof ) +add_library( ll::ndof INTERFACE IMPORTED ) if (NDOF) if (WINDOWS OR DARWIN) diff --git a/indra/cmake/NGHTTP2.cmake b/indra/cmake/NGHTTP2.cmake index 7e59a7d9a7..2ac204bfcb 100644 --- a/indra/cmake/NGHTTP2.cmake +++ b/indra/cmake/NGHTTP2.cmake @@ -2,7 +2,7 @@ include(Linking) include(Prebuilt) include_guard() -create_target( ll::nghttp2 ) +add_library( ll::nghttp2 INTERFACE IMPORTED ) use_prebuilt_binary(nghttp2) if (WINDOWS) diff --git a/indra/cmake/NVAPI.cmake b/indra/cmake/NVAPI.cmake index b06cc78087..ff5a5428e0 100644 --- a/indra/cmake/NVAPI.cmake +++ b/indra/cmake/NVAPI.cmake @@ -5,7 +5,7 @@ set(NVAPI ON CACHE BOOL "Use NVAPI.") if (NVAPI) if (WINDOWS) - create_target( ll::nvapi ) + add_library( ll::nvapi INTERFACE IMPORTED ) target_link_libraries( ll::nvapi INTERFACE nvapi) use_prebuilt_binary(nvapi) endif (WINDOWS) diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake index faa247769b..84dad367b7 100644 --- a/indra/cmake/OPENAL.cmake +++ b/indra/cmake/OPENAL.cmake @@ -12,7 +12,7 @@ if(OPENAL) endif() if (USE_OPENAL) - create_target( ll::openal ) + add_library( ll::openal INTERFACE IMPORTED ) target_include_directories( ll::openal SYSTEM INTERFACE "${LIBS_PREBUILT_DIR}/include/AL") target_compile_definitions( ll::openal INTERFACE LL_OPENAL=1) use_prebuilt_binary(openal) diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 07dee5c23d..184fbb3c5f 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -2,7 +2,7 @@ include(Prebuilt) include_guard() -create_target( ll::openjpeg ) +add_library( ll::openjpeg INTERFACE IMPORTED ) use_prebuilt_binary(openjpeg) diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake index 6c9abc9e7f..dfc6520362 100644 --- a/indra/cmake/OpenSSL.cmake +++ b/indra/cmake/OpenSSL.cmake @@ -2,7 +2,7 @@ include(Prebuilt) include_guard() -create_target(ll::openssl) +add_library( ll::openssl INTERFACE IMPORTED ) use_prebuilt_binary(openssl) if (WINDOWS) diff --git a/indra/cmake/PNG.cmake b/indra/cmake/PNG.cmake index 5a8d3e197d..672f963ea1 100644 --- a/indra/cmake/PNG.cmake +++ b/indra/cmake/PNG.cmake @@ -2,7 +2,7 @@ include(Prebuilt) include_guard() -create_target(ll::libpng) +add_library( ll::libpng INTERFACE IMPORTED ) use_prebuilt_binary(libpng) if (WINDOWS) diff --git a/indra/cmake/PluginAPI.cmake b/indra/cmake/PluginAPI.cmake index 076598f6cc..114415e514 100644 --- a/indra/cmake/PluginAPI.cmake +++ b/indra/cmake/PluginAPI.cmake @@ -1,6 +1,6 @@ # -*- cmake -*- -create_target( ll::pluginlibraries) +add_library( ll::pluginlibraries INTERFACE IMPORTED ) if (WINDOWS) target_link_libraries( ll::pluginlibraries INTERFACE diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 593eb3958c..f0192ec45b 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -57,7 +57,3 @@ macro (use_prebuilt_binary _binary) endif (NOT ${_binary}_installed EQUAL 0) endmacro (use_prebuilt_binary _binary) -function( create_target name ) - add_library( ${name} INTERFACE IMPORTED ) -endfunction() - diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index c23fb6e8a7..6a2e6f22df 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -6,7 +6,7 @@ if (LINUX) use_prebuilt_binary(gtk-atk-pango-glib) endif (LINUX) -create_target( ll::uilibraries ) +add_library( ll::uilibraries INTERFACE IMPORTED ) if (LINUX) target_link_libraries( ll::uilibraries INTERFACE @@ -68,5 +68,5 @@ target_include_directories( ll::uilibraries SYSTEM INTERFACE #endforeach(include) if (LINUX) - set_target_properties(ll::uilibraries PROPERTIES COMPILE_DEFINITIONS LL_GTK=1 LL_X11=1 ) + target_compile_definitions(ll::uilibraries INTERFACE LL_GTK=1 LL_X11=1 ) endif (LINUX) diff --git a/indra/cmake/URIPARSER.cmake b/indra/cmake/URIPARSER.cmake index 8639eab891..cc181f74f8 100644 --- a/indra/cmake/URIPARSER.cmake +++ b/indra/cmake/URIPARSER.cmake @@ -1,7 +1,7 @@ # -*- cmake -*- include_guard() -create_target( ll::uriparser ) +add_library( ll::uriparser INTERFACE IMPORTED ) include(Prebuilt) diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index aad9d1e476..83f06788f2 100644 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -2,7 +2,7 @@ include(Prebuilt) include_guard() -create_target( ll::xmlrpc-epi ) +add_library( ll::xmlrpc-epi INTERFACE IMPORTED ) use_prebuilt_binary(xmlrpc-epi) target_link_libraries(ll::xmlrpc-epi INTERFACE xmlrpc-epi ) diff --git a/indra/cmake/ZLIBNG.cmake b/indra/cmake/ZLIBNG.cmake index a7779af3cd..221452d9d0 100644 --- a/indra/cmake/ZLIBNG.cmake +++ b/indra/cmake/ZLIBNG.cmake @@ -3,7 +3,7 @@ include(Prebuilt) include_guard() -create_target(ll::zlib-ng) +add_library( ll::zlib-ng INTERFACE IMPORTED ) use_prebuilt_binary(zlib-ng) if (WINDOWS) diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake index 21a6e074fc..f645d9d449 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -10,7 +10,7 @@ else (INSTALL_PROPRIETARY) endif (INSTALL_PROPRIETARY) include_guard() -create_target(ll::bugsplat) +add_library( ll::bugsplat INTERFACE IMPORTED ) if (USE_BUGSPLAT) include(Prebuilt) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 943e621eb8..23714442d5 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1537,7 +1537,7 @@ if (WINDOWS) if (INTEL_MEMOPS_LIBRARY) - create_target( ll::intel_memops ) + add_library( ll::intel_memops INTERFACE IMPORTED ) target_link_libraries( ll::intel_memops ${INTEL_MEMOPS_LIBRARY} ) endif (INTEL_MEMOPS_LIBRARY) -- cgit v1.2.3 From 1966d837e196f1ef043ee46666a9f661d6f54db1 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 02:50:43 +0200 Subject: jsoncpp includepath should not include json/. jsoncpp includes a header "features.h" which has the same name as a glibc header, allowing this header to be found without any prefix will lead to head conflicts when there is a '#include "features.h"' As a result all json headers need to be included via #include "json/reader.h"/"json/writer.h" --- indra/cmake/JsonCpp.cmake | 2 +- indra/llcommon/llsdjson.h | 2 +- indra/llmessage/llcorehttputil.cpp | 4 ++-- indra/newview/llmarketplacefunctions.cpp | 4 ++-- indra/newview/lltranslate.cpp | 2 +- indra/newview/llwebprofile.cpp | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake index 0b6a82e576..e7f7c13134 100644 --- a/indra/cmake/JsonCpp.cmake +++ b/indra/cmake/JsonCpp.cmake @@ -12,4 +12,4 @@ elseif (DARWIN) elseif (LINUX) target_link_libraries( ll::jsoncpp INTERFACE libjson_linux-gcc-4.1.3_libmt.a ) endif (WINDOWS) -target_include_directories( ll::jsoncpp SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/json) +target_include_directories( ll::jsoncpp SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/llcommon/llsdjson.h b/indra/llcommon/llsdjson.h index 2be7112404..e56cf03b45 100644 --- a/indra/llcommon/llsdjson.h +++ b/indra/llcommon/llsdjson.h @@ -34,7 +34,7 @@ #include "stdtypes.h" #include "llsd.h" -#include "value.h" +#include "json/value.h" /// Convert a parsed JSON structure into LLSD maintaining member names and /// array indexes. diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp index 7031f1aa8c..c8c9280029 100644 --- a/indra/llmessage/llcorehttputil.cpp +++ b/indra/llmessage/llcorehttputil.cpp @@ -35,8 +35,8 @@ #include "llsd.h" #include "llsdjson.h" #include "llsdserialize.h" -#include "reader.h" // JSON -#include "writer.h" // JSON +#include "json/reader.h" // JSON +#include "json/writer.h" // JSON #include "llfilesystem.h" #include "message.h" // for getting the port diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index 044c76ce2c..c470cb17af 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -41,8 +41,8 @@ #include "llviewermedia.h" #include "llviewernetwork.h" #include "llviewerregion.h" -#include "reader.h" // JSON -#include "writer.h" // JSON +#include "json/reader.h" // JSON +#include "json/writer.h" // JSON #include "lleventcoro.h" #include "llcoros.h" #include "llcorehttputil.h" diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp index a2c696c762..4b9f322dfa 100644 --- a/indra/newview/lltranslate.cpp +++ b/indra/newview/lltranslate.cpp @@ -36,7 +36,7 @@ #include "llversioninfo.h" #include "llviewercontrol.h" #include "llcoros.h" -#include "reader.h" +#include "json/reader.h" #include "llcorehttputil.h" #include "llurlregistry.h" diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp index ff899fe895..0d553657d8 100644 --- a/indra/newview/llwebprofile.cpp +++ b/indra/newview/llwebprofile.cpp @@ -42,7 +42,7 @@ #include "llcorehttputil.h" // third-party -#include "reader.h" // JSON +#include "json/reader.h" // JSON /* * Workflow: -- cgit v1.2.3 From 54f8d5c380aae8beccf8e445a4911f102d9f49a2 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 03:02:50 +0200 Subject: Bring in first steps of Linux64: - Add the configuratons Release and ReleaseOS - The js files are platform independent, just copy the ones from windows64. --- autobuild.xml | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/autobuild.xml b/autobuild.xml index c1277bf2d3..47da9730bb 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -331,6 +331,16 @@ name windows64 + linux64 + + archive + + hash + ac54672e0b38f52726f5c99047c913e4 + url + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89306/815431/cubemaptoequirectangular-1.1.0-windows64-564841.tar.bz2 + + version 1.1.0 @@ -1143,6 +1153,16 @@ name windows64 + linux64 + + archive + + hash + e70898903475d8ac2e81ff33278fc987 + url + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89309/815433/jpegencoderbasic-1.0-windows64-564842.tar.bz2 + + version 1.0 @@ -2498,6 +2518,16 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors name windows64 + linux64 + + archive + + hash + 46edf0f55417f8ef0d33a5c007bc3644 + url + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89310/815451/threejs-0.132.2-windows64-564843.tar.bz2 + + version 0.132.2 @@ -2937,6 +2967,68 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors name common + linux64 + + build_directory + build-linux-x86_64 + configurations + + Release + + build + + command + ninja + + configure + + arguments + + ../indra + + options + + -G + Ninja + -DLL_TESTS=Off + + + default + True + name + Release + + ReleaseOS + + build + + command + ninja + + configure + + options + + -G + Ninja + -DLL_TESTS=Off + + + name + ReleaseOS + + default + + build + + + name + default + + + name + linux64 + darwin64 build_directory -- cgit v1.2.3 From e743efcc4896c99161cc47adc96379de3ac2d6f3 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 03:05:06 +0200 Subject: - Change OpenAL to OPENAL to match the correct filename, Windows and OSX use case insesitive fielsystem, this is why it was not issues there - Remove input files that are obsolete. --- indra/cmake/Copy3rdPartyLibs.cmake | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index e16e1e5572..1a0f6868fb 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -6,7 +6,7 @@ include(CMakeCopyIfDifferent) include(Linking) -include(OpenAL) +include(OPENAL) include(FMODSTUDIO) # When we copy our dependent libraries, we almost always want to copy them to @@ -219,7 +219,6 @@ elseif(LINUX) libapr-1.so.0 libaprutil-1.so.0 libatk-1.0.so - libdb-5.1.so ${EXPAT_COPY} libfreetype.so.6.6.2 libfreetype.so.6 @@ -227,8 +226,6 @@ elseif(LINUX) libgmodule-2.0.so libgobject-2.0.so libhunspell-1.3.so.0.0.0 - libopenal.so - libopenjpeg.so libuuid.so.16 libuuid.so.16.0.22 libfontconfig.so.1.8.0 -- cgit v1.2.3 From 4416db9a261443f48034a1c0a2457510cffd05b0 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 03:08:46 +0200 Subject: Remvoe -D that had been passed in front of each entry of add_compile_definitions, this lead to '-D-D' --- indra/cmake/00-Common.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 25ab731842..7be5e7b0a0 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -114,11 +114,11 @@ if (LINUX) set(CMAKE_SKIP_RPATH TRUE) add_compile_definitions( - -D_REENTRANT - -D_FORTIFY_SOURCE=2 - -DEXTERNAL_TOS - -DAPPID=secondlife - -DLL_IGNORE_SIGCHLD + _REENTRANT + _FORTIFY_SOURCE=2 + EXTERNAL_TOS + APPID=secondlife + LL_IGNORE_SIGCHLD ) add_compile_options( -fexceptions -- cgit v1.2.3 From d65a5832bfb1b35e22ee9ae14a4f00034c7cf2dd Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 03:10:02 +0200 Subject: ll::sdl had a wrong include directory. --- indra/cmake/LLWindow.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index 8cf450ff21..777acb19a7 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -9,7 +9,7 @@ add_library( ll::sdl INTERFACE IMPORTED ) if (LINUX) use_prebuilt_binary(SDL) - target_include_directories( ll::sdl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/i686-linux) + target_include_directories( ll::sdl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) target_link_libraries( ll::sdl INTERFACE SDL directfb fusion direct X11) target_compile_definitions( ll::sdl INTERFACE LL_SDL=1) endif (LINUX) -- cgit v1.2.3 From a9f4e88a30ada36b098f0d43e7a652ab4df7a0d9 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 03:10:54 +0200 Subject: Introduce ll::fontconfig target (missing the correct link library, but at least this gets us compiling) --- indra/cmake/ViewerMiscLibs.cmake | 1 + indra/llwindow/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index 1dff854855..7b5c990094 100644 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -4,6 +4,7 @@ include(Prebuilt) if (LINUX) use_prebuilt_binary(libuuid) use_prebuilt_binary(fontconfig) + add_library( ll::fontconfig INTERFACE IMPORTED ) endif (LINUX) use_prebuilt_binary(libhunspell) use_prebuilt_binary(slvoice) diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index 826edf31cf..dfa511e6ec 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -16,7 +16,7 @@ include(LLCommon) include(LLImage) include(LLWindow) include(UI) - +include(ViewerMiscLibs) set(llwindow_SOURCE_FILES llcursortypes.cpp -- cgit v1.2.3 From defdbaf40d7a2621d36df8efa07157f71e91baa5 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 03:12:19 +0200 Subject: Fixup for Linux media plugins. - Remove VLC - Remove missing cmake includes (that got deleted in earlier changes) from gstreamer plugin. --- indra/media_plugins/CMakeLists.txt | 1 - indra/media_plugins/gstreamer010/CMakeLists.txt | 4 ---- 2 files changed, 5 deletions(-) diff --git a/indra/media_plugins/CMakeLists.txt b/indra/media_plugins/CMakeLists.txt index 1a5cc8ec9a..9e24e7acf9 100644 --- a/indra/media_plugins/CMakeLists.txt +++ b/indra/media_plugins/CMakeLists.txt @@ -4,7 +4,6 @@ add_subdirectory(base) if (LINUX) add_subdirectory(gstreamer010) - add_subdirectory(libvlc) add_subdirectory(example) endif (LINUX) diff --git a/indra/media_plugins/gstreamer010/CMakeLists.txt b/indra/media_plugins/gstreamer010/CMakeLists.txt index c66b5d0d2e..3b5debc585 100644 --- a/indra/media_plugins/gstreamer010/CMakeLists.txt +++ b/indra/media_plugins/gstreamer010/CMakeLists.txt @@ -5,18 +5,14 @@ project(media_plugin_gstreamer010) include(00-Common) include(LLCommon) include(LLImage) -include(LLPlugin) include(LLMath) -include(LLRender) include(LLWindow) include(Linking) include(PluginAPI) -include(MediaPluginBase) include(OpenGL) include(GStreamer010Plugin) - ### media_plugin_gstreamer010 if(NOT ADDRESS_SIZE EQUAL 32) -- cgit v1.2.3 From e1802784773bc6e6031490063f858bde74131389 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 03:13:39 +0200 Subject: zlib-ng for Linux is still broken. This needs revisiting, but at least gets up compiling for now. --- indra/cmake/ZLIBNG.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/cmake/ZLIBNG.cmake b/indra/cmake/ZLIBNG.cmake index 221452d9d0..a1a1860bc6 100644 --- a/indra/cmake/ZLIBNG.cmake +++ b/indra/cmake/ZLIBNG.cmake @@ -11,4 +11,7 @@ if (WINDOWS) else() target_link_libraries( ll::zlib-ng INTERFACE z ) endif (WINDOWS) -target_include_directories( ll::zlib-ng SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/zlib-ng) + +if( NOT LINUX ) + target_include_directories( ll::zlib-ng SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/zlib-ng) +endif() -- cgit v1.2.3 From 5aa81b16598044909e51ab8f50663a05f701e127 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 03:14:49 +0200 Subject: Remove obsolete targets and dependencies. --- indra/CMakeLists.txt | 1 - indra/newview/CMakeLists.txt | 7 +++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 138a4504e4..40ba284d30 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -70,7 +70,6 @@ if (LINUX) include(LLAppearanceUtility) add_subdirectory(${LLAPPEARANCEUTILITY_SRC_DIR} ${LLAPPEARANCEUTILITY_BIN_DIR}) endif (INSTALL_PROPRIETARY) - add_dependencies(viewer linux-crash-logger-strip-target) elseif (WINDOWS) # cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake if (EXISTS ${VIEWER_DIR}win_setup) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 23714442d5..44ad6313fc 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1939,13 +1939,12 @@ if (LINUX) ${VIEWER_BINARY_NAME} SLPlugin media_plugin_gstreamer010 - media_plugin_libvlc llcommon ) - if (NOT USE_BUGSPLAT) - LIST(APPEND COPY_INPUT_DEPENDENCIES linux-crash-logger) - endif (NOT USE_BUGSPLAT) + #if (NOT USE_BUGSPLAT) + # LIST(APPEND COPY_INPUT_DEPENDENCIES linux-crash-logger) + #endif (NOT USE_BUGSPLAT) add_custom_command( OUTPUT ${product}.tar.bz2 -- cgit v1.2.3 From 98ef2494705aeecf636ae4733dcee04cf23297d7 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 03:42:26 +0200 Subject: Need to use list( APPEND ... to append to a list. --- indra/llwindow/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index dfa511e6ec..c86b252994 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -58,7 +58,7 @@ set(llwindow_LINK_LIBRARIES # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level if (LINUX) - set(llwindow_LINK_LIBRARIES APPEND + list( APPEND llwindow_LINK_LIBRARIES ll::uilibraries ll::sdl ll::fontconfig # For FCInit and other FC* functions. -- cgit v1.2.3 From da24787167764f689ce1ea5904bf3047c2264f72 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 03:43:42 +0200 Subject: Enable LL_OS_DRAGDROP_ENABLED for Linux --- indra/cmake/DragDrop.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/cmake/DragDrop.cmake b/indra/cmake/DragDrop.cmake index cbbf5747a7..26e7828830 100644 --- a/indra/cmake/DragDrop.cmake +++ b/indra/cmake/DragDrop.cmake @@ -10,7 +10,7 @@ if (OS_DRAG_DROP) add_definitions(-DLL_OS_DRAGDROP_ENABLED=1) endif (DARWIN) if (LINUX) - add_definitions(-DLL_OS_DRAGDROP_ENABLED=0) + add_definitions(-DLL_OS_DRAGDROP_ENABLED=1) endif (LINUX) endif (OS_DRAG_DROP) -- cgit v1.2.3 From 7a66e77694743c5806c1c161b5764e1e3dda9153 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 03:44:09 +0200 Subject: Remove some remnants of breakpad. --- indra/llcommon/llapp.cpp | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index 8ddd132793..3ff8d16bbb 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -68,10 +68,6 @@ void setup_signals(); void default_unix_signal_handler(int signum, siginfo_t *info, void *); #if LL_LINUX -#include "google_breakpad/minidump_descriptor.h" -static bool unix_minidump_callback(const google_breakpad::MinidumpDescriptor& minidump_desc, - void* context, - bool succeeded); #else // Called by breakpad exception handler after the minidump has been generated. bool unix_post_minidump_callback(const char *dump_dir, @@ -856,47 +852,8 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *) } #if LL_LINUX -bool unix_minidump_callback(const google_breakpad::MinidumpDescriptor& minidump_desc, void* context, bool succeeded) -{ - // Copy minidump file path into fixed buffer in the app instance to avoid - // heap allocations in a crash handler. - - // path format: /.dmp - - //HACK: *path points to the buffer in getMiniDumpFilename which has already allocated space - //to avoid doing allocation during crash. - char * path = LLApp::instance()->getMiniDumpFilename(); - int dir_path_len = strlen(path); - - // The path must not be truncated. - S32 remaining = LLApp::MAX_MINDUMP_PATH_LENGTH - dir_path_len; - - llassert( (remaining - strlen(minidump_desc.path())) > 5); - - path += dir_path_len; - - if (dir_path_len > 0 && path[-1] != '/') - { - *path++ = '/'; - --remaining; - } - - strncpy(path, minidump_desc.path(), remaining); - - LL_INFOS("CRASHREPORT") << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << LL_ENDL; - LLApp::runErrorHandler(); - -#ifndef LL_RELEASE_FOR_DOWNLOAD - clear_signals(); - return false; -#else - return true; #endif -} -#endif - - bool unix_post_minidump_callback(const char *dump_dir, const char *minidump_id, void *context, bool succeeded) -- cgit v1.2.3 From 7038e3e3586505d7f13f3125578572104c0f2cca Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 16:46:59 +0200 Subject: Use correct type --- indra/llrender/llglslshader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 4351f6e2c8..00fd4a8eec 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -277,10 +277,10 @@ void LLGLSLShader::readProfileQuery(U32 count, U32 mode) glEndQueryARB(GL_TIME_ELAPSED); glEndQueryARB(GL_SAMPLES_PASSED); - U64 time_elapsed = 0; + GLuint64 time_elapsed = 0; glGetQueryObjectui64v(mTimerQuery, GL_QUERY_RESULT, &time_elapsed); - U64 samples_passed = 0; + GLuint64 samples_passed = 0; glGetQueryObjectui64v(mSamplesQuery, GL_QUERY_RESULT, &samples_passed); sTotalTimeElapsed += time_elapsed; -- cgit v1.2.3 From b532c2986b7d47b2f0fe75690ceb8bc2183a30a9 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 16:47:54 +0200 Subject: Add argument missing from implementation --- indra/newview/llfilepicker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 3669fb1eeb..24c2a4bf74 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -1423,7 +1423,7 @@ BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking) // Hacky stubs designed to facilitate fake getSaveFile and getOpenFile with // static results, when we don't have a real filepicker. -BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename ) +BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking ) { // if local file browsing is turned off, return without opening dialog // (Even though this is a stub, I think we still should not return anything at all) -- cgit v1.2.3 From 46402bd527e56cf7bc071892c4dd807903a3dc00 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 16:48:39 +0200 Subject: Correctio for preproc #else --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e01d713501..2e72e133a5 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -303,7 +303,7 @@ S32 gLastExecDuration = -1; // (<0 indicates unknown) # define LL_PLATFORM_KEY "mac" #elif LL_LINUX # define LL_PLATFORM_KEY "lnx" -else +#else # error "Unknown Platform" #endif const char* gPlatform = LL_PLATFORM_KEY; -- cgit v1.2.3 From bacbf1ffe6c111ad1cc03a20922b00224553cb93 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 16:49:17 +0200 Subject: ASN1_STRING_data is depreacted. --- indra/newview/llsechandler_basic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index 6b06abaf99..89c2540bb9 100644 --- a/indra/newview/llsechandler_basic.cpp +++ b/indra/newview/llsechandler_basic.cpp @@ -355,7 +355,7 @@ LLSD cert_name_from_X509_NAME(X509_NAME* name) char buffer[32]; X509_NAME_ENTRY *entry = X509_NAME_get_entry(name, entry_index); - std::string name_value = std::string((const char*)ASN1_STRING_data(X509_NAME_ENTRY_get_data(entry)), + std::string name_value = std::string((const char*)ASN1_STRING_get0_data(X509_NAME_ENTRY_get_data(entry)), ASN1_STRING_length(X509_NAME_ENTRY_get_data(entry))); ASN1_OBJECT* name_obj = X509_NAME_ENTRY_get_object(entry); -- cgit v1.2.3 From 29ca8560381424adcee2f096de0e940b3d1f46b0 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 16:50:17 +0200 Subject: llrender does not need a dependency on sdl. There was some comment out code which suggests it was needed long ago. --- indra/llrender/CMakeLists.txt | 1 - indra/llrender/llfontregistry.cpp | 2 +- indra/llrender/llglheaders.h | 5 ----- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt index db672303be..bb22a969f5 100644 --- a/indra/llrender/CMakeLists.txt +++ b/indra/llrender/CMakeLists.txt @@ -100,7 +100,6 @@ target_link_libraries(llrender llfilesystem llxml llwindow - ll::sdl ll::freetype OpenGL::GL OpenGL::GLU diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp index 33a33af160..ef4cf15149 100644 --- a/indra/llrender/llfontregistry.cpp +++ b/indra/llrender/llfontregistry.cpp @@ -239,7 +239,7 @@ std::string currentOsName() return "Windows"; #elif LL_DARWIN return "Mac"; -#elif LL_SDL || LL_MESA_HEADLESS +#elif LL_LINUX return "Linux"; #else return ""; diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h index 6bca3623e0..5410cf483a 100644 --- a/indra/llrender/llglheaders.h +++ b/indra/llrender/llglheaders.h @@ -59,11 +59,6 @@ # include "GL/glh_extensions.h" # undef __APPLE__ -/* Although SDL very likely ends up calling glXGetProcAddress() itself, - if we use SDL_GL_GetProcAddress() then we get bogus addresses back on - some systems. Weird. */ -/*# include "SDL/SDL.h" - # define GLH_EXT_GET_PROC_ADDRESS(p) SDL_GL_GetProcAddress(p) */ #define GLX_GLXEXT_PROTOTYPES 1 # include "GL/glx.h" # include "GL/glxext.h" -- cgit v1.2.3 From 9bbd0387332dd878a51271b654079263cfeee7b8 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 16:52:39 +0200 Subject: in case of systemlibs (conan right now), xmlrpc header structure is slightly different. --- indra/llmessage/llfiltersd2xmlrpc.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/llmessage/llfiltersd2xmlrpc.cpp b/indra/llmessage/llfiltersd2xmlrpc.cpp index d3e195789b..64792bd628 100644 --- a/indra/llmessage/llfiltersd2xmlrpc.cpp +++ b/indra/llmessage/llfiltersd2xmlrpc.cpp @@ -75,7 +75,13 @@ #include #include + +#ifdef LL_USESYSTEMLIBS +#include +#else #include +#endif + #include "apr_base64.h" #include "llbuffer.h" -- cgit v1.2.3 From 51e54377212cabc7b2eff84a4531ec690e644069 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 16:53:36 +0200 Subject: Use correct namespace for bind, must be phoenix::bind or there is confusion with boost::bind --- indra/llmath/llcalcparser.h | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/indra/llmath/llcalcparser.h b/indra/llmath/llcalcparser.h index e2388d6702..dff5bf3af3 100644 --- a/indra/llmath/llcalcparser.h +++ b/indra/llmath/llcalcparser.h @@ -81,28 +81,28 @@ struct LLCalcParser : grammar ; unary_func = - ((str_p("SIN") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_sin)(self,arg1)]) | - (str_p("COS") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_cos)(self,arg1)]) | - (str_p("TAN") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_tan)(self,arg1)]) | - (str_p("ASIN") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_asin)(self,arg1)]) | - (str_p("ACOS") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_acos)(self,arg1)]) | - (str_p("ATAN") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_atan)(self,arg1)]) | - (str_p("SQRT") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_sqrt)(self,arg1)]) | - (str_p("LOG") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_log)(self,arg1)]) | - (str_p("EXP") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_exp)(self,arg1)]) | - (str_p("ABS") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_fabs)(self,arg1)]) | - (str_p("FLR") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_floor)(self,arg1)]) | - (str_p("CEIL") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_ceil)(self,arg1)]) + ((str_p("SIN") >> '(' >> expression[unary_func.value = phoenix::bind(&LLCalcParser::_sin)(self,arg1)]) | + (str_p("COS") >> '(' >> expression[unary_func.value = phoenix::bind(&LLCalcParser::_cos)(self,arg1)]) | + (str_p("TAN") >> '(' >> expression[unary_func.value = phoenix::bind(&LLCalcParser::_tan)(self,arg1)]) | + (str_p("ASIN") >> '(' >> expression[unary_func.value = phoenix::bind(&LLCalcParser::_asin)(self,arg1)]) | + (str_p("ACOS") >> '(' >> expression[unary_func.value = phoenix::bind(&LLCalcParser::_acos)(self,arg1)]) | + (str_p("ATAN") >> '(' >> expression[unary_func.value = phoenix::bind(&LLCalcParser::_atan)(self,arg1)]) | + (str_p("SQRT") >> '(' >> expression[unary_func.value = phoenix::bind(&LLCalcParser::_sqrt)(self,arg1)]) | + (str_p("LOG") >> '(' >> expression[unary_func.value = phoenix::bind(&LLCalcParser::_log)(self,arg1)]) | + (str_p("EXP") >> '(' >> expression[unary_func.value = phoenix::bind(&LLCalcParser::_exp)(self,arg1)]) | + (str_p("ABS") >> '(' >> expression[unary_func.value = phoenix::bind(&LLCalcParser::_fabs)(self,arg1)]) | + (str_p("FLR") >> '(' >> expression[unary_func.value = phoenix::bind(&LLCalcParser::_floor)(self,arg1)]) | + (str_p("CEIL") >> '(' >> expression[unary_func.value = phoenix::bind(&LLCalcParser::_ceil)(self,arg1)]) ) >> assert_syntax(ch_p(')')) ; binary_func = ((str_p("ATAN2") >> '(' >> expression[binary_func.value = arg1] >> ',' >> - expression[binary_func.value = bind(&LLCalcParser::_atan2)(self, binary_func.value, arg1)]) | + expression[binary_func.value = phoenix::bind(&LLCalcParser::_atan2)(self, binary_func.value, arg1)]) | (str_p("MIN") >> '(' >> expression[binary_func.value = arg1] >> ',' >> - expression[binary_func.value = bind(&LLCalcParser::_min)(self, binary_func.value, arg1)]) | + expression[binary_func.value = phoenix::bind(&LLCalcParser::_min)(self, binary_func.value, arg1)]) | (str_p("MAX") >> '(' >> expression[binary_func.value = arg1] >> ',' >> - expression[binary_func.value = bind(&LLCalcParser::_max)(self, binary_func.value, arg1)]) + expression[binary_func.value = phoenix::bind(&LLCalcParser::_max)(self, binary_func.value, arg1)]) ) >> assert_syntax(ch_p(')')) ; @@ -118,10 +118,10 @@ struct LLCalcParser : grammar // Lookup throws an Unknown Symbol error if it is unknown, while this works fine, // would be "neater" to handle symbol lookup from here with an assertive parser. // constants_p[factor.value = arg1]| - identifier[factor.value = bind(&LLCalcParser::lookup)(self, arg1, arg2)] + identifier[factor.value = phoenix::bind(&LLCalcParser::lookup)(self, arg1, arg2)] ) >> // Detect and throw math errors. - assert_domain(eps_p(bind(&LLCalcParser::checkNaN)(self, factor.value))) + assert_domain(eps_p(phoenix::bind(&LLCalcParser::checkNaN)(self, factor.value))) ; unary_expr = @@ -131,14 +131,14 @@ struct LLCalcParser : grammar power = unary_expr[power.value = arg1] >> - *('^' >> assert_syntax(unary_expr[power.value = bind(&powf)(power.value, arg1)])) + *('^' >> assert_syntax(unary_expr[power.value = phoenix::bind(&powf)(power.value, arg1)])) ; term = power[term.value = arg1] >> *(('*' >> assert_syntax(power[term.value *= arg1])) | ('/' >> assert_syntax(power[term.value /= arg1])) | - ('%' >> assert_syntax(power[term.value = bind(&fmodf)(term.value, arg1)])) + ('%' >> assert_syntax(power[term.value = phoenix::bind(&fmodf)(term.value, arg1)])) ) ; -- cgit v1.2.3 From 0319ed661159d32e92bf2071aa379b052798448e Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 17:05:31 +0200 Subject: Another instance where LLFilePicker::getSaveFile had the wrong number of arguments. --- indra/newview/llfilepicker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 24c2a4bf74..5a4c8619c7 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -1206,7 +1206,7 @@ static std::string add_save_texture_filter_to_gtkchooser(GtkWindow *picker) return caption; } -BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename ) +BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking ) { BOOL rtn = FALSE; -- cgit v1.2.3 From dcfb94fbaca3c66ec02e6873cda53b4afd547beb Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 18:05:37 +0200 Subject: - More include changes for xmlrpc.h - New versions of curl have the same value for CURLE_SSL_PEER_CERTIFICATE and CURLE_SSL_CACERT --- indra/newview/llxmlrpclistener.cpp | 8 ++++++++ indra/newview/llxmlrpctransaction.cpp | 8 +++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp index 4401f61059..b816f9a3b5 100644 --- a/indra/newview/llxmlrpclistener.cpp +++ b/indra/newview/llxmlrpclistener.cpp @@ -38,7 +38,13 @@ // external library headers #include #include // boost::begin(), boost::end() + +#ifdef LL_USESYSTEMLIBS +#include +#else #include +#endif + #include "curl/curl.h" // other Linden headers @@ -343,7 +349,9 @@ public: switch (curlcode) { +#if CURLE_SSL_PEER_CERTIFICATE != CURLE_SSL_CACERT case CURLE_SSL_PEER_CERTIFICATE: +#endif case CURLE_SSL_CACERT: data["certificate"] = mTransaction->getErrorCertData(); break; diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index 32c8ce66a0..87c3569912 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -43,7 +43,12 @@ #include "llviewercontrol.h" // Have to include these last to avoid queue redefinition! + +#ifdef LL_USESYSTEMLIBS +#include +#else #include +#endif #include "llappviewer.h" #include "lltrans.h" @@ -498,10 +503,11 @@ void LLXMLRPCTransaction::Impl::setHttpStatus(const LLCore::HttpStatus &status) message = LLTrans::getString("couldnt_resolve_host", args); break; +#if CURLE_SSL_PEER_CERTIFICATE != CURLE_SSL_CACERT case CURLE_SSL_PEER_CERTIFICATE: message = LLTrans::getString("ssl_peer_certificate"); break; - +#endif case CURLE_SSL_CACERT: case CURLE_SSL_CONNECT_ERROR: message = LLTrans::getString("ssl_connect_error"); -- cgit v1.2.3 From 2b151e0aefd54671e1be504269f10318d303dccb Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 18 Apr 2022 18:11:43 +0200 Subject: Round one to support conan for 3P packages, this allows to build the viewer on Linux again. --- indra/CMakeLists.txt | 12 ++++++++- indra/cmake/APR.cmake | 2 ++ indra/cmake/Audio.cmake | 1 + indra/cmake/Boost.cmake | 6 +++++ indra/cmake/CURL.cmake | 1 + indra/cmake/Copy3rdPartyLibs.cmake | 36 ++++++++++++++----------- indra/cmake/DBusGlib.cmake | 25 ++++++----------- indra/cmake/EXPAT.cmake | 1 + indra/cmake/FreeType.cmake | 1 + indra/cmake/GLEXT.cmake | 5 +++- indra/cmake/GLH.cmake | 3 +++ indra/cmake/GLOD.cmake | 1 + indra/cmake/GStreamer010Plugin.cmake | 34 +++++------------------ indra/cmake/GoogleMock.cmake | 6 ++++- indra/cmake/Hunspell.cmake | 2 +- indra/cmake/JPEG.cmake | 11 ++++---- indra/cmake/JsonCpp.cmake | 2 ++ indra/cmake/LLPrimitive.cmake | 20 ++++++++++---- indra/cmake/LLWindow.cmake | 13 ++++++--- indra/cmake/NGHTTP2.cmake | 1 + indra/cmake/OpenJPEG.cmake | 1 + indra/cmake/OpenSSL.cmake | 1 + indra/cmake/PNG.cmake | 1 + indra/cmake/Prebuilt.cmake | 13 +++++++++ indra/cmake/UI.cmake | 15 ++++++----- indra/cmake/URIPARSER.cmake | 5 +++- indra/cmake/ViewerMiscLibs.cmake | 15 ++++++++--- indra/cmake/XmlRpcEpi.cmake | 2 ++ indra/cmake/ZLIBNG.cmake | 5 ++++ indra/llimage/CMakeLists.txt | 2 +- indra/llprimitive/CMakeLists.txt | 2 ++ indra/llwindow/CMakeLists.txt | 7 ++--- indra/media_plugins/CMakeLists.txt | 2 +- indra/media_plugins/gstreamer010/CMakeLists.txt | 1 + indra/newview/CMakeLists.txt | 2 +- 35 files changed, 163 insertions(+), 94 deletions(-) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 40ba284d30..aa0b645a64 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -12,7 +12,15 @@ set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING "The root project/makefile/solution name. Defaults to SecondLife.") project(${ROOT_PROJECT_NAME}) -set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_CURRENT_BINARY_DIR}") + + +include(conanbuildinfo OPTIONAL RESULT_VARIABLE USE_CONAN ) +if( USE_CONAN ) + conan_basic_setup(TARGETS) + add_compile_definitions(LL_USESYSTEMLIBS USE_CONAN) +endif() + set(CXX_STANDARD 14) include(Variables) @@ -57,8 +65,10 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llplugin) add_subdirectory(${LIBS_OPEN_PREFIX}llui) add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components) +if( LL_TESTS ) # Legacy C++ tests. Build always, run if LL_TESTS is true. add_subdirectory(${VIEWER_PREFIX}test) +endif() if (ENABLE_MEDIA_PLUGINS) # viewer media plugins diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index 1c635d4531..898979c47e 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -5,7 +5,9 @@ include_guard() add_library( ll::apr INTERFACE IMPORTED ) +use_conan_binary( apr apr-util ) use_prebuilt_binary(apr_suite) + if (WINDOWS) if (LLCOMMON_LINK_SHARED) set(APR_selector "lib") diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake index ddba066727..4b06de0a08 100644 --- a/indra/cmake/Audio.cmake +++ b/indra/cmake/Audio.cmake @@ -4,6 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::vorbis INTERFACE IMPORTED ) +use_conan_binary(vorbis) use_prebuilt_binary(ogg_vorbis) target_include_directories( ll::vorbis SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index f4f824769e..601a23a86d 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -2,7 +2,13 @@ include(Prebuilt) include_guard() + add_library( ll::boost INTERFACE IMPORTED ) +if( USE_CONAN ) + target_link_libraries( ll::boost INTERFACE CONAN_PKG::boost ) + target_compile_definitions( ll::boost INTERFACE BOOST_ALLOW_DEPRECATED_HEADERS BOOST_BIND_GLOBAL_PLACEHOLDERS ) + return() +endif() use_prebuilt_binary(boost) diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index e8b04177c1..7c93819e75 100644 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -4,6 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::libcurl INTERFACE IMPORTED ) +use_conan_binary(libcurl) use_prebuilt_binary(curl) if (WINDOWS) target_link_libraries(ll::libcurl INTERFACE libcurl.lib) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 1a0f6868fb..f6e224665b 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -216,22 +216,28 @@ elseif(LINUX) set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}") # *FIX - figure out what to do with duplicate libalut.so here -brad set(release_files - libapr-1.so.0 - libaprutil-1.so.0 - libatk-1.0.so - ${EXPAT_COPY} - libfreetype.so.6.6.2 - libfreetype.so.6 - libGLOD.so - libgmodule-2.0.so - libgobject-2.0.so - libhunspell-1.3.so.0.0.0 - libuuid.so.16 - libuuid.so.16.0.22 - libfontconfig.so.1.8.0 - libfontconfig.so.1 - ) + ${EXPAT_COPY} + ) + if( NOT USE_CONAN ) + list( APPEND release_files + libapr-1.so.0 + libaprutil-1.so.0 + libatk-1.0.so + libfreetype.so.6.6.2 + libfreetype.so.6 + libGLOD.so + libhunspell-1.3.so.0.0.0 + libuuid.so.16 + libuuid.so.16.0.22 + libfontconfig.so.1.8.0 + libfontconfig.so.1 + libgmodule-2.0.so + libgobject-2.0.so + ) + endif() + + if (TARGET ll::fmodstudio) set(debug_files ${debug_files} "libfmodL.so") set(release_files ${release_files} "libfmod.so") diff --git a/indra/cmake/DBusGlib.cmake b/indra/cmake/DBusGlib.cmake index 7c95bf8c20..ce5d10be5c 100644 --- a/indra/cmake/DBusGlib.cmake +++ b/indra/cmake/DBusGlib.cmake @@ -1,22 +1,13 @@ # -*- cmake -*- include(Prebuilt) -use_prebuilt_binary(dbus_glib) -set(DBUSGLIB_FOUND ON FORCE BOOL) -set(DBUSGLIB_INCLUDE_DIRS - ${LIBS_PREBUILT_DIR}/include/dbus - ) -# We don't need to explicitly link against dbus-glib itself, because -# the viewer probes for the system's copy at runtime. -set(DBUSGLIB_LIBRARIES - gobject-2.0 - glib-2.0 - ) +add_library( ll::dbus INTERFACE IMPORTED) + +# Only define this when using conan, lls prebuild is brokenb +if( USE_CONAN ) + target_compile_definitions( ll::dbus INTERFACE LL_DBUS_ENABLED ) +endif() +use_conan_binary(dbus) -if (DBUSGLIB_FOUND) - set(DBUSGLIB ON CACHE BOOL "Build with dbus-glib message bus support.") -endif (DBUSGLIB_FOUND) +use_prebuilt_binary(dbus_glib) -if (DBUSGLIB) - add_definitions(-DLL_DBUS_ENABLED=1) -endif (DBUSGLIB) diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake index 8a48908401..e5c9dd5582 100644 --- a/indra/cmake/EXPAT.cmake +++ b/indra/cmake/EXPAT.cmake @@ -4,6 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::expat INTERFACE IMPORTED ) +use_conan_binary(expat) use_prebuilt_binary(expat) if (WINDOWS) target_link_libraries( ll::expat INTERFACE libexpatMT ) diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake index 1974e2879e..92130402f9 100644 --- a/indra/cmake/FreeType.cmake +++ b/indra/cmake/FreeType.cmake @@ -4,6 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::freetype INTERFACE IMPORTED ) +use_conan_binary(freetype) use_prebuilt_binary(freetype) target_include_directories( ll::freetype SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/freetype2/) target_link_libraries( ll::freetype INTERFACE freetype ) diff --git a/indra/cmake/GLEXT.cmake b/indra/cmake/GLEXT.cmake index f6c39fe137..70477cf0af 100644 --- a/indra/cmake/GLEXT.cmake +++ b/indra/cmake/GLEXT.cmake @@ -1,8 +1,11 @@ # -*- cmake -*- include(Prebuilt) +include(GLH) +add_library( ll::glext INTERFACE IMPORTED ) if (WINDOWS OR LINUX) + use_conan_binary(glext) use_prebuilt_binary(glext) endif (WINDOWS OR LINUX) -use_prebuilt_binary(glh_linear) + diff --git a/indra/cmake/GLH.cmake b/indra/cmake/GLH.cmake index b420ad413f..18521b5069 100644 --- a/indra/cmake/GLH.cmake +++ b/indra/cmake/GLH.cmake @@ -1,4 +1,7 @@ # -*- cmake -*- include(Prebuilt) +add_library( ll::glh_linear INTERFACE IMPORTED ) + +use_conan_binary( glh_linear ) use_prebuilt_binary(glh_linear) diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake index db00a309f0..61c0c166d4 100644 --- a/indra/cmake/GLOD.cmake +++ b/indra/cmake/GLOD.cmake @@ -4,6 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::glod INTERFACE IMPORTED ) +use_conan_binary(glod) use_prebuilt_binary(glod) target_include_directories( ll::glod SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/GStreamer010Plugin.cmake b/indra/cmake/GStreamer010Plugin.cmake index 848d4f7fc6..0b6a7a21c3 100644 --- a/indra/cmake/GStreamer010Plugin.cmake +++ b/indra/cmake/GStreamer010Plugin.cmake @@ -1,32 +1,12 @@ # -*- cmake -*- include(Prebuilt) -if (LINUX) - use_prebuilt_binary(gstreamer) - # possible libxml2 should have its own .cmake file instead - use_prebuilt_binary(libxml2) - set(GSTREAMER010_FOUND ON FORCE BOOL) - set(GSTREAMER010_PLUGINS_BASE_FOUND ON FORCE BOOL) - set(GSTREAMER010_INCLUDE_DIRS - ${LIBS_PREBUILT_DIR}/include/gstreamer-0.10 - ${LIBS_PREBUILT_DIR}/include/glib-2.0 - ${LIBS_PREBUILT_DIR}/include/libxml2 - ) - # We don't need to explicitly link against gstreamer itself, because - # LLMediaImplGStreamer probes for the system's copy at runtime. - set(GSTREAMER010_LIBRARIES - gobject-2.0 - gmodule-2.0 - dl - gthread-2.0 - glib-2.0 - ) -endif () +if (NOT LINUX) + return() +endif() -if (GSTREAMER010_FOUND AND GSTREAMER010_PLUGINS_BASE_FOUND) - set(GSTREAMER010 ON CACHE BOOL "Build with GStreamer-0.10 streaming media support.") -endif (GSTREAMER010_FOUND AND GSTREAMER010_PLUGINS_BASE_FOUND) +add_library( ll::gstreamer INTERFACE IMPORTED ) +target_compile_definitions( ll::gstreamer INTERFACE LL_GSTREAMER010_ENABLED=1) +use_conan_binary(gstreamer) -if (GSTREAMER010) - add_definitions(-DLL_GSTREAMER010_ENABLED=1) -endif (GSTREAMER010) +use_prebuilt_binary(gstreamer) diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake index 2036e43dd0..753b972e95 100644 --- a/indra/cmake/GoogleMock.cmake +++ b/indra/cmake/GoogleMock.cmake @@ -4,9 +4,13 @@ include(Linking) include_guard() -use_prebuilt_binary(googlemock) +if(USE_CONAN) + return() +endif() add_library( ll::googlemock INTERFACE IMPORTED ) +use_prebuilt_binary(googlemock) + target_include_directories( ll::googlemock SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake index 7786418226..c372d83f8d 100644 --- a/indra/cmake/Hunspell.cmake +++ b/indra/cmake/Hunspell.cmake @@ -3,7 +3,7 @@ include(Prebuilt) include_guard() add_library( ll::hunspell INTERFACE IMPORTED ) - +use_conan_binary(hunspell) use_prebuilt_binary(libhunspell) if (WINDOWS) target_link_libraries( ll::hunspell INTERFACE libhunspell) diff --git a/indra/cmake/JPEG.cmake b/indra/cmake/JPEG.cmake index a6ef5d4ad9..900fc77c40 100644 --- a/indra/cmake/JPEG.cmake +++ b/indra/cmake/JPEG.cmake @@ -4,14 +4,15 @@ include(Prebuilt) include(Linking) include_guard() -add_library( ll::jpeglib INTERFACE IMPORTED ) +add_library( ll::libjpeg INTERFACE IMPORTED ) +use_conan_binary(libjpeg) use_prebuilt_binary(jpeglib) if (LINUX) - target_link_libraries( ll::jpeglib INTERFACE jpeg) + target_link_libraries( ll::libjpeg INTERFACE jpeg) elseif (DARWIN) - target_link_libraries( ll::jpeglib INTERFACE jpeg) + target_link_libraries( ll::libjpeg INTERFACE jpeg) elseif (WINDOWS) - target_link_libraries( ll::jpeglib INTERFACE jpeglib) + target_link_libraries( ll::libjpeg INTERFACE jpeglib) endif (LINUX) -target_include_directories( ll::jpeglib SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) +target_include_directories( ll::libjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake index e7f7c13134..f62b2bdd7a 100644 --- a/indra/cmake/JsonCpp.cmake +++ b/indra/cmake/JsonCpp.cmake @@ -4,6 +4,8 @@ include(Prebuilt) include_guard() add_library( ll::jsoncpp INTERFACE IMPORTED ) +use_conan_binary(jsoncpp) + use_prebuilt_binary(jsoncpp) if (WINDOWS) target_link_libraries( ll::jsoncpp INTERFACE json_libmd.lib ) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index e643243fca..3e5ff4963b 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -6,29 +6,39 @@ include(Boost) include_guard() +add_library( ll::pcre INTERFACE IMPORTED ) +add_library( ll::minizip-ng INTERFACE IMPORTED ) +add_library( ll::libxml INTERFACE IMPORTED ) +add_library( ll::colladadom INTERFACE IMPORTED ) + +# ND, needs fixup in collada conan pkg +if( USE_CONAN ) + target_include_directories( ll::colladadom SYSTEM INTERFACE + "${CONAN_INCLUDE_DIRS_COLLADADOM}/collada-dom/" + "${CONAN_INCLUDE_DIRS_COLLADADOM}/collada-dom/1.4/" ) +endif() + +use_conan_binary( colladadom ) + use_prebuilt_binary(colladadom) use_prebuilt_binary(minizip-ng) # needed for colladadom use_prebuilt_binary(pcre) use_prebuilt_binary(libxml2) -add_library( ll::pcre INTERFACE IMPORTED ) target_link_libraries( ll::pcre INTERFACE pcrecpp pcre ) -add_library( ll::minizip-ng INTERFACE IMPORTED ) if (WINDOWS) target_link_libraries( ll::minizip-ng INTERFACE libminizip ) else() target_link_libraries( ll::minizip-ng INTERFACE minizip ) endif() -add_library( ll::libxml INTERFACE IMPORTED ) if (WINDOWS) target_link_libraries( ll::libxml INTERFACE libxml2_a) else() target_link_libraries( ll::libxml INTERFACE xml2) endif() -add_library( ll::colladadom INTERFACE IMPORTED ) target_include_directories( ll::colladadom SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/collada ${LIBS_PREBUILT_DIR}/include/collada/1.4 @@ -39,4 +49,4 @@ elseif (DARWIN) target_link_libraries(ll::colladadom INTERFACE collada14dom ll::libxml ll::minizip-ng) elseif (LINUX) target_link_libraries(ll::colladadom INTERFACE collada14dom ll::libxml ll::minizip-ng) -endif() \ No newline at end of file +endif() diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index 777acb19a7..0136d56723 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -5,13 +5,18 @@ include(GLEXT) include(Prebuilt) include_guard() -add_library( ll::sdl INTERFACE IMPORTED ) +add_library( ll::SDL INTERFACE IMPORTED ) + if (LINUX) + #Must come first as use_conan_binary can exit this file early + target_compile_definitions( ll::SDL INTERFACE LL_SDL=1) + + use_conan_binary(SDL) use_prebuilt_binary(SDL) - target_include_directories( ll::sdl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) - target_link_libraries( ll::sdl INTERFACE SDL directfb fusion direct X11) - target_compile_definitions( ll::sdl INTERFACE LL_SDL=1) + + target_include_directories( ll::SDL SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) + target_link_libraries( ll::SDL INTERFACE SDL directfb fusion direct X11) endif (LINUX) diff --git a/indra/cmake/NGHTTP2.cmake b/indra/cmake/NGHTTP2.cmake index 2ac204bfcb..27f273674b 100644 --- a/indra/cmake/NGHTTP2.cmake +++ b/indra/cmake/NGHTTP2.cmake @@ -4,6 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::nghttp2 INTERFACE IMPORTED ) +use_conan_binary(nghttp2) use_prebuilt_binary(nghttp2) if (WINDOWS) target_link_libraries( ll::nghttp2 INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib) diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 184fbb3c5f..b016c22a4e 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -4,6 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::openjpeg INTERFACE IMPORTED ) +use_conan_binary(openjpeg) use_prebuilt_binary(openjpeg) target_link_libraries(ll::openjpeg INTERFACE openjpeg ) diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake index dfc6520362..0d3f3ad9b4 100644 --- a/indra/cmake/OpenSSL.cmake +++ b/indra/cmake/OpenSSL.cmake @@ -4,6 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::openssl INTERFACE IMPORTED ) +use_conan_binary(openssl) use_prebuilt_binary(openssl) if (WINDOWS) target_link_libraries(ll::openssl INTERFACE libssl libcrypto) diff --git a/indra/cmake/PNG.cmake b/indra/cmake/PNG.cmake index 672f963ea1..8e870f631f 100644 --- a/indra/cmake/PNG.cmake +++ b/indra/cmake/PNG.cmake @@ -4,6 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::libpng INTERFACE IMPORTED ) +use_conan_binary(libpng) use_prebuilt_binary(libpng) if (WINDOWS) target_link_libraries(ll::libpng INTERFACE libpng16) diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index f0192ec45b..542b4462e4 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -57,3 +57,16 @@ macro (use_prebuilt_binary _binary) endif (NOT ${_binary}_installed EQUAL 0) endmacro (use_prebuilt_binary _binary) +#Sadly we need a macro here, otherwise the return() will not properly work +macro ( use_conan_binary package ) + if( USE_CONAN ) + target_link_libraries( ll::${package} INTERFACE CONAN_PKG::${package} ) + foreach( extra_pkg "${ARGN}" ) + if( extra_pkg ) + target_link_libraries( ll::${package} INTERFACE CONAN_PKG::${extra_pkg} ) + endif() + endforeach() + return() + endif() +endmacro() + diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index 6a2e6f22df..066975a3d0 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -2,13 +2,17 @@ include(Prebuilt) include(FreeType) -if (LINUX) - use_prebuilt_binary(gtk-atk-pango-glib) -endif (LINUX) - add_library( ll::uilibraries INTERFACE IMPORTED ) if (LINUX) + target_compile_definitions(ll::uilibraries INTERFACE LL_GTK=1 LL_X11=1 ) + + if( USE_CONAN ) + target_link_libraries( ll::uilibraries INTERFACE CONAN_PKG::gtk ) + return() + endif() + use_prebuilt_binary(gtk-atk-pango-glib) + target_link_libraries( ll::uilibraries INTERFACE atk-1.0 gdk-x11-2.0 @@ -67,6 +71,3 @@ target_include_directories( ll::uilibraries SYSTEM INTERFACE # ) #endforeach(include) -if (LINUX) - target_compile_definitions(ll::uilibraries INTERFACE LL_GTK=1 LL_X11=1 ) -endif (LINUX) diff --git a/indra/cmake/URIPARSER.cmake b/indra/cmake/URIPARSER.cmake index cc181f74f8..b1c76c006a 100644 --- a/indra/cmake/URIPARSER.cmake +++ b/indra/cmake/URIPARSER.cmake @@ -1,10 +1,13 @@ # -*- cmake -*- include_guard() -add_library( ll::uriparser INTERFACE IMPORTED ) include(Prebuilt) +add_library( ll::uriparser INTERFACE IMPORTED ) + +use_conan_binary( uriparser ) + use_prebuilt_binary(uriparser) if (WINDOWS) target_link_libraries( ll::uriparser INTERFACE uriparser) diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index 7b5c990094..00f8b77106 100644 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -2,10 +2,19 @@ include(Prebuilt) if (LINUX) - use_prebuilt_binary(libuuid) - use_prebuilt_binary(fontconfig) + #use_prebuilt_binary(libuuid) add_library( ll::fontconfig INTERFACE IMPORTED ) + + if( NOT USE_CONAN ) + use_prebuilt_binary(fontconfig) + else() + target_link_libraries( ll::fontconfig INTERFACE CONAN_PKG::fontconfig ) + endif() endif (LINUX) -use_prebuilt_binary(libhunspell) + +if( NOT USE_CONAN ) + use_prebuilt_binary(libhunspell) +endif() + use_prebuilt_binary(slvoice) diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index 83f06788f2..7cb0efdab7 100644 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -4,6 +4,8 @@ include(Prebuilt) include_guard() add_library( ll::xmlrpc-epi INTERFACE IMPORTED ) +use_conan_binary( xmlrpc-epi ) + use_prebuilt_binary(xmlrpc-epi) target_link_libraries(ll::xmlrpc-epi INTERFACE xmlrpc-epi ) target_include_directories( ll::xmlrpc-epi SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/ZLIBNG.cmake b/indra/cmake/ZLIBNG.cmake index a1a1860bc6..5d99cd9709 100644 --- a/indra/cmake/ZLIBNG.cmake +++ b/indra/cmake/ZLIBNG.cmake @@ -5,6 +5,11 @@ include(Prebuilt) include_guard() add_library( ll::zlib-ng INTERFACE IMPORTED ) +if(USE_CONAN ) + target_link_libraries( ll::zlib-ng INTERFACE CONAN_PKG::zlib ) + return() +endif() + use_prebuilt_binary(zlib-ng) if (WINDOWS) target_link_libraries( ll::zlib-ng INTERFACE zlib ) diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt index 0984493941..57703818c9 100644 --- a/indra/llimage/CMakeLists.txt +++ b/indra/llimage/CMakeLists.txt @@ -63,7 +63,7 @@ target_link_libraries(llimage llmath llcommon ll::libpng - ll::jpeglib + ll::libjpeg ) # Add tests diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index d69b24a07f..698d523dd3 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -7,6 +7,7 @@ include(LLCommon) include(LLCoreHttp) include(LLPhysicsExtensions) include(LLPrimitive) +include(GLH) set(llprimitive_SOURCE_FILES lldaeloader.cpp @@ -65,6 +66,7 @@ target_link_libraries(llprimitive llphysicsextensions ll::colladadom ll::pcre + ll::glh_linear ) #add unit tests diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index c86b252994..a2044f374c 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -54,14 +54,15 @@ set(llwindow_LINK_LIBRARIES llrender llfilesystem llxml + ll::glh_linear + ll::glext ) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level if (LINUX) list( APPEND llwindow_LINK_LIBRARIES ll::uilibraries - ll::sdl - ll::fontconfig # For FCInit and other FC* functions. + ll::SDL ) list(APPEND viewer_SOURCE_FILES @@ -174,5 +175,5 @@ endif (llwindow_HEADER_FILES) ${viewer_SOURCE_FILES} ) -target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES} ll::sdl) +target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES}) target_include_directories( llwindow INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/indra/media_plugins/CMakeLists.txt b/indra/media_plugins/CMakeLists.txt index 9e24e7acf9..972bb7dd2d 100644 --- a/indra/media_plugins/CMakeLists.txt +++ b/indra/media_plugins/CMakeLists.txt @@ -3,7 +3,7 @@ add_subdirectory(base) if (LINUX) - add_subdirectory(gstreamer010) + #add_subdirectory(gstreamer010) add_subdirectory(example) endif (LINUX) diff --git a/indra/media_plugins/gstreamer010/CMakeLists.txt b/indra/media_plugins/gstreamer010/CMakeLists.txt index 3b5debc585..38fc8201bf 100644 --- a/indra/media_plugins/gstreamer010/CMakeLists.txt +++ b/indra/media_plugins/gstreamer010/CMakeLists.txt @@ -42,4 +42,5 @@ add_library(media_plugin_gstreamer010 target_link_libraries(media_plugin_gstreamer010 media_plugin_base + ll::gstreamer ) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 44ad6313fc..1dff9d3f33 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1938,7 +1938,7 @@ if (LINUX) set(COPY_INPUT_DEPENDENCIES ${VIEWER_BINARY_NAME} SLPlugin - media_plugin_gstreamer010 + #media_plugin_gstreamer010 llcommon ) -- cgit v1.2.3 From d6b34d41afc1f77a28e60ae1f9e22b61323052fa Mon Sep 17 00:00:00 2001 From: Nicky Date: Tue, 19 Apr 2022 20:28:34 +0200 Subject: Finishing touches, making sure even with conan all needed 3ps are installed and usable. This brings the source to be able to run tests in conan mode. --- indra/CMakeLists.txt | 5 ++++- indra/cmake/GoogleMock.cmake | 12 +++++++----- indra/cmake/Hunspell.cmake | 3 ++- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index aa0b645a64..93b9466c24 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -17,8 +17,11 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_CURRENT_BINARY_DIR}" include(conanbuildinfo OPTIONAL RESULT_VARIABLE USE_CONAN ) if( USE_CONAN ) - conan_basic_setup(TARGETS) + set( USE_CONAN ON ) + conan_basic_setup(TARGETS NO_OUTPUT_DIRS) add_compile_definitions(LL_USESYSTEMLIBS USE_CONAN) +else() + set( USE_CONAN OFF ) endif() set(CXX_STANDARD 14) diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake index 753b972e95..e4520fe96e 100644 --- a/indra/cmake/GoogleMock.cmake +++ b/indra/cmake/GoogleMock.cmake @@ -4,16 +4,18 @@ include(Linking) include_guard() +add_library( ll::googlemock INTERFACE IMPORTED ) if(USE_CONAN) - return() + target_link_libraries( ll::googlemock INTERFACE CONAN_PKG::gtest ) + + #Not very nice, but for the moment we need this for tut.hpp + target_include_directories( ll::googlemock SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) + return() endif() -add_library( ll::googlemock INTERFACE IMPORTED ) use_prebuilt_binary(googlemock) -target_include_directories( ll::googlemock SYSTEM INTERFACE - ${LIBS_PREBUILT_DIR}/include - ) +target_include_directories( ll::googlemock SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) if (LINUX) # VWR-24366: gmock is underlinked, it needs gtest. diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake index c372d83f8d..6e92611cc9 100644 --- a/indra/cmake/Hunspell.cmake +++ b/indra/cmake/Hunspell.cmake @@ -2,6 +2,8 @@ include(Prebuilt) include_guard() +use_prebuilt_binary(dictionaries) + add_library( ll::hunspell INTERFACE IMPORTED ) use_conan_binary(hunspell) use_prebuilt_binary(libhunspell) @@ -13,4 +15,3 @@ elseif(LINUX) target_link_libraries( ll::hunspell INTERFACE hunspell-1.3) endif() target_include_directories( ll::hunspell SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/hunspell) -use_prebuilt_binary(dictionaries) -- cgit v1.2.3 From 4c34a0275192cea26d1d63f59639275d1cbeda20 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 23 Apr 2022 18:36:49 +0200 Subject: Setting openal option in cache had gone poof. --- indra/cmake/OPENAL.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake index 84dad367b7..0b6a7c2853 100644 --- a/indra/cmake/OPENAL.cmake +++ b/indra/cmake/OPENAL.cmake @@ -4,6 +4,11 @@ include(Prebuilt) include_guard() +# ND: Turn this off by default, the openal code in the viewer isn't very well maintained, seems +# to have memory leaks, has no option to play music streams +# It probably makes sense to to completely remove it + +set(USE_OPENAL OFF CACHE BOOL "Enable OpenAL") # 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) -- cgit v1.2.3 From 283c2a20cc4ef856076d287303c7143332b201fe Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 1 May 2022 00:38:40 +0200 Subject: Remove setting of HEADER_FILE_ONLY on .h* files, cmake automatically sets the property on those. --- indra/cmake/CMakeLists.txt | 3 --- indra/cmake/LLAddBuildTest.cmake | 1 - indra/integration_tests/llimage_libtest/CMakeLists.txt | 3 --- indra/integration_tests/llui_libtest/CMakeLists.txt | 3 --- indra/linux_crash_logger/CMakeLists.txt | 3 --- indra/llappearance/CMakeLists.txt | 3 --- indra/llaudio/CMakeLists.txt | 3 --- indra/llcharacter/CMakeLists.txt | 3 --- indra/llcommon/CMakeLists.txt | 3 --- indra/llcorehttp/CMakeLists.txt | 5 ----- indra/llcrashlogger/CMakeLists.txt | 3 --- indra/llfilesystem/CMakeLists.txt | 3 --- indra/llimage/CMakeLists.txt | 3 --- indra/llimagej2coj/CMakeLists.txt | 3 --- indra/llinventory/CMakeLists.txt | 3 --- indra/llkdu/CMakeLists.txt | 4 ---- indra/llmath/CMakeLists.txt | 3 --- indra/llmessage/CMakeLists.txt | 3 --- indra/llplugin/CMakeLists.txt | 4 ---- indra/llplugin/slplugin/CMakeLists.txt | 2 -- indra/llprimitive/CMakeLists.txt | 3 --- indra/llrender/CMakeLists.txt | 3 --- indra/llui/CMakeLists.txt | 3 --- indra/llwindow/CMakeLists.txt | 3 --- indra/llxml/CMakeLists.txt | 3 --- indra/media_plugins/cef/CMakeLists.txt | 3 --- indra/newview/CMakeLists.txt | 10 +--------- indra/test/CMakeLists.txt | 3 --- indra/viewer_components/login/CMakeLists.txt | 3 --- 29 files changed, 1 insertion(+), 94 deletions(-) diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index c8e71b604f..0a084d8a1d 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -75,9 +75,6 @@ set(master_SOURCE_FILES source_group("Master Rules" FILES ${master_SOURCE_FILES}) -set_source_files_properties(${cmake_SOURCE_FILES} ${master_SOURCE_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - add_library(cmake cmake_dummy.cpp ${cmake_SOURCE_FILES} diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index a97d2584ae..d3047ddc82 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -87,7 +87,6 @@ INCLUDE(GoogleMock) # Headers GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_HEADER_FILES ${source} LL_TEST_ADDITIONAL_HEADER_FILES) SET(${name}_test_HEADER_FILES ${name}.h ${${name}_test_additional_HEADER_FILES}) - set_source_files_properties(${${name}_test_HEADER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) LIST(APPEND ${name}_test_SOURCE_FILES ${${name}_test_HEADER_FILES}) IF(LL_TEST_VERBOSE) MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_HEADER_FILES ${${name}_test_HEADER_FILES}") diff --git a/indra/integration_tests/llimage_libtest/CMakeLists.txt b/indra/integration_tests/llimage_libtest/CMakeLists.txt index a027860c0b..2f16fc6a1c 100644 --- a/indra/integration_tests/llimage_libtest/CMakeLists.txt +++ b/indra/integration_tests/llimage_libtest/CMakeLists.txt @@ -31,9 +31,6 @@ set(llimage_libtest_HEADER_FILES llimage_libtest.h ) -set_source_files_properties(${llimage_libtest_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llimage_libtest_SOURCE_FILES ${llimage_libtest_HEADER_FILES}) add_executable(llimage_libtest diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt index 51fe35df43..849eda1acf 100644 --- a/indra/integration_tests/llui_libtest/CMakeLists.txt +++ b/indra/integration_tests/llui_libtest/CMakeLists.txt @@ -50,9 +50,6 @@ set(llui_libtest_HEADER_FILES llwidgetreg.h ) -set_source_files_properties(${llui_libtest_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llui_libtest_SOURCE_FILES ${llui_libtest_HEADER_FILES}) add_executable(llui_libtest ${llui_libtest_SOURCE_FILES}) diff --git a/indra/linux_crash_logger/CMakeLists.txt b/indra/linux_crash_logger/CMakeLists.txt index 594cb34ce4..1793aa82b9 100644 --- a/indra/linux_crash_logger/CMakeLists.txt +++ b/indra/linux_crash_logger/CMakeLists.txt @@ -45,9 +45,6 @@ set(linux_crash_logger_HEADER_FILES llcrashloggerlinux.h ) -set_source_files_properties(${linux_crash_logger_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND linux_crash_logger_SOURCE_FILES ${linux_crash_logger_HEADER_FILES} ) diff --git a/indra/llappearance/CMakeLists.txt b/indra/llappearance/CMakeLists.txt index 4516a95d80..75c0e276eb 100644 --- a/indra/llappearance/CMakeLists.txt +++ b/indra/llappearance/CMakeLists.txt @@ -52,9 +52,6 @@ set(llappearance_HEADER_FILES llavatarappearancedefines.h ) -set_source_files_properties(${llappearance_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llappearance_SOURCE_FILES ${llappearance_HEADER_FILES}) add_library (llappearance ${llappearance_SOURCE_FILES}) diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index b2b479b36f..d6846ddf99 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -51,9 +51,6 @@ if (TARGET ll::openal) ) endif () -set_source_files_properties(${llaudio_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llaudio_SOURCE_FILES ${llaudio_HEADER_FILES}) add_library (llaudio ${llaudio_SOURCE_FILES}) diff --git a/indra/llcharacter/CMakeLists.txt b/indra/llcharacter/CMakeLists.txt index 38720eb5da..bc45eb474a 100644 --- a/indra/llcharacter/CMakeLists.txt +++ b/indra/llcharacter/CMakeLists.txt @@ -57,9 +57,6 @@ set(llcharacter_HEADER_FILES llvisualparam.h ) -set_source_files_properties(${llcharacter_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llcharacter_SOURCE_FILES ${llcharacter_HEADER_FILES}) add_library (llcharacter ${llcharacter_SOURCE_FILES}) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 61d6196f50..f3e4f7f7f9 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -244,9 +244,6 @@ set(llcommon_HEADER_FILES StackWalker.h ) -set_source_files_properties(${llcommon_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES}) if(LLCOMMON_LINK_SHARED) diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index f93104b321..481e58993a 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -73,8 +73,6 @@ set(llcorehttp_HEADER_FILES _thread.h ) -set_source_files_properties(${llcorehttp_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) if (DARWIN OR LINUX) # Boost headers define unused members in condition_variable so... set_source_files_properties(${llcorehttp_SOURCE_FILES} @@ -112,9 +110,6 @@ if (LL_TESTS AND LLCOREHTTP_TESTS) tests/test_bufferstream.hpp ) - set_source_files_properties(${llcorehttp_TEST_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llcorehttp_TEST_SOURCE_FILES ${llcorehttp_TEST_HEADER_FILES}) # LL_ADD_PROJECT_UNIT_TESTS(llcorehttp "${llcorehttp_TEST_SOURCE_FILES}") diff --git a/indra/llcrashlogger/CMakeLists.txt b/indra/llcrashlogger/CMakeLists.txt index 0e357b249f..6ac73c0d32 100644 --- a/indra/llcrashlogger/CMakeLists.txt +++ b/indra/llcrashlogger/CMakeLists.txt @@ -17,9 +17,6 @@ set(llcrashlogger_HEADER_FILES llcrashlock.h ) -set_source_files_properties(${llcrashlogger_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llcrashlogger_SOURCE_FILES ${llcrashlogger_HEADER_FILES}) add_library(llcrashlogger ${llcrashlogger_SOURCE_FILES}) diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index 537f43007a..9f24f75eab 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -47,9 +47,6 @@ if (WINDOWS) LIST(APPEND llfilesystem_HEADER_FILES lldir_win32.h) endif (WINDOWS) -set_source_files_properties(${llfilesystem_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llfilesystem_SOURCE_FILES ${llfilesystem_HEADER_FILES}) add_library (llfilesystem ${llfilesystem_SOURCE_FILES}) diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt index 57703818c9..cc75c463bc 100644 --- a/indra/llimage/CMakeLists.txt +++ b/indra/llimage/CMakeLists.txt @@ -43,9 +43,6 @@ set(llimage_HEADER_FILES llpngwrapper.h ) -set_source_files_properties(${llimage_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llimage_SOURCE_FILES ${llimage_HEADER_FILES}) add_library (llimage ${llimage_SOURCE_FILES}) diff --git a/indra/llimagej2coj/CMakeLists.txt b/indra/llimagej2coj/CMakeLists.txt index ff7d75b709..93e85668dd 100644 --- a/indra/llimagej2coj/CMakeLists.txt +++ b/indra/llimagej2coj/CMakeLists.txt @@ -17,9 +17,6 @@ set(llimagej2coj_HEADER_FILES llimagej2coj.h ) -set_source_files_properties(${llimagej2coj_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llimagej2coj_SOURCE_FILES ${llimagej2coj_HEADER_FILES}) add_library (llimagej2coj ${llimagej2coj_SOURCE_FILES}) diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt index 16724cca53..93a586759f 100644 --- a/indra/llinventory/CMakeLists.txt +++ b/indra/llinventory/CMakeLists.txt @@ -52,9 +52,6 @@ set(llinventory_HEADER_FILES lluserrelations.h ) -set_source_files_properties(${llinventory_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llinventory_SOURCE_FILES ${llinventory_HEADER_FILES}) add_library (llinventory ${llinventory_SOURCE_FILES}) diff --git a/indra/llkdu/CMakeLists.txt b/indra/llkdu/CMakeLists.txt index aef8dea53f..7cd9f5eb24 100644 --- a/indra/llkdu/CMakeLists.txt +++ b/indra/llkdu/CMakeLists.txt @@ -21,14 +21,10 @@ set(llkdu_SOURCE_FILES set(llkdu_HEADER_FILES CMakeLists.txt - llimagej2ckdu.h llkdumem.h ) -set_source_files_properties(${llkdu_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llkdu_SOURCE_FILES ${llkdu_HEADER_FILES}) # Our KDU package is built with KDU_X86_INTRINSICS in its .vcxproj file. diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index 9d1b4f07f3..dcc7d4fb2e 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -95,9 +95,6 @@ set(llmath_HEADER_FILES xform.h ) -set_source_files_properties(${llmath_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES}) add_library (llmath ${llmath_SOURCE_FILES}) diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index 679ff43131..7340752fb2 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -185,9 +185,6 @@ set(llmessage_HEADER_FILES sound_ids.h ) -set_source_files_properties(${llmessage_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llmessage_SOURCE_FILES ${llmessage_HEADER_FILES}) add_library (llmessage ${llmessage_SOURCE_FILES}) diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt index 71801e05af..14a69afe6e 100644 --- a/indra/llplugin/CMakeLists.txt +++ b/indra/llplugin/CMakeLists.txt @@ -20,7 +20,6 @@ set(llplugin_SOURCE_FILES set(llplugin_HEADER_FILES CMakeLists.txt - llpluginclassmedia.h llpluginclassmediaowner.h llplugininstance.h @@ -32,9 +31,6 @@ set(llplugin_HEADER_FILES llpluginsharedmemory.h ) -set_source_files_properties(${llplugin_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - if(NOT ADDRESS_SIZE EQUAL 32) if(WINDOWS) ##add_definitions(/FIXED:NO) diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 1fa4f0346d..5b80d80c9b 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -21,8 +21,6 @@ if (DARWIN) endif (DARWIN) if (SLPlugin_HEADER_FILES) - set_source_files_properties(${SLPlugin_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) list(APPEND SLPlugin_SOURCE_FILES ${SLPlugin_HEADER_FILES}) endif (SLPlugin_HEADER_FILES) diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 698d523dd3..bf35500bad 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -47,9 +47,6 @@ set(llprimitive_HEADER_FILES material_codes.h object_flags.h ) - -set_source_files_properties(${llprimitive_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) list(APPEND llprimitive_SOURCE_FILES ${llprimitive_HEADER_FILES}) diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt index bb22a969f5..c5cf1100d5 100644 --- a/indra/llrender/CMakeLists.txt +++ b/indra/llrender/CMakeLists.txt @@ -64,9 +64,6 @@ set(llrender_HEADER_FILES llglcommonfunc.h ) -set_source_files_properties(${llrender_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llrender_SOURCE_FILES ${llrender_HEADER_FILES}) if (BUILD_HEADLESS) diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 144923636b..9108c6143c 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -236,9 +236,6 @@ set(llui_HEADER_FILES llxyvector.h ) -set_source_files_properties(${llui_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - SET(llurlentry_TEST_DEPENDENCIES llurlmatch.cpp llurlregistry.cpp diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index a2044f374c..d09e5387b9 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -142,9 +142,6 @@ if (SOLARIS) ) endif (SOLARIS) -set_source_files_properties(${llwindow_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - if (BUILD_HEADLESS) set(llwindowheadless_SOURCE_FILES llwindowmesaheadless.cpp diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt index 5ac6aae78e..508c2b919b 100644 --- a/indra/llxml/CMakeLists.txt +++ b/indra/llxml/CMakeLists.txt @@ -21,9 +21,6 @@ set(llxml_HEADER_FILES llxmltree.h ) -set_source_files_properties(${llxml_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llxml_SOURCE_FILES ${llxml_HEADER_FILES}) add_library (llxml ${llxml_SOURCE_FILES}) diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index ae3092fff4..d8ae099eca 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -46,9 +46,6 @@ elseif (WINDOWS) list(APPEND media_plugin_cef_SOURCE_FILES windows_volume_catcher.cpp) endif (LINUX) -set_source_files_properties(${media_plugin_cef_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND media_plugin_cef_SOURCE_FILES ${media_plugin_cef_HEADER_FILES}) add_library(media_plugin_cef diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index d0a8fe7571..328d3a0148 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1382,12 +1382,7 @@ if (DARWIN) Japanese.lproj/language.txt Korean.lproj/language.txt ) - set_source_files_properties( - ${viewer_RESOURCE_FILES} - PROPERTIES - HEADER_FILE_ONLY TRUE - #MACOSX_PACKAGE_LOCATION Resources #don't do this! this tells cmake to copy the files. - ) + SOURCE_GROUP("Resources" FILES ${viewer_RESOURCE_FILES}) list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES}) endif (DARWIN) @@ -1652,9 +1647,6 @@ endif() list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES}) -set_source_files_properties(${viewer_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - add_executable(${VIEWER_BINARY_NAME} WIN32 MACOSX_BUNDLE diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index aae299e6ca..2f033616a7 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -53,9 +53,6 @@ if (NOT WINDOWS) ) endif (NOT WINDOWS) -set_source_files_properties(${test_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND test_SOURCE_FILES ${test_HEADER_FILES}) add_executable(lltest ${test_SOURCE_FILES}) diff --git a/indra/viewer_components/login/CMakeLists.txt b/indra/viewer_components/login/CMakeLists.txt index 76e38acf8a..8381803b03 100644 --- a/indra/viewer_components/login/CMakeLists.txt +++ b/indra/viewer_components/login/CMakeLists.txt @@ -17,9 +17,6 @@ set(login_HEADER_FILES lllogin.h ) -set_source_files_properties(${login_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND login_SOURCE_FILES ${login_HEADER_FILES} -- cgit v1.2.3 From 756a10eeace5891c17c6894b0df44f2b9b3ea078 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 1 May 2022 13:37:44 +0200 Subject: Simplify cmake files by uaing generator expressions and be more configuration specific, rather than staging files to Release and RelWithdebInfo all the time --- indra/cmake/Copy3rdPartyLibs.cmake | 6 +---- indra/cmake/DBusGlib.cmake | 2 +- indra/cmake/Linking.cmake | 24 +---------------- indra/cmake/Variables.cmake | 2 ++ indra/newview/CMakeLists.txt | 55 +++++++++++++++----------------------- 5 files changed, 27 insertions(+), 62 deletions(-) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index f6e224665b..829c7a180d 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -16,12 +16,8 @@ include(FMODSTUDIO) # Pass FROM_DIR, TARGETS and the files to copy. TO_DIR is implicit. # to_staging_dirs diverges from copy_if_different in that it appends to TARGETS. MACRO(to_staging_dirs from_dir targets) - foreach(staging_dir - "${SHARED_LIB_STAGING_DIR_RELEASE}" - "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}") - copy_if_different("${from_dir}" "${staging_dir}" out_targets ${ARGN}) + copy_if_different("${from_dir}" "${SHARED_LIB_STAGING_DIR}/$,$,>" out_targets ${ARGN}) list(APPEND "${targets}" "${out_targets}") - endforeach() ENDMACRO(to_staging_dirs from_dir to_dir targets) ################################################################### diff --git a/indra/cmake/DBusGlib.cmake b/indra/cmake/DBusGlib.cmake index ce5d10be5c..9151742fe0 100644 --- a/indra/cmake/DBusGlib.cmake +++ b/indra/cmake/DBusGlib.cmake @@ -3,7 +3,7 @@ include(Prebuilt) add_library( ll::dbus INTERFACE IMPORTED) -# Only define this when using conan, lls prebuild is brokenb +# Only define this when using conan, lls prebuild is broken if( USE_CONAN ) target_compile_definitions( ll::dbus INTERFACE LL_DBUS_ENABLED ) endif() diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index 5a16776e57..ecabd0c374 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -30,30 +30,8 @@ endif (WINDOWS) # windows) and CMAKE_BUILD_TYPE on Makefile based generators (like linux). The reason for this is # that CMAKE_BUILD_TYPE is essentially meaningless at configuration time for IDE generators and # CMAKE_CFG_INTDIR is meaningless at build time for Makefile generators -if(WINDOWS OR DARWIN) - # the cmake xcode and VS generators implicitly append ${CMAKE_CFG_INTDIR} to the library paths for us - # fortunately both windows and darwin are case insensitive filesystems so this works. - # Ninja on the other hand needs the the full path - if( ${CMAKE_GENERATOR} STREQUAL "Ninja") - string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER) - set(AUTOBUILD_LIBS_INSTALL_DIRS ${AUTOBUILD_INSTALL_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER}) - else() - set(AUTOBUILD_LIBS_INSTALL_DIRS "${AUTOBUILD_INSTALL_DIR}/lib/") - endif() -else(WINDOWS OR DARWIN) - # else block is for linux and any other makefile based generators - string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER) - set(AUTOBUILD_LIBS_INSTALL_DIRS ${AUTOBUILD_INSTALL_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER}) -endif(WINDOWS OR DARWIN) - -if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release") - # When we're building something other than Release, append the - # packages/lib/release directory to deal with autobuild packages that don't - # provide (e.g.) lib/debug libraries. - list(APPEND AUTOBUILD_LIBS_INSTALL_DIRS ${ARCH_PREBUILT_DIRS_RELEASE}) -endif (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release") -link_directories(${AUTOBUILD_LIBS_INSTALL_DIRS}) +link_directories(${AUTOBUILD_INSTALL_DIR}/lib/$>) add_library( ll::oslibraries INTERFACE IMPORTED ) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 0cc4b85583..e0e1161606 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -217,3 +217,5 @@ set(USE_PRECOMPILED_HEADERS ON CACHE BOOL "Enable use of precompiled header dire source_group("CMake Rules" FILES CMakeLists.txt) +get_property(LL_GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +MESSAGE( "Multi config generator: ${LL_GENERATOR_IS_MULTI_CONFIG}" ) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 328d3a0148..a7eb7f28b9 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1686,24 +1686,14 @@ if (WINDOWS) # stores a list in the variable myfile in which each item is a line from the input file." # And of course it's straightforward to read a text file in Python. - if( ${CMAKE_GENERATOR} STREQUAL "Ninja") - set(LL_INTDIR ${CMAKE_BUILD_TYPE}) - else() - set(LL_INTDIR ${CMAKE_CFG_INTDIR}) - endif() - set(COPY_INPUT_DEPENDENCIES # The following commented dependencies are determined at variably at build time. Can't do this here. ${CMAKE_SOURCE_DIR}/../etc/message.xml ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg - ${SHARED_LIB_STAGING_DIR}/Release/glod.dll - ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/glod.dll - ${SHARED_LIB_STAGING_DIR}/Release/openjpeg.dll - ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/openjpeg.dll - ${SHARED_LIB_STAGING_DIR}/Release/libhunspell.dll - ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libhunspell.dll - ${SHARED_LIB_STAGING_DIR}/Release/uriparser.dll - ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/uriparser.dll + ${SHARED_LIB_STAGING_DIR}/$,$,>/glod.dll + ${SHARED_LIB_STAGING_DIR}/$,$,>/openjpeg.dll + ${SHARED_LIB_STAGING_DIR}/$,$,>/libhunspell.dll + ${SHARED_LIB_STAGING_DIR}/$,$,>/uriparser.dll #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/SLVoice.exe #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/libsndfile-1.dll #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/vivoxoal.dll @@ -1718,33 +1708,32 @@ if (WINDOWS) ) if (ADDRESS_SIZE EQUAL 64) - list(APPEND COPY_INPUT_DEPENDENCIES - ${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/vivoxsdk_x64.dll - ${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/ortp_x64.dll - ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto-1_1-x64.dll - ${ARCH_PREBUILT_DIRS_RELEASE}/libssl-1_1-x64.dll - ) + list(APPEND COPY_INPUT_DEPENDENCIES + ${SHARED_LIB_STAGING_DIR}/$,$,>/vivoxsdk_x64.dll + ${SHARED_LIB_STAGING_DIR}/$,$,>/ortp_x64.dll + ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto-1_1-x64.dll + ${ARCH_PREBUILT_DIRS_RELEASE}/libssl-1_1-x64.dll + ) else (ADDRESS_SIZE EQUAL 64) - list(APPEND COPY_INPUT_DEPENDENCIES - ${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/vivoxsdk.dll - ${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/ortp.dll - ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto-1_1.dll - ${ARCH_PREBUILT_DIRS_RELEASE}/libssl-1_1.dll - ) + list(APPEND COPY_INPUT_DEPENDENCIES + ${SHARED_LIB_STAGING_DIR}/$,$,>/vivoxsdk.dll + ${SHARED_LIB_STAGING_DIR}/$,$,>/ortp.dll + ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto-1_1.dll + ${ARCH_PREBUILT_DIRS_RELEASE}/libssl-1_1.dll + ) endif (ADDRESS_SIZE EQUAL 64) 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}/$,$,>/fmod.dll ${SHARED_LIB_STAGING_DIR}/Debug/fmodL.dll ) endif () 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 + ${SHARED_LIB_STAGING_DIR}/$,$,>/OpenAL32.dll + ${SHARED_LIB_STAGING_DIR}/$,$,>/alut.dll ) endif () @@ -1760,13 +1749,13 @@ if (WINDOWS) "--fmodstudio=${USE_FMODSTUDIO}" "--openal=${USE_OPENAL}" --build=${CMAKE_CURRENT_BINARY_DIR} - --buildtype=${CMAKE_BUILD_TYPE} + --buildtype=$,$,> "--channel=${VIEWER_CHANNEL}" --configuration=${CMAKE_CFG_INTDIR} - --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} + --dest=${CMAKE_CURRENT_BINARY_DIR}/$,$,> --grid=${GRID} --source=${CMAKE_CURRENT_SOURCE_DIR} - --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/copy_touched.bat + --touch=${CMAKE_CURRENT_BINARY_DIR}/$,$,>/copy_touched.bat --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py -- cgit v1.2.3 From db423fa972e70b647b53eeb5f1797e93facda37f Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 1 May 2022 13:53:22 +0200 Subject: ${AUTOBUILD_INSTALL_DIR}/lib/release is always needed as a fallback linking directory. --- indra/cmake/Linking.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index ecabd0c374..d0181c5122 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -32,6 +32,7 @@ endif (WINDOWS) # CMAKE_CFG_INTDIR is meaningless at build time for Makefile generators link_directories(${AUTOBUILD_INSTALL_DIR}/lib/$>) +link_directories(${AUTOBUILD_INSTALL_DIR}/lib/release) add_library( ll::oslibraries INTERFACE IMPORTED ) -- cgit v1.2.3 From b75fe14716bed37f1b5463fca3d6c6da31d0d3ef Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 1 May 2022 14:51:02 +0200 Subject: Fix for viewer_manifest.py using a hardcoded path to grab runtime files. --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index f9980003b7..2b37715b9c 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -609,7 +609,7 @@ class WindowsManifest(ViewerManifest): # MSVC DLLs needed for CEF and have to be in same directory as plugin with self.prefix(src=os.path.join(self.args['build'], os.pardir, - 'sharedlibs', 'Release')): + 'sharedlibs', self.args['buildtype'])): self.path("msvcp140.dll") self.path("vcruntime140.dll") -- cgit v1.2.3 From 932455384b2a11efa6958e8bafc91f345e8c4094 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 1 May 2022 15:14:34 +0200 Subject: Another place that needed generator expressions. --- indra/newview/CMakeLists.txt | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index a7eb7f28b9..cc47608689 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1802,21 +1802,21 @@ if (WINDOWS) OUTPUT ${CMAKE_CFG_INTDIR}/touched.bat COMMAND ${PYTHON_EXECUTABLE} ARGS - ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py - --arch=${ARCH} - --artwork=${ARTWORK_DIR} - "--bugsplat=${BUGSPLAT_DB}" - "--fmodstudio=${USE_FMODSTUDIO}" - "--openal=${USE_OPENAL}" - --build=${CMAKE_CURRENT_BINARY_DIR} - --buildtype=${CMAKE_BUILD_TYPE} - "--channel=${VIEWER_CHANNEL}" - --configuration=${CMAKE_CFG_INTDIR} - --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} - --grid=${GRID} - --source=${CMAKE_CURRENT_SOURCE_DIR} - --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/touched.bat - --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt + ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + --arch=${ARCH} + --artwork=${ARTWORK_DIR} + "--bugsplat=${BUGSPLAT_DB}" + "--fmodstudio=${USE_FMODSTUDIO}" + "--openal=${USE_OPENAL}" + --build=${CMAKE_CURRENT_BINARY_DIR} + --buildtype=$,$,> + "--channel=${VIEWER_CHANNEL}" + --configuration=${CMAKE_CFG_INTDIR} + --dest=${CMAKE_CURRENT_BINARY_DIR}/$,$,> + --grid=${GRID} + --source=${CMAKE_CURRENT_SOURCE_DIR} + --touch=${CMAKE_CURRENT_BINARY_DIR}/$,$,>/touched.bat + --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -1825,7 +1825,7 @@ if (WINDOWS) ) add_custom_target(llpackage ALL DEPENDS - ${CMAKE_CFG_INTDIR}/touched.bat + ${CMAKE_CURRENT_BINARY_DIR}/$,$,>/touched.bat ) # temporarily disable packaging of event_host until hg subrepos get # sorted out on the parabuild cluster... -- cgit v1.2.3 From 767464a2627036e8a16ac323c886e0a1712e0a5f Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 7 May 2022 02:19:51 +0200 Subject: Adapt gnerator expression usage to work on OSX. --- indra/cmake/Copy3rdPartyLibs.cmake | 16 ++----- indra/cmake/LLAddBuildTest.cmake | 4 +- indra/cmake/LLSharedLibs.cmake | 37 -------------- indra/cmake/Linking.cmake | 19 +++----- .../llimage_libtest/CMakeLists.txt | 2 +- indra/llcommon/CMakeLists.txt | 18 +------ indra/llcorehttp/CMakeLists.txt | 2 +- indra/llplugin/slplugin/CMakeLists.txt | 2 +- indra/newview/CMakeLists.txt | 56 +++++++++++----------- 9 files changed, 46 insertions(+), 110 deletions(-) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 829c7a180d..8e4f7bcec9 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -15,19 +15,17 @@ include(FMODSTUDIO) # copy_if_different commands. Encapsulate that usage. # Pass FROM_DIR, TARGETS and the files to copy. TO_DIR is implicit. # to_staging_dirs diverges from copy_if_different in that it appends to TARGETS. -MACRO(to_staging_dirs from_dir targets) - copy_if_different("${from_dir}" "${SHARED_LIB_STAGING_DIR}/$,$,>" out_targets ${ARGN}) +macro(to_staging_dirs from_dir targets) + set( targetDir "${SHARED_LIB_STAGING_DIR}") + copy_if_different("${from_dir}" "${targetDir}" out_targets ${ARGN}) + list(APPEND "${targets}" "${out_targets}") -ENDMACRO(to_staging_dirs from_dir to_dir targets) +endmacro() ################################################################### # set up platform specific lists of files that need to be copied ################################################################### if(WINDOWS) - set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug") - set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo") - set(SHARED_LIB_STAGING_DIR_RELEASE "${SHARED_LIB_STAGING_DIR}/Release") - #******************************* # VIVOX - *NOTE: no debug version set(vivox_lib_dir "${ARCH_PREBUILT_DIRS_RELEASE}") @@ -150,10 +148,6 @@ if(WINDOWS) endforeach() elseif(DARWIN) - set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug/Resources") - set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/Resources") - set(SHARED_LIB_STAGING_DIR_RELEASE "${SHARED_LIB_STAGING_DIR}/Release/Resources") - set(vivox_lib_dir "${ARCH_PREBUILT_DIRS_RELEASE}") set(slvoice_files SLVoice) set(vivox_libs diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index d3047ddc82..fa95e08dcd 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -276,12 +276,12 @@ MACRO(SET_TEST_PATH LISTVAR) # We typically build/package only Release variants of third-party # libraries, so append the Release staging dir in case the library being # sought doesn't have a debug variant. - set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR} ${SHARED_LIB_STAGING_DIR}/Release) + set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} ${SHARED_LIB_STAGING_DIR}/Release) ELSEIF(DARWIN) # We typically build/package only Release variants of third-party # libraries, so append the Release staging dir in case the library being # sought doesn't have a debug variant. - set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources ${SHARED_LIB_STAGING_DIR}/Release/Resources /usr/lib) + set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} ${SHARED_LIB_STAGING_DIR}/Release/Resources /usr/lib) ELSE(WINDOWS) # Linux uses a single staging directory anyway. set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib) diff --git a/indra/cmake/LLSharedLibs.cmake b/indra/cmake/LLSharedLibs.cmake index f69b45cd92..e3e2a3b0c6 100644 --- a/indra/cmake/LLSharedLibs.cmake +++ b/indra/cmake/LLSharedLibs.cmake @@ -37,40 +37,3 @@ macro(ll_deploy_sharedlibs_command target_exe) endif(NOT DARWIN) endmacro(ll_deploy_sharedlibs_command) - -# ll_stage_sharedlib -# Performs config and adds a copy command for a sharedlib target. -macro(ll_stage_sharedlib DSO_TARGET) - # target gets written to the DLL staging directory. - # Also this directory is shared with RunBuildTest.cmake, y'know, for the tests. - set_target_properties(${DSO_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR}) - if(NOT WINDOWS) - get_target_property(DSO_PATH ${DSO_TARGET} LOCATION) - get_filename_component(DSO_FILE ${DSO_PATH} NAME) - if(DARWIN) - set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources) - else(DARWIN) - set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}) - endif(DARWIN) - - # *TODO - maybe make this a symbolic link? -brad - add_custom_command( - TARGET ${DSO_TARGET} POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS - -E - copy_if_different - ${DSO_PATH} - ${SHARED_LIB_STAGING_DIR_CONFIG}/${DSO_FILE} - COMMENT "Copying llcommon to the staging folder." - ) - endif(NOT WINDOWS) - - if (DARWIN) - set_target_properties(${DSO_TARGET} PROPERTIES - BUILD_WITH_INSTALL_RPATH 1 - INSTALL_NAME_DIR "@executable_path/../Resources" - ) - endif(DARWIN) - -endmacro(ll_stage_sharedlib) diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index d0181c5122..29aa6e89ea 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -7,21 +7,16 @@ set(ARCH_PREBUILT_DIRS ${AUTOBUILD_INSTALL_DIR}/lib) set(ARCH_PREBUILT_DIRS_PLUGINS ${AUTOBUILD_INSTALL_DIR}/plugins) set(ARCH_PREBUILT_DIRS_RELEASE ${AUTOBUILD_INSTALL_DIR}/lib/release) set(ARCH_PREBUILT_DIRS_DEBUG ${AUTOBUILD_INSTALL_DIR}/lib/debug) -if (WINDOWS) - set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs) - set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs) +if (WINDOWS OR DARWIN ) + set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/$,$,>) + if( DARWIN ) + set( SHARED_LIB_STAGING_DIR ${SHARED_LIB_STAGING_DIR}/Resources) + endif() + set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/$,$,>) elseif (LINUX) set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/lib) set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/bin) -elseif (DARWIN) - set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs) - set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs") - if( ${CMAKE_GENERATOR} STREQUAL "Ninja") - set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs/${CMAKE_BUILD_TYPE} ") - else() - set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs") - endif() -endif (WINDOWS) +endif () # Autobuild packages must provide 'release' versions of libraries, but may provide versions for # specific build types. AUTOBUILD_LIBS_INSTALL_DIRS lists first the build type directory and then diff --git a/indra/integration_tests/llimage_libtest/CMakeLists.txt b/indra/integration_tests/llimage_libtest/CMakeLists.txt index 2f16fc6a1c..cf43292922 100644 --- a/indra/integration_tests/llimage_libtest/CMakeLists.txt +++ b/indra/integration_tests/llimage_libtest/CMakeLists.txt @@ -59,7 +59,7 @@ target_link_libraries(llimage_libtest if (DARWIN) # Path inside the app bundle where we'll need to copy libraries set(LLIMAGE_LIBTEST_DESTINATION_DIR - ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llimage_libtest.app/Contents/Resources + ${CMAKE_CURRENT_BINARY_DIR}/$,$,>/llimage_libtest.app/Contents/Resources ) # Create the Contents/Resources directory add_custom_command( diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index f3e4f7f7f9..832ff105f6 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -246,23 +246,7 @@ set(llcommon_HEADER_FILES list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES}) -if(LLCOMMON_LINK_SHARED) - add_library (llcommon SHARED ${llcommon_SOURCE_FILES}) - if(NOT ADDRESS_SIZE EQUAL 32) - if(WINDOWS) - ##add_definitions(/FIXED:NO) - else(WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(WINDOWS) - endif(NOT ADDRESS_SIZE EQUAL 32) - if(WINDOWS) - # always generate llcommon.pdb, even for "Release" builds - set_target_properties(llcommon PROPERTIES LINK_FLAGS "/DEBUG") - endif(WINDOWS) - ll_stage_sharedlib(llcommon) -else(LLCOMMON_LINK_SHARED) - add_library (llcommon ${llcommon_SOURCE_FILES}) -endif(LLCOMMON_LINK_SHARED) +add_library (llcommon ${llcommon_SOURCE_FILES}) target_link_libraries( llcommon diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index 481e58993a..08139910d3 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -135,7 +135,7 @@ if (LL_TESTS AND LLCOREHTTP_TESTS) if (DARWIN) # Path inside the app bundle where we'll need to copy libraries set(LL_TEST_DESTINATION_DIR - ${CMAKE_BINARY_DIR}/sharedlibs/Resources + ${CMAKE_BINARY_DIR}/sharedlibs/$,,../>Resources ) # Create the Contents/Resources directory diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 5b80d80c9b..0ea6495eac 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -56,7 +56,7 @@ if (DARWIN) COMMAND mkdir ARGS -p - ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/SLPlugin.app/Contents/Resources + ${CMAKE_CURRENT_BINARY_DIR}/$,$,>/SLPlugin.app/Contents/Resources ) endif (DARWIN) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index cc47608689..93a29645d0 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1690,10 +1690,10 @@ if (WINDOWS) # The following commented dependencies are determined at variably at build time. Can't do this here. ${CMAKE_SOURCE_DIR}/../etc/message.xml ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg - ${SHARED_LIB_STAGING_DIR}/$,$,>/glod.dll - ${SHARED_LIB_STAGING_DIR}/$,$,>/openjpeg.dll - ${SHARED_LIB_STAGING_DIR}/$,$,>/libhunspell.dll - ${SHARED_LIB_STAGING_DIR}/$,$,>/uriparser.dll + ${SHARED_LIB_STAGING_DIR}/glod.dll + ${SHARED_LIB_STAGING_DIR}/openjpeg.dll + ${SHARED_LIB_STAGING_DIR}/libhunspell.dll + ${SHARED_LIB_STAGING_DIR}/uriparser.dll #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/SLVoice.exe #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/libsndfile-1.dll #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/vivoxoal.dll @@ -1709,15 +1709,15 @@ if (WINDOWS) if (ADDRESS_SIZE EQUAL 64) list(APPEND COPY_INPUT_DEPENDENCIES - ${SHARED_LIB_STAGING_DIR}/$,$,>/vivoxsdk_x64.dll - ${SHARED_LIB_STAGING_DIR}/$,$,>/ortp_x64.dll + ${SHARED_LIB_STAGING_DIR}/vivoxsdk_x64.dll + ${SHARED_LIB_STAGING_DIR}/ortp_x64.dll ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto-1_1-x64.dll ${ARCH_PREBUILT_DIRS_RELEASE}/libssl-1_1-x64.dll ) else (ADDRESS_SIZE EQUAL 64) list(APPEND COPY_INPUT_DEPENDENCIES - ${SHARED_LIB_STAGING_DIR}/$,$,>/vivoxsdk.dll - ${SHARED_LIB_STAGING_DIR}/$,$,>/ortp.dll + ${SHARED_LIB_STAGING_DIR}/vivoxsdk.dll + ${SHARED_LIB_STAGING_DIR}/ortp.dll ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto-1_1.dll ${ARCH_PREBUILT_DIRS_RELEASE}/libssl-1_1.dll ) @@ -1725,15 +1725,15 @@ if (WINDOWS) if (TARGET ll::fmodstudio) list(APPEND COPY_INPUT_DEPENDENCIES - ${SHARED_LIB_STAGING_DIR}/$,$,>/fmod.dll + ${SHARED_LIB_STAGING_DIR}/fmod.dll ${SHARED_LIB_STAGING_DIR}/Debug/fmodL.dll ) endif () if (TARGET ll::openal) list(APPEND COPY_INPUT_DEPENDENCIES - ${SHARED_LIB_STAGING_DIR}/$,$,>/OpenAL32.dll - ${SHARED_LIB_STAGING_DIR}/$,$,>/alut.dll + ${SHARED_LIB_STAGING_DIR}/OpenAL32.dll + ${SHARED_LIB_STAGING_DIR}/alut.dll ) endif () @@ -2020,7 +2020,7 @@ if (DARWIN) XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "${MACOSX_BUNDLE_GUI_IDENTIFIER}" ) - set(VIEWER_APP_BUNDLE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app") + set(VIEWER_APP_BUNDLE "${CMAKE_CURRENT_BINARY_DIR}/$,$,>/${product}.app") set(VIEWER_APP_EXE "${VIEWER_APP_BUNDLE}/Contents/MacOS/${product}") set(VIEWER_APP_DSYM "${VIEWER_APP_EXE}.dSYM") set(VIEWER_APP_XCARCHIVE "${VIEWER_APP_BUNDLE}/../${product}.xcarchive.zip") @@ -2070,22 +2070,22 @@ if (DARWIN) TARGET llpackage POST_BUILD COMMAND ${PYTHON_EXECUTABLE} ARGS - ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py - --arch=${ARCH} - --artwork=${ARTWORK_DIR} - "--bugsplat=${BUGSPLAT_DB}" - "--fmodstudio=${USE_FMODSTUDIO}" - "--openal=${USE_OPENAL}" - --build=${CMAKE_CURRENT_BINARY_DIR} - --buildtype=${CMAKE_BUILD_TYPE} - "--channel=${VIEWER_CHANNEL}" - --configuration=${CMAKE_CFG_INTDIR} - --dest=${VIEWER_APP_BUNDLE} - --grid=${GRID} - --source=${CMAKE_CURRENT_SOURCE_DIR} - --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched - --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt - ${SIGNING_SETTING} + ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py + --arch=${ARCH} + --artwork=${ARTWORK_DIR} + "--bugsplat=${BUGSPLAT_DB}" + "--fmodstudio=${USE_FMODSTUDIO}" + "--openal=${USE_OPENAL}" + --build=${CMAKE_CURRENT_BINARY_DIR} + --buildtype=$,$,> + "--channel=${VIEWER_CHANNEL}" + --configuration=${CMAKE_CFG_INTDIR} + --dest=${VIEWER_APP_BUNDLE} + --grid=${GRID} + --source=${CMAKE_CURRENT_SOURCE_DIR} + --touch=${CMAKE_CURRENT_BINARY_DIR}/$,$,>/.${product}.bat + --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt + ${SIGNING_SETTING} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) -- cgit v1.2.3 From 09e38c5caac6c8467edbbb8527e04503f1afe5f3 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 7 May 2022 17:00:01 +0200 Subject: Remove logging. --- indra/cmake/Variables.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index e0e1161606..cb9d22abd2 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -218,4 +218,4 @@ set(USE_PRECOMPILED_HEADERS ON CACHE BOOL "Enable use of precompiled header dire source_group("CMake Rules" FILES CMakeLists.txt) get_property(LL_GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) -MESSAGE( "Multi config generator: ${LL_GENERATOR_IS_MULTI_CONFIG}" ) + -- cgit v1.2.3 From d6c170a66de1fe6cf6287ca970b79d0ae6e98149 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 7 May 2022 17:00:27 +0200 Subject: Cache ENV{LL_BUILD} to LL_BUILD_ENV: - ENV{LL_BUILD} takes precedence - if ENV{LL_BUILD} is not set but LL_BUILD-ENV is, set ENV{LL_BUILD} to the cached version - error if none of the two is set Caching the variable and reusing it lets cmake run when not called by autobuild itself. This happens when xcode or visual studio detect it needs to be re rerun and call it for the "cmake" target. Not having LL_BUILD then makes those targets fail. --- indra/cmake/Variables.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index cb9d22abd2..3098b9aa59 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -12,8 +12,13 @@ # Switches set here and in 00-Common.cmake must agree with # https://bitbucket.org/lindenlab/viewer-build-variables/src/tip/variables # Reading $LL_BUILD is an attempt to directly use those switches. -if ("$ENV{LL_BUILD}" STREQUAL "") +if ("$ENV{LL_BUILD}" STREQUAL "" AND "${LL_BUILD_ENV}" STREQUAL "" ) message(FATAL_ERROR "Environment variable LL_BUILD must be set") +elseif("$ENV{LL_BUILD}" STREQUAL "") + set( ENV{LL_BUILD} "${LL_BUILD_ENV}" ) + message( "Setting ENV{LL_BUILD} to cached variable ${LL_BUILD_ENV}" ) +else() + set( LL_BUILD_ENV "$ENV{LL_BUILD}" CACHE STRING "Save environment" FORCE ) endif () include_guard() -- cgit v1.2.3 From 07a7c4e1909749ca2f50d155c0de3fdfdbb34952 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 7 May 2022 17:23:20 +0200 Subject: ADDRESS_SIZE auto detection was broken with python3, fix this. - Simplify detection by using regex - OSX is always 64 bit --- indra/cmake/Variables.cmake | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 3098b9aa59..4f40516917 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -79,27 +79,28 @@ elseif (ADDRESS_SIZE EQUAL 64) #message(STATUS "ADDRESS_SIZE is 64") set(ARCH x86_64) else (ADDRESS_SIZE EQUAL 32) - #message(STATUS "ADDRESS_SIZE is UNRECOGNIZED: '${ADDRESS_SIZE}'") - # Use Python's platform.machine() since uname -m isn't available everywhere. - # Even if you can assume cygwin uname -m, the answer depends on whether - # you're running 32-bit cygwin or 64-bit cygwin! But even 32-bit Python will - # report a 64-bit processor. - execute_process(COMMAND - "${PYTHON_EXECUTABLE}" "-c" - "import platform; print platform.machine()" - OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) - # We expect values of the form i386, i686, x86_64, AMD64. - # In CMake, expressing ARCH.endswith('64') is awkward: - string(LENGTH "${ARCH}" ARCH_LENGTH) - math(EXPR ARCH_LEN_2 "${ARCH_LENGTH} - 2") - string(SUBSTRING "${ARCH}" ${ARCH_LEN_2} 2 ARCH_LAST_2) - if (ARCH_LAST_2 STREQUAL 64) - #message(STATUS "ARCH is detected as 64; ARCH is ${ARCH}") + # Note we cannnot use if(DARWIN) here, this variable is set way lower + if( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" ) set(ADDRESS_SIZE 64) - else () - #message(STATUS "ARCH is detected as 32; ARCH is ${ARCH}") - set(ADDRESS_SIZE 32) - endif () + set(ARCH x86_64) + else() + # Use Python's platform.machine() since uname -m isn't available everywhere. + # Even if you can assume cygwin uname -m, the answer depends on whether + # you're running 32-bit cygwin or 64-bit cygwin! But even 32-bit Python will + # report a 64-bit processor. + execute_process(COMMAND + "${PYTHON_EXECUTABLE}" "-c" + "import platform; print( platform.machine() )" + OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) + string( REGEX MATCH ".*(64)$" RE_MATCH "${ARCH}" ) + if( RE_MATCH AND ${CMAKE_MATCH_1} STREQUAL "64" ) + set(ADDRESS_SIZE 64) + set(ARCH x86_64) + else() + set(ADDRESS_SIZE 32) + set(ARCH i686) + endif() + endif() endif (ADDRESS_SIZE EQUAL 32) if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") -- cgit v1.2.3 From 42820f834fcd68c40dc71f1be2a2b7d50096f148 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 7 May 2022 17:29:16 +0200 Subject: Remove unused LL_ARCH/LL_ARCH_DIR --- indra/cmake/UI.cmake | 20 -------------------- indra/cmake/Variables.cmake | 12 +----------- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index 066975a3d0..8529576fda 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -51,23 +51,3 @@ target_include_directories( ll::uilibraries SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) - -# The following made no real sense -# - ${ARCH}_linux_INCLUDES was set in 00-Common.cmake, -# - Here ist is used, but as ${${LL_ARCH}_INCLUDES} -# It would make more sense to use one form ($LL_ARCH) -# Leave this out for the moment, but come back when looking at the Linux build - -#set(${ARCH}_linux_INCLUDES -# atk-1.0 -# glib-2.0 -# gstreamer-0.10 -# gtk-2.0 -# pango-1.0 -# ) -#foreach(include ${${LL_ARCH}_INCLUDES}) -# target_include_directories( ll::uilibraries SYSTEM INTERFACE -# ${LIBS_PREBUILT_DIR}/include/${include} -# ) -#endforeach(include) - diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 4f40516917..653db2069a 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -73,13 +73,11 @@ endif (NOT CMAKE_BUILD_TYPE) # If someone has specified an address size, use that to determine the # architecture. Otherwise, let the architecture specify the address size. if (ADDRESS_SIZE EQUAL 32) - #message(STATUS "ADDRESS_SIZE is 32") set(ARCH i686) elseif (ADDRESS_SIZE EQUAL 64) - #message(STATUS "ADDRESS_SIZE is 64") set(ARCH x86_64) else (ADDRESS_SIZE EQUAL 32) - # Note we cannnot use if(DARWIN) here, this variable is set way lower + # Note we cannot use if(DARWIN) here, this variable is set way lower if( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" ) set(ADDRESS_SIZE 64) set(ARCH x86_64) @@ -105,8 +103,6 @@ endif (ADDRESS_SIZE EQUAL 32) if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") set(WINDOWS ON BOOL FORCE) - set(LL_ARCH ${ARCH}_win32) - set(LL_ARCH_DIR ${ARCH}-win32) endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") @@ -133,9 +129,6 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") include(ConfigurePkgConfig) - set(LL_ARCH ${ARCH}_linux) - set(LL_ARCH_DIR ${ARCH}-linux) - if (INSTALL_PROPRIETARY) # Only turn on headless if we can find osmesa libraries. include(FindPkgConfig) @@ -204,9 +197,6 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(CMAKE_OSX_ARCHITECTURES "${ARCH}") string(REPLACE "i686" "i386" CMAKE_OSX_ARCHITECTURES "${CMAKE_OSX_ARCHITECTURES}") string(REPLACE "AMD64" "x86_64" CMAKE_OSX_ARCHITECTURES "${CMAKE_OSX_ARCHITECTURES}") - - set(LL_ARCH ${ARCH}_darwin) - set(LL_ARCH_DIR universal-darwin) endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # Default deploy grid -- cgit v1.2.3 From 6b0427dbc2e88271f7704a6c65f2bc2ea11a5928 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 8 May 2022 01:34:21 +0200 Subject: - Slightly better documentation string for --configuration, as this really is used for the configs build subdirectory. - Always pass the correct configuration for --buildtype - Use 'buildtype' when determining defbug/release/... build. --configuration should not be used for this, as it is the subdirectories name (CMAKE_CFG_INTDIR) --- indra/lib/python/indra/util/llmanifest.py | 2 +- indra/newview/CMakeLists.txt | 8 ++++---- indra/newview/viewer_manifest.py | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py index c1c199a438..6705c86da9 100755 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -125,7 +125,7 @@ BASE_ARGUMENTS=[ but not application name (used internally)""", default=None), dict(name='configuration', - description="""The build configuration used.""", + description="""The build configurations sub directory used.""", default="Release"), dict(name='dest', description='Destination directory.', default=DEFAULT_SRCTREE), dict(name='grid', diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 93a29645d0..022f39cfae 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1749,7 +1749,7 @@ if (WINDOWS) "--fmodstudio=${USE_FMODSTUDIO}" "--openal=${USE_OPENAL}" --build=${CMAKE_CURRENT_BINARY_DIR} - --buildtype=$,$,> + --buildtype=$ "--channel=${VIEWER_CHANNEL}" --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/$,$,> @@ -1809,7 +1809,7 @@ if (WINDOWS) "--fmodstudio=${USE_FMODSTUDIO}" "--openal=${USE_OPENAL}" --build=${CMAKE_CURRENT_BINARY_DIR} - --buildtype=$,$,> + --buildtype=$ "--channel=${VIEWER_CHANNEL}" --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/$,$,> @@ -2042,7 +2042,7 @@ if (DARWIN) "--fmodstudio=${USE_FMODSTUDIO}" "--openal=${USE_OPENAL}" --build=${CMAKE_CURRENT_BINARY_DIR} - --buildtype=${CMAKE_BUILD_TYPE} + --buildtype=$ --bundleid=${MACOSX_BUNDLE_GUI_IDENTIFIER} "--channel=${VIEWER_CHANNEL}" --configuration=${CMAKE_CFG_INTDIR} @@ -2077,7 +2077,7 @@ if (DARWIN) "--fmodstudio=${USE_FMODSTUDIO}" "--openal=${USE_OPENAL}" --build=${CMAKE_CURRENT_BINARY_DIR} - --buildtype=$,$,> + --buildtype=$ "--channel=${VIEWER_CHANNEL}" --configuration=${CMAKE_CFG_INTDIR} --dest=${VIEWER_APP_BUNDLE} diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 2b37715b9c..0d62aeeb86 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -435,7 +435,7 @@ class WindowsManifest(ViewerManifest): self.cmakedirs(os.path.dirname(dst)) self.created_paths.append(dst) if not os.path.isdir(src): - if(self.args['configuration'].lower() == 'debug'): + if(self.args['buildtype'].lower() == 'debug'): test_assembly_binding(src, "Microsoft.VC80.DebugCRT", "8.0.50727.4053") else: test_assembly_binding(src, "Microsoft.VC80.CRT", "8.0.50727.4053") @@ -458,7 +458,7 @@ class WindowsManifest(ViewerManifest): self.created_paths.append(dst) if not os.path.isdir(src): try: - if(self.args['configuration'].lower() == 'debug'): + if(self.args['buildtype'].lower() == 'debug'): test_assembly_binding(src, "Microsoft.VC80.DebugCRT", "") else: test_assembly_binding(src, "Microsoft.VC80.CRT", "") @@ -515,7 +515,7 @@ class WindowsManifest(ViewerManifest): # Get fmodstudio dll if needed if self.args['fmodstudio'] == 'ON': - if(self.args['configuration'].lower() == 'debug'): + if(self.args['buildtype'].lower() == 'debug'): self.path("fmodL.dll") else: self.path("fmod.dll") @@ -1045,7 +1045,7 @@ class DarwinManifest(ViewerManifest): # Fmod studio dylibs (vary based on configuration) if self.args['fmodstudio'] == 'ON': - if self.args['configuration'].lower() == 'debug': + if self.args['buildtype'].lower() == 'debug': for libfile in ( "libfmodL.dylib", ): -- cgit v1.2.3 From 59f6062685efd4c52f06c526e52a9fa00ddfabeb Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 5 Jun 2022 16:15:00 +0200 Subject: Bring back comments for EXTERNAL_TOS and LL_IGNORE_SIGCHLD --- indra/cmake/00-Common.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 8c6ec9a6cc..279e7ca1b9 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -113,6 +113,14 @@ endif (WINDOWS) if (LINUX) set(CMAKE_SKIP_RPATH TRUE) + # EXTERNAL_TOS + # force this platform to accept TOS via external browser + + # LL_IGNORE_SIGCHLD + # don't catch SIGCHLD in our base application class for the viewer - some of + # our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The + # viewer doesn't need to catch SIGCHLD anyway. + add_compile_definitions( _REENTRANT _FORTIFY_SOURCE=2 -- cgit v1.2.3 From c08a61453b21664da3687661512e2ea208f90d98 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 5 Jun 2022 16:15:55 +0200 Subject: Port new cmake files (Trace/Meshoptimizer) to modern cmake --- indra/cmake/CMakeLists.txt | 1 - indra/cmake/LLMeshOptimizer.cmake | 7 ------- indra/cmake/MESHOPTIMIZER.cmake | 13 ++++++++---- indra/cmake/Tracy.cmake | 25 +++++++----------------- indra/cmake/UI.cmake | 1 + indra/llmeshoptimizer/CMakeLists.txt | 38 +++++++++++++----------------------- indra/llui/CMakeLists.txt | 6 +----- indra/newview/CMakeLists.txt | 6 +++--- 8 files changed, 35 insertions(+), 62 deletions(-) delete mode 100644 indra/cmake/LLMeshOptimizer.cmake diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index e592418a18..ec143d86c9 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -37,7 +37,6 @@ set(cmake_SOURCE_FILES LLCommon.cmake LLImage.cmake LLKDU.cmake - LLMeshOptimizer.cmake LLPhysicsExtensions.cmake LLPrimitive.cmake LLSharedLibs.cmake diff --git a/indra/cmake/LLMeshOptimizer.cmake b/indra/cmake/LLMeshOptimizer.cmake deleted file mode 100644 index b79944f618..0000000000 --- a/indra/cmake/LLMeshOptimizer.cmake +++ /dev/null @@ -1,7 +0,0 @@ -# -*- cmake -*- - -set(LLMESHOPTIMIZER_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/llmeshoptimizer - ) - -set(LLMESHOPTIMIZER_LIBRARIES llmeshoptimizer) diff --git a/indra/cmake/MESHOPTIMIZER.cmake b/indra/cmake/MESHOPTIMIZER.cmake index 1c5b47b9bd..0d51f47866 100644 --- a/indra/cmake/MESHOPTIMIZER.cmake +++ b/indra/cmake/MESHOPTIMIZER.cmake @@ -3,14 +3,19 @@ include(Linking) include(Prebuilt) +include_guard() +add_library( ll::meshoptimizer INTERFACE IMPORTED ) + +use_conan_binary(meshoptimizer) use_prebuilt_binary(meshoptimizer) if (WINDOWS) - set(MESHOPTIMIZER_LIBRARIES meshoptimizer.lib) + target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.lib) + set(MESHOPTIMIZER_LIBRARIES ) elseif (LINUX) - set(MESHOPTIMIZER_LIBRARIES meshoptimizer.o) + target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.o) elseif (DARWIN) - set(MESHOPTIMIZER_LIBRARIES libmeshoptimizer.a) + target_link_libraries( ll::meshoptimizer INTERFACE libmeshoptimizer.a) endif (WINDOWS) -set(MESHOPTIMIZER_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/meshoptimizer) +target_include_directories( ll::meshoptimizer SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/meshoptimizer) diff --git a/indra/cmake/Tracy.cmake b/indra/cmake/Tracy.cmake index cfff956bcf..c7563f1b7e 100644 --- a/indra/cmake/Tracy.cmake +++ b/indra/cmake/Tracy.cmake @@ -1,29 +1,18 @@ # -*- cmake -*- include(Prebuilt) +include_guard() +add_library( ll::tracy INTERFACE IMPORTED ) + set(USE_TRACY OFF CACHE BOOL "Use Tracy profiler.") if (USE_TRACY) - set(TRACY_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/tracy) - -# See: indra/llcommon/llprofiler.h - add_definitions(-DLL_PROFILER_CONFIGURATION=3) + use_conan_binary(tracy) use_prebuilt_binary(tracy) - if (WINDOWS) - MESSAGE(STATUS "Including Tracy for Windows: '${TRACY_INCLUDE_DIR}'") - endif (WINDOWS) + target_include_directories( ll::tracy SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/tracy) - if (DARWIN) - MESSAGE(STATUS "Including Tracy for Darwin: '${TRACY_INCLUDE_DIR}'") - endif (DARWIN) - - if (LINUX) - MESSAGE(STATUS "Including Tracy for Linux: '${TRACY_INCLUDE_DIR}'") - endif (LINUX) -else (USE_TRACY) - # Tracy.cmake should not set LLCOMMON_INCLUDE_DIRS, let LLCommon.cmake do that - set(TRACY_INCLUDE_DIR "") - set(TRACY_LIBRARY "") +# See: indra/llcommon/llprofiler.h + target_compile_definitions(ll::tracy INTERFACE LL_PROFILER_CONFIGURATION=3 ) endif (USE_TRACY) diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index 8529576fda..c02ad3e161 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -44,6 +44,7 @@ if( WINDOWS ) Vfw32 wer winspool + imm32 ) endif() diff --git a/indra/llmeshoptimizer/CMakeLists.txt b/indra/llmeshoptimizer/CMakeLists.txt index 016794cfad..47cb424feb 100644 --- a/indra/llmeshoptimizer/CMakeLists.txt +++ b/indra/llmeshoptimizer/CMakeLists.txt @@ -8,37 +8,27 @@ include(00-Common) include(LLCommon) include(LLMath) -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLMESHOPTIMIZER_INCLUDE_DIR} - ${MESHOPTIMIZER_INCLUDE_DIRS} - ${LIBS_PREBUILT_DIR}/include #access to boost headers, needed for LLError - ) - set(llmeshoptimizer_SOURCE_FILES - llmeshoptimizer.cpp - ) + llmeshoptimizer.cpp + ) set(llmeshoptimizer_HEADER_FILES - CMakeLists.txt - - llmeshoptimizer.h - ) + CMakeLists.txt + llmeshoptimizer.h + ) set_source_files_properties(${llmeshoptimizer_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) + PROPERTIES HEADER_FILE_ONLY TRUE) list(APPEND llmeshoptimizer_SOURCE_FILES ${llmeshoptimizer_HEADER_FILES}) -#if (USE_MESHOPT) - add_library (llmeshoptimizer ${llmeshoptimizer_SOURCE_FILES}) +add_library (llmeshoptimizer ${llmeshoptimizer_SOURCE_FILES}) +target_include_directories( llmeshoptimizer INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) + +target_link_libraries(llmeshoptimizer + llcommon + llmath + ll::meshoptimizer) - target_link_libraries(llmeshoptimizer - ${LLCOMMON_LIBRARIES} - ${LLMATH_LIBRARIES} - ${MESHOPTIMIZER_LIBRARIES}) - - # Add tests +# Add tests -#endif (USE_MESHOPT) diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index c2c819c80e..9108c6143c 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -280,10 +280,6 @@ if(LL_TESTS) if(NOT LINUX) set(test_libs llui llmessage llcorehttp llxml llrender llcommon ll::hunspell ) - if(WINDOWS) - LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "imm32;${test_libs}") - else(WINDOWS) - LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}") - endif(WINDOWS) + LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}") endif(NOT LINUX) endif(LL_TESTS) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 22251d6cf8..d392e43dc6 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -27,7 +27,7 @@ include(LLCommon) include(LLCoreHttp) include(LLImage) include(LLKDU) -include(LLMeshOptimizer) +include(MESHOPTIMIZER) include(LLPhysicsExtensions) include(LLPrimitive) include(LLWindow) @@ -1884,7 +1884,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} llmath llcorehttp llcommon - ll::glod + llmeshoptimizer ll::ndof ll::uilibraries lllogin @@ -1892,7 +1892,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} llappearance ${LLPHYSICSEXTENSIONS_LIBRARIES} ll::bugsplat - ${TRACY_LIBRARY} + ll::tracy ) if( TARGET ll::intel_memops ) -- cgit v1.2.3 From c66f444d2b3af7c5ea5220db5302b693bbc54f54 Mon Sep 17 00:00:00 2001 From: Nicky Date: Mon, 20 Jun 2022 23:29:57 +0200 Subject: Cleanup dependency on ui libraries. --- indra/llwindow/CMakeLists.txt | 7 ++----- indra/newview/CMakeLists.txt | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index d09e5387b9..cc60625683 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -56,15 +56,12 @@ set(llwindow_LINK_LIBRARIES llxml ll::glh_linear ll::glext + ll::uilibraries + ll::SDL ) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level if (LINUX) - list( APPEND llwindow_LINK_LIBRARIES - ll::uilibraries - ll::SDL - ) - list(APPEND viewer_SOURCE_FILES llkeyboardsdl.cpp llwindowsdl.cpp diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index d392e43dc6..a7cbf43d35 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1886,7 +1886,6 @@ target_link_libraries(${VIEWER_BINARY_NAME} llcommon llmeshoptimizer ll::ndof - ll::uilibraries lllogin llprimitive llappearance -- cgit v1.2.3 From 3f31d0b5a70af4ebf746d40d478b4e948e904a87 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 17 Jul 2022 17:51:25 +0200 Subject: Be more explicit: Rename use_conan_binary to use_system_binary, this will allow us to reuse the macro for more than just conan. --- indra/CMakeLists.txt | 8 +++++--- indra/cmake/APR.cmake | 2 +- indra/cmake/Audio.cmake | 2 +- indra/cmake/CURL.cmake | 2 +- indra/cmake/Copy3rdPartyLibs.cmake | 2 +- indra/cmake/DBusGlib.cmake | 6 +++--- indra/cmake/EXPAT.cmake | 2 +- indra/cmake/FreeType.cmake | 2 +- indra/cmake/GLEXT.cmake | 2 +- indra/cmake/GLH.cmake | 2 +- indra/cmake/GStreamer010Plugin.cmake | 2 +- indra/cmake/Hunspell.cmake | 2 +- indra/cmake/JPEG.cmake | 2 +- indra/cmake/JsonCpp.cmake | 2 +- indra/cmake/LLPrimitive.cmake | 2 +- indra/cmake/LLWindow.cmake | 4 ++-- indra/cmake/MESHOPTIMIZER.cmake | 2 +- indra/cmake/NGHTTP2.cmake | 2 +- indra/cmake/OpenJPEG.cmake | 2 +- indra/cmake/OpenSSL.cmake | 2 +- indra/cmake/PNG.cmake | 2 +- indra/cmake/Prebuilt.cmake | 2 +- indra/cmake/Tracy.cmake | 2 +- indra/cmake/URIPARSER.cmake | 2 +- indra/cmake/XmlRpcEpi.cmake | 2 +- 25 files changed, 32 insertions(+), 30 deletions(-) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 4bac78c2ef..541e29bcbf 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -17,11 +17,13 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_CURRENT_BINARY_DIR}" include(conanbuildinfo OPTIONAL RESULT_VARIABLE USE_CONAN ) if( USE_CONAN ) - set( USE_CONAN ON ) - conan_basic_setup(TARGETS NO_OUTPUT_DIRS) - add_compile_definitions(LL_USESYSTEMLIBS USE_CONAN) + set( USE_CONAN ON ) + set( USE_AUTOBUILD_3P OFF ) + conan_basic_setup(TARGETS NO_OUTPUT_DIRS) + add_compile_definitions(LL_USESYSTEMLIBS USE_CONAN NO_AUTOBUILD_3P) else() set( USE_CONAN OFF ) + set( USE_AUTOBUILD_3P ON ) endif() set(CXX_STANDARD 14) diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index 898979c47e..8a0939c92c 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -5,7 +5,7 @@ include_guard() add_library( ll::apr INTERFACE IMPORTED ) -use_conan_binary( apr apr-util ) +use_system_binary( apr apr-util ) use_prebuilt_binary(apr_suite) if (WINDOWS) diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake index 4b06de0a08..38547bb017 100644 --- a/indra/cmake/Audio.cmake +++ b/indra/cmake/Audio.cmake @@ -4,7 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::vorbis INTERFACE IMPORTED ) -use_conan_binary(vorbis) +use_system_binary(vorbis) use_prebuilt_binary(ogg_vorbis) target_include_directories( ll::vorbis SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index 7c93819e75..b9f685f37b 100644 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -4,7 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::libcurl INTERFACE IMPORTED ) -use_conan_binary(libcurl) +use_system_binary(libcurl) use_prebuilt_binary(curl) if (WINDOWS) target_link_libraries(ll::libcurl INTERFACE libcurl.lib) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index c894b40a53..e43d4757bb 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -210,7 +210,7 @@ elseif(LINUX) ${EXPAT_COPY} ) - if( NOT USE_CONAN ) + if( USE_AUTOBUILD_3P ) list( APPEND release_files libapr-1.so.0 libaprutil-1.so.0 diff --git a/indra/cmake/DBusGlib.cmake b/indra/cmake/DBusGlib.cmake index 9151742fe0..f75018ad0e 100644 --- a/indra/cmake/DBusGlib.cmake +++ b/indra/cmake/DBusGlib.cmake @@ -3,11 +3,11 @@ include(Prebuilt) add_library( ll::dbus INTERFACE IMPORTED) -# Only define this when using conan, lls prebuild is broken -if( USE_CONAN ) +# Only define this when not using the prebuild 3ps, lls prebuild is broken +if( NOT USE_AUTOBUILD_3P ) target_compile_definitions( ll::dbus INTERFACE LL_DBUS_ENABLED ) endif() -use_conan_binary(dbus) +use_system_binary(dbus) use_prebuilt_binary(dbus_glib) diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake index e5c9dd5582..327fe8aa72 100644 --- a/indra/cmake/EXPAT.cmake +++ b/indra/cmake/EXPAT.cmake @@ -4,7 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::expat INTERFACE IMPORTED ) -use_conan_binary(expat) +use_system_binary(expat) use_prebuilt_binary(expat) if (WINDOWS) target_link_libraries( ll::expat INTERFACE libexpatMT ) diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake index 92130402f9..77140af641 100644 --- a/indra/cmake/FreeType.cmake +++ b/indra/cmake/FreeType.cmake @@ -4,7 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::freetype INTERFACE IMPORTED ) -use_conan_binary(freetype) +use_system_binary(freetype) use_prebuilt_binary(freetype) target_include_directories( ll::freetype SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/freetype2/) target_link_libraries( ll::freetype INTERFACE freetype ) diff --git a/indra/cmake/GLEXT.cmake b/indra/cmake/GLEXT.cmake index 70477cf0af..434b6f0ee8 100644 --- a/indra/cmake/GLEXT.cmake +++ b/indra/cmake/GLEXT.cmake @@ -4,7 +4,7 @@ include(GLH) add_library( ll::glext INTERFACE IMPORTED ) if (WINDOWS OR LINUX) - use_conan_binary(glext) + use_system_binary(glext) use_prebuilt_binary(glext) endif (WINDOWS OR LINUX) diff --git a/indra/cmake/GLH.cmake b/indra/cmake/GLH.cmake index 18521b5069..0cefc3543a 100644 --- a/indra/cmake/GLH.cmake +++ b/indra/cmake/GLH.cmake @@ -3,5 +3,5 @@ include(Prebuilt) add_library( ll::glh_linear INTERFACE IMPORTED ) -use_conan_binary( glh_linear ) +use_system_binary( glh_linear ) use_prebuilt_binary(glh_linear) diff --git a/indra/cmake/GStreamer010Plugin.cmake b/indra/cmake/GStreamer010Plugin.cmake index 0b6a7a21c3..61f6f74033 100644 --- a/indra/cmake/GStreamer010Plugin.cmake +++ b/indra/cmake/GStreamer010Plugin.cmake @@ -6,7 +6,7 @@ endif() add_library( ll::gstreamer INTERFACE IMPORTED ) target_compile_definitions( ll::gstreamer INTERFACE LL_GSTREAMER010_ENABLED=1) -use_conan_binary(gstreamer) +use_system_binary(gstreamer) use_prebuilt_binary(gstreamer) diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake index 6e92611cc9..bb037c0237 100644 --- a/indra/cmake/Hunspell.cmake +++ b/indra/cmake/Hunspell.cmake @@ -5,7 +5,7 @@ include_guard() use_prebuilt_binary(dictionaries) add_library( ll::hunspell INTERFACE IMPORTED ) -use_conan_binary(hunspell) +use_system_binary(hunspell) use_prebuilt_binary(libhunspell) if (WINDOWS) target_link_libraries( ll::hunspell INTERFACE libhunspell) diff --git a/indra/cmake/JPEG.cmake b/indra/cmake/JPEG.cmake index 900fc77c40..252d7852d4 100644 --- a/indra/cmake/JPEG.cmake +++ b/indra/cmake/JPEG.cmake @@ -6,7 +6,7 @@ include(Linking) include_guard() add_library( ll::libjpeg INTERFACE IMPORTED ) -use_conan_binary(libjpeg) +use_system_binary(libjpeg) use_prebuilt_binary(jpeglib) if (LINUX) target_link_libraries( ll::libjpeg INTERFACE jpeg) diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake index f62b2bdd7a..17f8e47a97 100644 --- a/indra/cmake/JsonCpp.cmake +++ b/indra/cmake/JsonCpp.cmake @@ -4,7 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::jsoncpp INTERFACE IMPORTED ) -use_conan_binary(jsoncpp) +use_system_binary(jsoncpp) use_prebuilt_binary(jsoncpp) if (WINDOWS) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 3e5ff4963b..04afe5e405 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -18,7 +18,7 @@ if( USE_CONAN ) "${CONAN_INCLUDE_DIRS_COLLADADOM}/collada-dom/1.4/" ) endif() -use_conan_binary( colladadom ) +use_system_binary( colladadom ) use_prebuilt_binary(colladadom) use_prebuilt_binary(minizip-ng) # needed for colladadom diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index 0136d56723..b36e970560 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -9,10 +9,10 @@ add_library( ll::SDL INTERFACE IMPORTED ) if (LINUX) - #Must come first as use_conan_binary can exit this file early + #Must come first as use_system_binary can exit this file early target_compile_definitions( ll::SDL INTERFACE LL_SDL=1) - use_conan_binary(SDL) + use_system_binary(SDL) use_prebuilt_binary(SDL) target_include_directories( ll::SDL SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/MESHOPTIMIZER.cmake b/indra/cmake/MESHOPTIMIZER.cmake index 0d51f47866..d1d4df067f 100644 --- a/indra/cmake/MESHOPTIMIZER.cmake +++ b/indra/cmake/MESHOPTIMIZER.cmake @@ -6,7 +6,7 @@ include(Prebuilt) include_guard() add_library( ll::meshoptimizer INTERFACE IMPORTED ) -use_conan_binary(meshoptimizer) +use_system_binary(meshoptimizer) use_prebuilt_binary(meshoptimizer) if (WINDOWS) diff --git a/indra/cmake/NGHTTP2.cmake b/indra/cmake/NGHTTP2.cmake index 27f273674b..6396a5bd01 100644 --- a/indra/cmake/NGHTTP2.cmake +++ b/indra/cmake/NGHTTP2.cmake @@ -4,7 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::nghttp2 INTERFACE IMPORTED ) -use_conan_binary(nghttp2) +use_system_binary(nghttp2) use_prebuilt_binary(nghttp2) if (WINDOWS) target_link_libraries( ll::nghttp2 INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib) diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index b016c22a4e..f0311439bf 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -4,7 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::openjpeg INTERFACE IMPORTED ) -use_conan_binary(openjpeg) +use_system_binary(openjpeg) use_prebuilt_binary(openjpeg) target_link_libraries(ll::openjpeg INTERFACE openjpeg ) diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake index 0d3f3ad9b4..3387c74f45 100644 --- a/indra/cmake/OpenSSL.cmake +++ b/indra/cmake/OpenSSL.cmake @@ -4,7 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::openssl INTERFACE IMPORTED ) -use_conan_binary(openssl) +use_system_binary(openssl) use_prebuilt_binary(openssl) if (WINDOWS) target_link_libraries(ll::openssl INTERFACE libssl libcrypto) diff --git a/indra/cmake/PNG.cmake b/indra/cmake/PNG.cmake index 8e870f631f..044262bc8d 100644 --- a/indra/cmake/PNG.cmake +++ b/indra/cmake/PNG.cmake @@ -4,7 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::libpng INTERFACE IMPORTED ) -use_conan_binary(libpng) +use_system_binary(libpng) use_prebuilt_binary(libpng) if (WINDOWS) target_link_libraries(ll::libpng INTERFACE libpng16) diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 542b4462e4..f0239711aa 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -58,7 +58,7 @@ macro (use_prebuilt_binary _binary) endmacro (use_prebuilt_binary _binary) #Sadly we need a macro here, otherwise the return() will not properly work -macro ( use_conan_binary package ) +macro ( use_system_binary package ) if( USE_CONAN ) target_link_libraries( ll::${package} INTERFACE CONAN_PKG::${package} ) foreach( extra_pkg "${ARGN}" ) diff --git a/indra/cmake/Tracy.cmake b/indra/cmake/Tracy.cmake index c7563f1b7e..b3de06a876 100644 --- a/indra/cmake/Tracy.cmake +++ b/indra/cmake/Tracy.cmake @@ -7,7 +7,7 @@ add_library( ll::tracy INTERFACE IMPORTED ) set(USE_TRACY OFF CACHE BOOL "Use Tracy profiler.") if (USE_TRACY) - use_conan_binary(tracy) + use_system_binary(tracy) use_prebuilt_binary(tracy) target_include_directories( ll::tracy SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/tracy) diff --git a/indra/cmake/URIPARSER.cmake b/indra/cmake/URIPARSER.cmake index b1c76c006a..6c33ff70e1 100644 --- a/indra/cmake/URIPARSER.cmake +++ b/indra/cmake/URIPARSER.cmake @@ -6,7 +6,7 @@ include(Prebuilt) add_library( ll::uriparser INTERFACE IMPORTED ) -use_conan_binary( uriparser ) +use_system_binary( uriparser ) use_prebuilt_binary(uriparser) if (WINDOWS) diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index 7cb0efdab7..6409f9d6e2 100644 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -4,7 +4,7 @@ include(Prebuilt) include_guard() add_library( ll::xmlrpc-epi INTERFACE IMPORTED ) -use_conan_binary( xmlrpc-epi ) +use_system_binary( xmlrpc-epi ) use_prebuilt_binary(xmlrpc-epi) target_link_libraries(ll::xmlrpc-epi INTERFACE xmlrpc-epi ) -- cgit v1.2.3 From c0f709b637d800fe07fb265c8ab6f28080994224 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 18 Jun 2022 11:53:57 -0400 Subject: DRTVWR-564: Add LL::apply(): call function, passing args from tuple. This anticipates C++17's std::apply(), and in fact once we detect C++17, we'll just use that. But in C++14 we must still provide our own implementation. (cherry picked from commit dc2e2cd76f387ea6e80787fb94adcbc269cd1f25) --- indra/llcommon/apply.h | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 indra/llcommon/apply.h diff --git a/indra/llcommon/apply.h b/indra/llcommon/apply.h new file mode 100644 index 0000000000..ef4a8fd68b --- /dev/null +++ b/indra/llcommon/apply.h @@ -0,0 +1,51 @@ +/** + * @file apply.h + * @author Nat Goodspeed + * @date 2022-06-18 + * @brief C++14 version of std::apply() + * + * $LicenseInfo:firstyear=2022&license=viewerlgpl$ + * Copyright (c) 2022, Linden Research, Inc. + * $/LicenseInfo$ + */ + +#if ! defined(LL_APPLY_H) +#define LL_APPLY_H + +#include + +namespace LL +{ + +#if __cplusplus >= 201703L + +// C++17 implementation +using std::apply; + +#else // C++14 + +// Derived from https://stackoverflow.com/a/20441189 +// and https://en.cppreference.com/w/cpp/utility/apply +template +auto apply_impl(CALLABLE&& func, TUPLE&& args, std::index_sequence) +{ + // call func(unpacked args) + return std::forward(func)(std::move(std::get(args))...); +} + +template +auto apply(CALLABLE&& func, std::tuple&& args) +{ + // std::index_sequence_for is the magic sauce here, generating an argument + // pack of indexes for each entry in args. apply_impl() can then pass + // those to std::get() to unpack args into individual arguments. + return apply_impl(std::forward(func), + std::forward>(args), + std::index_sequence_for{}); +} + +#endif // C++14 + +} // namespace LL + +#endif /* ! defined(LL_APPLY_H) */ -- cgit v1.2.3 From 15d37713b9113a6f70dde48c764df02c76e18cbc Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 22 Aug 2022 21:00:42 -0400 Subject: DRTVWR-558: Fix builds on macOS 12.5 Monterey. Always search for python3[.exe] instead of plain 'python'. macOS Monterey no longer bundles Python 2 at all. Explicitly make PYTHON_EXECUTABLE a cached value so if the user edits it in CMakeCache.txt, it won't be overwritten by indra/cmake/Python.cmake. Do NOT set DYLD_LIBRARY_PATH for test executables! That has Bad Effects, as discussed in https://stackoverflow.com/q/73418423/5533635. Instead, create symlinks from build-mumble/sharedlibs/Resources -> Release/Resources and from build-mumble/test/Resources -> ../sharedlibs/Release/Resources. For test executables in sharedlibs/RelWithDebInfo and test/RelWithDebInfo, this supports our dylibs' baked-in load path @executable_path/../Resources. That load path assumes running in a standard app bundle (which the viewer in fact does), but we've been avoiding creating an app bundle for every test program. These symlinks allow us to continue doing that while avoiding DYLD_LIBRARY_PATH. Add indra/llcommon/apply.h. The LL::apply() function and its wrapper macro VAPPLY were very useful in diagnosing the problem. Tweak llleap_test.cpp. This source was modified extensively for diagnostic purposes; these are the small improvements that remain. --- indra/cmake/Copy3rdPartyLibs.cmake | 5 +++ indra/cmake/Python.cmake | 17 ++++----- indra/cmake/run_build_test.py | 2 +- indra/llcommon/apply.h | 68 ++++++++++++++++++++++++++++++++++-- indra/llcommon/tests/llleap_test.cpp | 14 +++----- indra/test/CMakeLists.txt | 11 ++++-- 6 files changed, 95 insertions(+), 22 deletions(-) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index ff705101de..c2e1bb4b85 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -151,6 +151,11 @@ elseif(DARWIN) set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug/Resources") set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/Resources") set(SHARED_LIB_STAGING_DIR_RELEASE "${SHARED_LIB_STAGING_DIR}/Release/Resources") + # Support our "@executable_path/../Resources" load path for executables + # that end up in any of the above SHARED_LIB_STAGING_DIR_MUMBLE + # directories. + file(CREATE_LINK "Release/Resources" "${SHARED_LIB_STAGING_DIR}/Resources" + SYMBOLIC) set(vivox_lib_dir "${ARCH_PREBUILT_DIRS_RELEASE}") set(slvoice_files SLVoice) diff --git a/indra/cmake/Python.cmake b/indra/cmake/Python.cmake index ed595f6966..5be3cbdf11 100644 --- a/indra/cmake/Python.cmake +++ b/indra/cmake/Python.cmake @@ -5,8 +5,8 @@ set(PYTHONINTERP_FOUND) if (WINDOWS) # On Windows, explicitly avoid Cygwin Python. - find_program(PYTHON_EXECUTABLE - NAMES python.exe + find_program(python + NAMES python3.exe python.exe NO_DEFAULT_PATH # added so that cmake does not find cygwin python PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.7\\InstallPath] @@ -18,19 +18,20 @@ if (WINDOWS) [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.8\\InstallPath] [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.9\\InstallPath] [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.10\\InstallPath] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.11\\InstallPath] + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.11\\InstallPath] ) include(FindPythonInterp) else() - find_program(PYTHON_EXECUTABLE python3) + find_program(python python3) - if (PYTHON_EXECUTABLE) + if (python) set(PYTHONINTERP_FOUND ON) - endif (PYTHON_EXECUTABLE) + endif (python) endif (WINDOWS) -if (NOT PYTHON_EXECUTABLE) +if (NOT python) message(FATAL_ERROR "No Python interpreter found") -endif (NOT PYTHON_EXECUTABLE) +endif (NOT python) +set(PYTHON_EXECUTABLE "${python}" CACHE FILEPATH "Python interpreter for builds") mark_as_advanced(PYTHON_EXECUTABLE) diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py index 1e92868ae7..1f040bded5 100755 --- a/indra/cmake/run_build_test.py +++ b/indra/cmake/run_build_test.py @@ -73,7 +73,7 @@ def main(command, arguments=[], libpath=[], vars={}): if sys.platform == "win32": lpvars = ["PATH"] elif sys.platform == "darwin": - lpvars = ["LD_LIBRARY_PATH", "DYLD_LIBRARY_PATH"] + lpvars = ["LD_LIBRARY_PATH"] # , "DYLD_LIBRARY_PATH"] elif sys.platform.startswith("linux"): lpvars = ["LD_LIBRARY_PATH"] else: diff --git a/indra/llcommon/apply.h b/indra/llcommon/apply.h index ef4a8fd68b..7c58d63bc0 100644 --- a/indra/llcommon/apply.h +++ b/indra/llcommon/apply.h @@ -12,11 +12,48 @@ #if ! defined(LL_APPLY_H) #define LL_APPLY_H +#include #include namespace LL { +/** + * USAGE NOTE: + * https://stackoverflow.com/a/40523474/5533635 + * + * If you're trying to pass apply() a variadic function, the compiler + * complains that it can't deduce the callable type, presumably because it + * doesn't know which arity to reify to pass. + * + * But it works to wrap the variadic function in a generic lambda, e.g.: + * + * @CODE + * LL::apply( + * [](auto&&... args) + * { + * return variadic(std::forward(args)...); + * }, + * args); + * @ENDCODE + * + * Presumably this is because there's only one instance of the generic lambda + * @em type, with a variadic operator()(). + * + * It's pointless to provide a wrapper @em function that implicitly supplies + * the generic lambda. You couldn't pass your variadic function to our wrapper + * function, for the same original reason! + * + * Instead we provide a wrapper @em macro. Sorry, Dr. Stroustrup. + */ +#define VAPPLY(FUNC, ARGS) \ + LL::apply( \ + [](auto&&... args) \ + { \ + return (FUNC)(std::forward(args)...); \ + }, \ + (ARGS)) + #if __cplusplus >= 201703L // C++17 implementation @@ -34,16 +71,43 @@ auto apply_impl(CALLABLE&& func, TUPLE&& args, std::index_sequence) } template -auto apply(CALLABLE&& func, std::tuple&& args) +auto apply(CALLABLE&& func, const std::tuple& args) { // std::index_sequence_for is the magic sauce here, generating an argument // pack of indexes for each entry in args. apply_impl() can then pass // those to std::get() to unpack args into individual arguments. return apply_impl(std::forward(func), - std::forward>(args), + args, std::index_sequence_for{}); } +// per https://stackoverflow.com/a/57510428/5533635 +template +auto apply(CALLABLE&& func, const std::array& args) +{ + return apply(std::forward(func), std::tuple_cat(args)); +} + +// per https://stackoverflow.com/a/28411055/5533635 +template +auto apply_impl(CALLABLE&& func, const std::vector& args, std::index_sequence) +{ + return apply_impl(std::forward(func), + std::make_tuple(std::forward(args[I])...), + I...); +} + +// this goes beyond C++17 std::apply() +template +auto apply(CALLABLE&& func, const std::vector& args) +{ + constexpr auto arity = boost::function_traits::arity; + assert(args.size() == arity); + return apply_impl(std::forward(func), + args, + std::make_index_sequence()); +} + #endif // C++14 } // namespace LL diff --git a/indra/llcommon/tests/llleap_test.cpp b/indra/llcommon/tests/llleap_test.cpp index 9754353ab0..25db4b6542 100644 --- a/indra/llcommon/tests/llleap_test.cpp +++ b/indra/llcommon/tests/llleap_test.cpp @@ -15,10 +15,11 @@ #include "llleap.h" // STL headers // std headers +#include // external library headers +//#include #include #include -#include // other Linden headers #include "../test/lltut.h" #include "../test/namedtempfile.h" @@ -29,7 +30,6 @@ #include "llstring.h" #include "stringize.h" #include "StringVec.h" -#include using boost::assign::list_of; @@ -110,11 +110,6 @@ namespace tut "import os\n" "import sys\n" "\n" - // Don't forget that this Python script is written to some - // temp directory somewhere! Its __file__ is useless in - // finding indra/lib/python. Use our __FILE__, with - // raw-string syntax to deal with Windows pathnames. - "mydir = os.path.dirname(r'" << __FILE__ << "')\n" "from llbase import llsd\n" "\n" "class ProtocolError(Exception):\n" @@ -241,9 +236,10 @@ namespace tut "import sys\n" "sys.stderr.write('''Hello from Python!\n" "note partial line''')\n"); + StringVec vcommand{ PYTHON, script.getName() }; +// std::string command{ boost::algorithm::join(vcommand, " ") }; CaptureLog log(LLError::LEVEL_INFO); - waitfor(LLLeap::create(get_test_name(), - sv(list_of(PYTHON)(script.getName())))); + waitfor(LLLeap::create(get_test_name(), vcommand)); log.messageWith("Hello from Python!"); log.messageWith("note partial line"); } diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 084aa8d9f7..161e957784 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -116,14 +116,21 @@ if (WINDOWS) LINK_FLAGS "/NODEFAULTLIB:LIBCMT" LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\"" ) +elseif (DARWIN) + # Support our "@executable_path/../Resources" load path for our test + # executable. This SHOULD properly be "$/Resources", + # but the CMake $ generator expression isn't evaluated by + # CREATE_LINK, so fudge it. + file(CREATE_LINK "../sharedlibs/Release/Resources" "${CMAKE_BINARY_DIR}/test/Resources" + SYMBOLIC) endif (WINDOWS) set(TEST_EXE $) -SET_TEST_PATH(DYLD_LIBRARY_PATH) +SET_TEST_PATH(LD_LIBRARY_PATH) LL_TEST_COMMAND(command - "${DYLD_LIBRARY_PATH}" + "${LD_LIBRARY_PATH}" "${TEST_EXE}" "--output=${CMAKE_CURRENT_BINARY_DIR}/cpp_test_results.txt" "--touch=${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt") -- cgit v1.2.3 From 7bef77cf4b3ae2552c54289a38ae2cc4aaea8e3c Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 23 Aug 2022 12:55:38 -0400 Subject: DRTVWR-558: macOS Monterey objdump apparently needs --option instead of -option as before. --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index de5ac5ed3d..2e0b3506f9 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -908,7 +908,7 @@ class DarwinManifest(ViewerManifest): # Let exception, if any, propagate -- if this doesn't # work, we need the build to noisily fail! oldpath = subprocess.check_output( - ['objdump', '-macho', '-dylib-id', '-non-verbose', + ['objdump', '--macho', '--dylib-id', '--non-verbose', os.path.join(relpkgdir, "BugsplatMac.framework", "BugsplatMac")] ).splitlines()[-1] # take the last line of output self.run_command( -- cgit v1.2.3 From 7d996857cc04b83f73714fca3c723fd7528a688c Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 23 Aug 2022 15:14:18 -0400 Subject: DRTVWR-558: Fix Release variable-set-but-unused error. --- indra/newview/llskinningutil.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp index cf3519c1c7..8bdccfd9f6 100644 --- a/indra/newview/llskinningutil.cpp +++ b/indra/newview/llskinningutil.cpp @@ -264,6 +264,9 @@ void LLSkinningUtil::getPerVertexSkinMatrix( // SL-366 - with weight validation/cleanup code, it should no longer be // possible to hit the bad scale case. llassert(valid_weights); + // When building for Release, the above llassert() goes away. Ward off + // variable-set-but-unused error. + (void)valid_weights; } void LLSkinningUtil::initJointNums(LLMeshSkinInfo* skin, LLVOAvatar *avatar) -- cgit v1.2.3 From 94c571887b853781efdb19f951c85ab7350f71a2 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 23 Aug 2022 17:21:31 -0400 Subject: DRTVWR-558: Streamline and generalize Windows Python search. --- indra/cmake/Python.cmake | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/indra/cmake/Python.cmake b/indra/cmake/Python.cmake index 5be3cbdf11..dbf5033ce5 100644 --- a/indra/cmake/Python.cmake +++ b/indra/cmake/Python.cmake @@ -5,20 +5,36 @@ set(PYTHONINTERP_FOUND) if (WINDOWS) # On Windows, explicitly avoid Cygwin Python. + # if the user has their own version of Python installed, prefer that + foreach(hive HKEY_CURRENT_USER HKEY_LOCAL_MACHINE) + # prefer more recent Python versions to older ones, if multiple versions + # are installed + foreach(pyver 3.11 3.10 3.9 3.8 3.7) + list(APPEND regpaths "[${hive}\\SOFTWARE\\Python\\PythonCore\\${pyver}\\InstallPath]") + endforeach() + endforeach() + + # TODO: This logic has the disadvantage that if you have multiple versions + # of Python installed, the selected path won't necessarily be the newest - + # e.g. this GLOB will prefer Python310 to Python311. But since pymaybe is + # checked AFTER the registry entries, this will only surface as a problem if + # no installed Python appears in the registry. + file(GLOB pymaybe + "$ENV{PROGRAMFILES}/Python*" +## "$ENV{PROGRAMFILES(X86)}/Python*" + # The Windows environment variable is in fact as shown above, but CMake + # disallows querying an environment variable containing parentheses - + # thanks, Windows. Fudge by just appending " (x86)" to $PROGRAMFILES and + # hoping for the best. + "$ENV{PROGRAMFILES} (x86)/Python*" + "c:/Python*") + find_program(python NAMES python3.exe python.exe NO_DEFAULT_PATH # added so that cmake does not find cygwin python PATHS - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.7\\InstallPath] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.8\\InstallPath] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.9\\InstallPath] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.10\\InstallPath] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.11\\InstallPath] - [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.7\\InstallPath] - [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.8\\InstallPath] - [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.9\\InstallPath] - [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.10\\InstallPath] - [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.11\\InstallPath] + ${regpaths} + ${pymaybe} ) include(FindPythonInterp) else() -- cgit v1.2.3 From 2c95174031ecf3970bee685d90c3e2469cd15254 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 23 Aug 2022 17:23:40 -0400 Subject: DRTVWR-558: Remove references to string join() per code review. --- indra/llcommon/tests/llleap_test.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/indra/llcommon/tests/llleap_test.cpp b/indra/llcommon/tests/llleap_test.cpp index 25db4b6542..daa84df792 100644 --- a/indra/llcommon/tests/llleap_test.cpp +++ b/indra/llcommon/tests/llleap_test.cpp @@ -17,7 +17,6 @@ // std headers #include // external library headers -//#include #include #include // other Linden headers @@ -237,7 +236,6 @@ namespace tut "sys.stderr.write('''Hello from Python!\n" "note partial line''')\n"); StringVec vcommand{ PYTHON, script.getName() }; -// std::string command{ boost::algorithm::join(vcommand, " ") }; CaptureLog log(LLError::LEVEL_INFO); waitfor(LLLeap::create(get_test_name(), vcommand)); log.messageWith("Hello from Python!"); -- cgit v1.2.3 From 65612700f389d453d4817fb3f68429a60ea144b8 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 24 Aug 2022 14:00:16 -0400 Subject: DRTVWR-558: Eliminate many spurious set-not-used variables. With Xcode 13.4, these unused variables break Release builds. --- indra/llmath/llvolume.cpp | 4 ---- indra/llmessage/lldatapacker.cpp | 6 ------ indra/llmessage/llthrottle.cpp | 8 -------- indra/llprimitive/llmodel.cpp | 4 ---- indra/llui/lllayoutstack.cpp | 2 -- indra/llwindow/llwindowmacosx.cpp | 12 ------------ indra/newview/llfasttimerview.cpp | 14 -------------- indra/newview/llinventorymodel.cpp | 9 +++------ indra/newview/lllegacyatmospherics.cpp | 19 ------------------- indra/newview/llmeshrepository.cpp | 10 ---------- indra/newview/llmodelpreview.cpp | 4 ---- indra/newview/llpatchvertexarray.cpp | 2 -- indra/newview/llpresetsmanager.cpp | 2 -- indra/newview/llsceneview.cpp | 12 +----------- indra/newview/llviewertexturelist.cpp | 5 ++--- indra/newview/llvopartgroup.cpp | 7 ------- indra/newview/llworld.cpp | 8 +------- 17 files changed, 7 insertions(+), 121 deletions(-) diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 4a069b0f63..ac6fb9acb3 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -1625,9 +1625,6 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split, //genNGon(params, llfloor(MIN_DETAIL_FACES * detail), 4.f, 0.f); genNGon(params, llfloor(MIN_DETAIL_FACES * detail)); - F32 t = 0.f; - F32 tStep = 1.0f / mPath.size(); - F32 toggle = 0.5f; for (S32 i=0;i<(S32)mPath.size();i++) { @@ -1636,7 +1633,6 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split, toggle = -0.5f; else toggle = 0.5f; - t += tStep; } } diff --git a/indra/llmessage/lldatapacker.cpp b/indra/llmessage/lldatapacker.cpp index 96c1297e0d..b6adc102d2 100644 --- a/indra/llmessage/lldatapacker.cpp +++ b/indra/llmessage/lldatapacker.cpp @@ -127,13 +127,7 @@ BOOL LLDataPacker::unpackFixed(F32 &value, const char *name, total_bits++; } - S32 min_val; U32 max_val; - if (is_signed) - { - min_val = 1 << int_bits; - min_val *= -1; - } max_val = 1 << int_bits; F32 fixed_val; diff --git a/indra/llmessage/llthrottle.cpp b/indra/llmessage/llthrottle.cpp index 7605da4d3f..e659414e8c 100644 --- a/indra/llmessage/llthrottle.cpp +++ b/indra/llmessage/llthrottle.cpp @@ -374,7 +374,6 @@ BOOL LLThrottleGroup::dynamicAdjust() } mDynamicAdjustTime = mt_sec; - S32 total = 0; // Update historical information for (i = 0; i < TC_EOF; i++) { @@ -391,7 +390,6 @@ BOOL LLThrottleGroup::dynamicAdjust() } mBitsSentThisPeriod[i] = 0; - total += ll_round(mBitsSentHistory[i]); } // Look for busy channels @@ -437,12 +435,6 @@ BOOL LLThrottleGroup::dynamicAdjust() { channel_over_nominal[i] = FALSE; } - - //if (total) - //{ - // LL_INFOS() << i << ": B" << channel_busy[i] << " I" << channel_idle[i] << " N" << channel_over_nominal[i]; - // LL_CONT << " Nom: " << mNominalBPS[i] << " Cur: " << mCurrentBPS[i] << " BS: " << mBitsSentHistory[i] << LL_ENDL; - //} } if (channels_busy) diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 285c5f656b..4b505a79c4 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -889,7 +889,6 @@ LLSD LLModel::writeModel( LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite, BOOL as_slm) { - U32 bytes = 0; std::string::size_type cur_offset = 0; @@ -912,7 +911,6 @@ LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite, BO header["skin"]["offset"] = (LLSD::Integer) cur_offset; header["skin"]["size"] = (LLSD::Integer) size; cur_offset += size; - bytes += size; } } @@ -928,7 +926,6 @@ LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite, BO header["physics_convex"]["offset"] = (LLSD::Integer) cur_offset; header["physics_convex"]["size"] = (LLSD::Integer) size; cur_offset += size; - bytes += size; } } @@ -950,7 +947,6 @@ LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite, BO header[model_names[i]]["offset"] = (LLSD::Integer) cur_offset; header[model_names[i]]["size"] = (LLSD::Integer) size; cur_offset += size; - bytes += size; } } diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index aac28e04b9..77938edf27 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -395,7 +395,6 @@ void LLLayoutStack::updateLayout() space_to_distribute += panelp ? ll_round((F32)mPanelSpacing * panelp->getVisibleAmount()) : 0; S32 remaining_space = space_to_distribute; - F32 fraction_distributed = 0.f; if (space_to_distribute > 0 && total_visible_fraction > 0.f) { // give space proportionally to visible auto resize panels BOOST_FOREACH(LLLayoutPanel* panelp, mPanels) @@ -404,7 +403,6 @@ void LLLayoutStack::updateLayout() { F32 fraction_to_distribute = (panelp->mFractionalSize * panelp->getAutoResizeFactor()) / (total_visible_fraction); S32 delta = ll_round((F32)space_to_distribute * fraction_to_distribute); - fraction_distributed += fraction_to_distribute; panelp->mTargetDim += delta; remaining_space -= delta; } diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index bc4f07941b..b44c6138f4 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -621,8 +621,6 @@ void LLWindowMacOSX::getMouseDeltas(float* delta) BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL enable_vsync) { - BOOL glNeedsInit = FALSE; - mFullscreen = fullscreen; if (mWindow == NULL) @@ -636,10 +634,6 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits // Get the view instead. mGLView = createOpenGLView(mWindow, mFSAASamples, enable_vsync); mContext = getCGLContextObj(mGLView); - - // Since we just created the context, it needs to be set up. - glNeedsInit = TRUE; - gGLManager.mVRAM = getVramSize(mGLView); } @@ -1719,12 +1713,6 @@ void LLSplashScreenMacOSX::showImpl() void LLSplashScreenMacOSX::updateImpl(const std::string& mesg) { - if(mWindow != NULL) - { - CFStringRef string = NULL; - - string = CFStringCreateWithCString(NULL, mesg.c_str(), kCFStringEncodingUTF8); - } } diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 1605e4133d..9bb3bac104 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -504,20 +504,6 @@ void LLFastTimerView::exportCharts(const std::string& base, const std::string& t is.close(); } - //get time domain - LLSD::Real cur_total_time = 0.0; - - for (U32 i = 0; i < cur_data.size(); ++i) - { - cur_total_time += cur_data[i]["Total"]["Time"].asReal(); - } - - LLSD::Real base_total_time = 0.0; - for (U32 i = 0; i < base_data.size(); ++i) - { - base_total_time += base_data[i]["Total"]["Time"].asReal(); - } - //allocate raw scratch space LLPointer scratch = new LLImageRaw(1024, 512, 3); diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 37500176ea..ad957fa039 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -3132,7 +3132,6 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account, U32 gInventory.accountForUpdate(update); } - U32 changes = 0x0; if (account) { mask |= LLInventoryObserver::CREATE; @@ -3140,7 +3139,7 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account, U32 //as above, this loop never seems to loop more than once per call for (item_array_t::iterator it = items.begin(); it != items.end(); ++it) { - changes |= gInventory.updateItem(*it, mask); + gInventory.updateItem(*it, mask); } gInventory.notifyObservers(); gViewerWindow->getWindow()->decBusyCount(); @@ -4551,13 +4550,11 @@ void LLInventoryModel::FetchItemHttpHandler::processData(LLSD & content, LLCore: } // as above, this loop never seems to loop more than once per call - U32 changes(0U); for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); ++it) { - changes |= gInventory.updateItem(*it); + gInventory.updateItem(*it); } - // *HUH: Have computed 'changes', nothing uses it. - + gInventory.notifyObservers(); gViewerWindow->getWindow()->decBusyCount(); } diff --git a/indra/newview/lllegacyatmospherics.cpp b/indra/newview/lllegacyatmospherics.cpp index 1364067949..bbbde0711f 100644 --- a/indra/newview/lllegacyatmospherics.cpp +++ b/indra/newview/lllegacyatmospherics.cpp @@ -386,7 +386,6 @@ void LLAtmospherics::updateFog(const F32 distance, const LLVector3& tosun_in) return; } - const BOOL hide_clip_plane = TRUE; LLColor4 target_fog(0.f, 0.2f, 0.5f, 0.f); const F32 water_height = gAgent.getRegion() ? gAgent.getRegion()->getWaterHeight() : 0.f; @@ -472,25 +471,12 @@ void LLAtmospherics::updateFog(const F32 distance, const LLVector3& tosun_in) render_fog_color = sky_fog_color; - F32 fog_density = 0.f; fog_distance = mFogRatio * distance; if (camera_height > water_height) { LLColor4 fog(render_fog_color); mGLFogCol = fog; - - if (hide_clip_plane) - { - // For now, set the density to extend to the cull distance. - const F32 f_log = 2.14596602628934723963618357029f; // sqrt(fabs(log(0.01f))) - fog_density = f_log/fog_distance; - } - else - { - const F32 f_log = 4.6051701859880913680359829093687f; // fabs(log(0.01f)) - fog_density = (f_log)/fog_distance; - } } else { @@ -498,8 +484,6 @@ void LLAtmospherics::updateFog(const F32 distance, const LLVector3& tosun_in) F32 depth = water_height - camera_height; // get the water param manager variables - float water_fog_density = pwater->getModifiedWaterFogDensity(depth <= 0.0f); - LLColor4 water_fog_color(pwater->getWaterFogColor()); // adjust the color based on depth. We're doing linear approximations @@ -512,9 +496,6 @@ void LLAtmospherics::updateFog(const F32 distance, const LLVector3& tosun_in) // set the gl fog color mGLFogCol = fogCol; - - // set the density based on what the shaders use - fog_density = water_fog_density * gSavedSettings.getF32("WaterGLFogDensityScale"); } mFogColor = sky_fog_color; diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index d28e929b48..a6d55b4ae9 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2055,16 +2055,6 @@ EMeshProcessingResult LLMeshRepoThread::physicsShapeReceived(const LLUUID& mesh_ if (volume->unpackVolumeFaces(stream, data_size)) { //load volume faces into decomposition buffer - S32 vertex_count = 0; - S32 index_count = 0; - - for (S32 i = 0; i < volume->getNumVolumeFaces(); ++i) - { - const LLVolumeFace& face = volume->getVolumeFace(i); - vertex_count += face.mNumVertices; - index_count += face.mNumIndices; - } - d->mPhysicsShapeMesh.clear(); std::vector& pos = d->mPhysicsShapeMesh.mPositions; diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index 3bca4fde83..54ec41026d 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -2680,8 +2680,6 @@ void LLModelPreview::clearBuffers() void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights) { - U32 tri_count = 0; - U32 vertex_count = 0; U32 mesh_count = 0; @@ -2817,8 +2815,6 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights) mVertexBuffer[lod][mdl].push_back(vb); - vertex_count += num_vertices; - tri_count += num_indices / 3; ++mesh_count; } diff --git a/indra/newview/llpatchvertexarray.cpp b/indra/newview/llpatchvertexarray.cpp index 6e3e375488..a7011dfad5 100644 --- a/indra/newview/llpatchvertexarray.cpp +++ b/indra/newview/llpatchvertexarray.cpp @@ -69,11 +69,9 @@ void LLPatchVertexArray::create(U32 surface_width, U32 patch_width, F32 meters_p // (The -1 is there because an LLSurface has a buffer of 1 on // its East and North edges). U32 power_of_two = 1; - U32 surface_order = 0; while (power_of_two < (surface_width-1)) { power_of_two *= 2; - surface_order += 1; } if (power_of_two == (surface_width-1)) diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index c267c3c699..30d0a22ef0 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -332,7 +332,6 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n else { ECameraPreset new_camera_preset = (ECameraPreset)gSavedSettings.getU32("CameraPresetType"); - bool new_camera_offsets = false; if (IS_CAMERA) { if (isDefaultCameraPreset(name)) @@ -354,7 +353,6 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n { new_camera_preset = CAMERA_PRESET_CUSTOM; } - new_camera_offsets = (!isDefaultCameraPreset(name) || (ECameraPreset)gSavedSettings.getU32("CameraPresetType") != new_camera_preset); } for (std::vector::iterator it = name_list.begin(); it != name_list.end(); ++it) { diff --git a/indra/newview/llsceneview.cpp b/indra/newview/llsceneview.cpp index f7aa63e34d..5e339a52bf 100644 --- a/indra/newview/llsceneview.cpp +++ b/indra/newview/llsceneview.cpp @@ -207,7 +207,7 @@ void LLSceneView::draw() for (U32 i = 0; i < count; ++i) { F32 rad = size[idx][i]; - total += rad; + total += rad; F32 y = (rad-size_domain[0])/size_range*size_rect.getHeight()+size_rect.mBottom; F32 x = (F32) i / count * size_rect.getWidth() + size_rect.mLeft; @@ -266,14 +266,11 @@ void LLSceneView::draw() U32 count = triangles[idx].size(); - U32 total = 0; - gGL.begin(LLRender::LINE_STRIP); //plot triangles for (U32 i = 0; i < count; ++i) { U32 tri_count = triangles[idx][i]; - total += tri_count; F32 y = (F32) (tri_count-tri_domain[0])/triangle_range*tri_rect.getHeight()+tri_rect.mBottom; F32 x = (F32) i / count * tri_rect.getWidth() + tri_rect.mLeft; @@ -290,15 +287,8 @@ void LLSceneView::draw() gGL.end(); gGL.flush(); - U32 total_visible = 0; count = visible_triangles[idx].size(); - for (U32 i = 0; i < count; ++i) - { - U32 tri_count = visible_triangles[idx][i]; - total_visible += tri_count; - } - std::string label = llformat("%s Object Triangle Counts (Ktris) -- Visible: %.2f/%.2f (%.2f KB Visible)", category[idx], total_visible_triangles[idx]/1024.f, total_triangles[idx]/1024.f, total_visible_bytes[idx]/1024.f); diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index bbbf9ea7a3..ce7432964e 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1148,15 +1148,14 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time) total_update_count--; } } - - S32 fetch_count = 0; + size_t min_update_count = llmin(MIN_UPDATE_COUNT,(S32)(entries.size()-max_priority_count)); S32 min_count = max_priority_count + min_update_count; for (entries_list_t::iterator iter3 = entries.begin(); iter3 != entries.end(); ) { LLViewerFetchedTexture* imagep = *iter3++; - fetch_count += (imagep->updateFetch() ? 1 : 0); + imagep->updateFetch(); if (min_count <= min_update_count) { mLastFetchKey = LLTextureKey(imagep->getID(), (ETexListType)imagep->getTextureListType()); diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 068e8a131d..51cf5f20c6 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -845,9 +845,6 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group) std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater()); - U32 index_count = 0; - U32 vertex_count = 0; - group->clearDrawMap(); LLVertexBuffer* buffer = group->mVertexBuffer; @@ -912,10 +909,6 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group) llassert(facep->getGeomCount() == 4); llassert(facep->getIndicesCount() == 6); - - vertex_count += facep->getGeomCount(); - index_count += facep->getIndicesCount(); - S32 idx = draw_vec.size()-1; BOOL fullbright = facep->isState(LLFace::FULLBRIGHT); diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 8abb49fba8..05e3aa783f 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -762,15 +762,11 @@ void LLWorld::updateParticles() void LLWorld::renderPropertyLines() { - S32 region_count = 0; - S32 vertex_count = 0; - for (region_list_t::iterator iter = mVisibleRegionList.begin(); iter != mVisibleRegionList.end(); ++iter) { LLViewerRegion* regionp = *iter; - region_count++; - vertex_count += regionp->renderPropertyLines(); + regionp->renderPropertyLines(); } } @@ -778,7 +774,6 @@ void LLWorld::renderPropertyLines() void LLWorld::updateNetStats() { F64Bits bits; - U32 packets = 0; for (region_list_t::iterator iter = mActiveRegionList.begin(); iter != mActiveRegionList.end(); ++iter) @@ -786,7 +781,6 @@ void LLWorld::updateNetStats() LLViewerRegion* regionp = *iter; regionp->updateNetStats(); bits += regionp->mBitsReceived; - packets += llfloor( regionp->mPacketsReceived ); regionp->mBitsReceived = (F32Bits)0.f; regionp->mPacketsReceived = 0.f; } -- cgit v1.2.3 From 96ec4b3a54268416e59fe68e597e5aea4579bd44 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 24 Aug 2022 14:01:16 -0400 Subject: DRTVWR-558: Re-enable --leap command-line switch for dev builds. The --leap command-line switch is independent of updater processing. It should NOT be suppressed when the updater is suppressed. --leap is used for viewer testing, which is important for dev builds! --- indra/newview/llappviewer.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 60797c87d9..1e62b88dfa 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1185,12 +1185,8 @@ bool LLAppViewer::init() { LL_WARNS("InitInfo") << "Skipping updater check." << LL_ENDL; } +#endif //LL_RELEASE_FOR_DOWNLOAD - if (mUpdaterNotFound) - { - LL_WARNS("InitInfo") << "Failed to launch updater. Skipping Leap commands." << LL_ENDL; - } - else { // Iterate over --leap command-line options. But this is a bit tricky: if // there's only one, it won't be an array at all. @@ -1223,7 +1219,6 @@ bool LLAppViewer::init() << "lleventhost no longer supported as a dynamic library" << LL_ENDL; } -#endif //LL_RELEASE_FOR_DOWNLOAD LLTextUtil::TextHelpers::iconCallbackCreationFunction = create_text_segment_icon_from_url_match; -- cgit v1.2.3 From 35de5fc912c908fb1c3c5257f28e72ffebe796c4 Mon Sep 17 00:00:00 2001 From: Callum Linden Date: Thu, 25 Aug 2022 10:04:02 -0700 Subject: SL-18021 Generate a VS 2019 build of the Viewer using current third party libraries: replace hard coded VS 2017 '150' maginc number with another magic number - for VS 2019 --- autobuild.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autobuild.xml b/autobuild.xml index e0f82a45eb..68bfa4b0a1 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3114,7 +3114,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors windows build_directory - build-vc${AUTOBUILD_VSVER|150}-$AUTOBUILD_ADDRSIZE + build-vc${AUTOBUILD_VSVER|160}-$AUTOBUILD_ADDRSIZE configurations RelWithDebInfo -- cgit v1.2.3 From 2dc4aec9936186eeaa0867745bb94168f569849b Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 26 Aug 2022 17:21:01 -0400 Subject: DRTVWR-568: Eliminate more blockers to C++17 language standard. --- indra/llinventory/llparcel.cpp | 2 +- indra/llui/lldockablefloater.h | 3 ++- indra/newview/llappearancemgr.h | 3 ++- indra/newview/llfavoritesbar.cpp | 7 +++++-- indra/newview/llfloater360capture.cpp | 6 ++++-- indra/newview/llfloaterregioninfo.cpp | 12 +++++------- indra/newview/lltoast.h | 3 ++- indra/newview/llwatchdog.cpp | 13 ++++++------- indra/test/lldoubledispatch_tut.cpp | 11 ++++++----- 9 files changed, 33 insertions(+), 27 deletions(-) diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index e25dae8a90..8db926fddf 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -1268,5 +1268,5 @@ U32 LLParcel::countExperienceKeyType( U32 type ) return std::count_if( boost::begin(mExperienceKeys | boost::adaptors::map_values), boost::end(mExperienceKeys | boost::adaptors::map_values), - std::bind2nd(std::equal_to(), type)); + [type](U32 key){ return (key == type); }); } diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h index 89c9852f4a..5d90b3ef4e 100644 --- a/indra/llui/lldockablefloater.h +++ b/indra/llui/lldockablefloater.h @@ -30,6 +30,7 @@ #include "llerror.h" #include "llfloater.h" #include "lldockcontrol.h" +#include /** * Represents floater that can dock. @@ -131,7 +132,7 @@ protected: boost::function mIsDockedStateForcedCallback; private: - std::auto_ptr mDockControl; + std::unique_ptr mDockControl; LLUIImagePtr mDockTongue; static LLHandle sInstanceHandle; /** diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 8a55a848db..cf953d21ac 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -35,6 +35,7 @@ #include "llinventoryobserver.h" #include "llviewerinventory.h" #include "llcorehttputil.h" +#include class LLWearableHoldingPattern; class LLInventoryCallback; @@ -276,7 +277,7 @@ private: LLUUID mCOFImageID; - std::auto_ptr mUnlockOutfitTimer; + std::unique_ptr mUnlockOutfitTimer; // Set of temp attachment UUIDs that should be removed typedef std::set doomed_temp_attachments_t; diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index a02bb56489..4f2769a507 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -848,8 +848,11 @@ void LLFavoritesBarCtrl::updateButtons(bool force_update) if (getChildList()->size() > 0) { //find last visible child to get the rightest button offset - child_list_const_reverse_iter_t last_visible_it = std::find_if(childs->rbegin(), childs->rend(), - std::mem_fun(&LLView::getVisible)); + child_list_const_reverse_iter_t last_visible_it = + std::find_if( + childs->rbegin(), childs->rend(), + [](const child_list_t::value_type& child) + { return child->getVisible(); }); if(last_visible_it != childs->rend()) { last_right_edge = (*last_visible_it)->getRect().mRight; diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index ffbb0bbee9..279a8f68ea 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -889,8 +889,10 @@ const std::string LLFloater360Capture::generate_proposed_filename() // this looks complex but it's straightforward - removes all non-alpha chars from a string // which in this case is the SL region name - we use it as a proposed filename but the user is free to change std::string region_name = region->getName(); - std::replace_if(region_name.begin(), region_name.end(), std::not1(std::ptr_fun(isalnum)), '_'); - if (region_name.length() > 0) + std::replace_if(region_name.begin(), region_name.end(), + [](char c){ return ! std::isalnum(c); }, + '_'); + if (! region_name.empty()) { filename << region_name; filename << "_"; diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 296e155d28..bf38a495bb 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -656,13 +656,11 @@ void LLFloaterRegionInfo::refreshFromRegion(LLViewerRegion* region) } // call refresh from region on all panels - std::for_each( - mInfoPanels.begin(), - mInfoPanels.end(), - llbind2nd( - std::mem_fun(&LLPanelRegionInfo::refreshFromRegion), - region)); - mEnvironmentPanel->refreshFromRegion(region); + for (const auto& infoPanel : mInfoPanels) + { + infoPanel->refreshFromRegion(region); + } + mEnvironmentPanel->refreshFromRegion(region); } // public diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index 69074b1670..ab559f1e6f 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -35,6 +35,7 @@ #include "llviewercontrol.h" #include "lltexteditor.h" +#include #define MOUSE_LEAVE false #define MOUSE_ENTER true @@ -222,7 +223,7 @@ private: LLPanel* mWrapperPanel; // timer counts a lifetime of a toast - std::auto_ptr mTimer; + std::unique_ptr mTimer; F32 mToastLifetime; // in seconds F32 mToastFadingTime; // in seconds diff --git a/indra/newview/llwatchdog.cpp b/indra/newview/llwatchdog.cpp index 0aa0280b25..ceff5cc8ee 100644 --- a/indra/newview/llwatchdog.cpp +++ b/indra/newview/llwatchdog.cpp @@ -222,18 +222,17 @@ void LLWatchdog::run() if(current_run_delta > (WATCHDOG_SLEEP_TIME_USEC * TIME_ELAPSED_MULTIPLIER)) { LL_INFOS() << "Watchdog thread delayed: resetting entries." << LL_ENDL; - std::for_each(mSuspects.begin(), - mSuspects.end(), - std::mem_fun(&LLWatchdogEntry::reset) - ); + for (const auto& suspect : mSuspects) + { + suspect->reset(); + } } else { SuspectsRegistry::iterator result = std::find_if(mSuspects.begin(), - mSuspects.end(), - std::not1(std::mem_fun(&LLWatchdogEntry::isAlive)) - ); + mSuspects.end(), + [](const LLWatchdogEntry* suspect){ return ! suspect->isAlive(); }); if(result != mSuspects.end()) { // error!!! diff --git a/indra/test/lldoubledispatch_tut.cpp b/indra/test/lldoubledispatch_tut.cpp index ad8f6454d4..dbf55e666f 100644 --- a/indra/test/lldoubledispatch_tut.cpp +++ b/indra/test/lldoubledispatch_tut.cpp @@ -35,8 +35,9 @@ #include "lldoubledispatch.h" // STL headers // std headers -#include #include +#include +#include #include // external library headers // other Linden headers @@ -135,10 +136,10 @@ namespace tut // Instantiate a few GameObjects. Make sure we refer to them // polymorphically, and don't let them leak. - std::auto_ptr home; - std::auto_ptr obstacle; - std::auto_ptr tug; - std::auto_ptr patrol; + std::unique_ptr home; + std::unique_ptr obstacle; + std::unique_ptr tug; + std::unique_ptr patrol; // prototype objects Asteroid dummyAsteroid; -- cgit v1.2.3 From 592abc460c96b63b1b1e0d15914f7b64a0c88038 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 26 Aug 2022 22:49:16 -0400 Subject: DRTVWR-568: More cleanup of deleted obsolete std library features. --- indra/cmake/00-Common.cmake | 15 ++++--- indra/llcommon/llsd.h | 12 +++--- indra/llcommon/llstl.h | 81 ++++++++++++++++------------------- indra/llcommon/tests/llleap_test.cpp | 2 +- indra/llmessage/llioutil.h | 2 +- indra/llmessage/llmessagethrottle.cpp | 23 ---------- indra/newview/llgesturemgr.cpp | 4 +- 7 files changed, 56 insertions(+), 83 deletions(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 572422d080..16367f1d91 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -46,6 +46,13 @@ endif() set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release" CACHE STRING "Supported build types." FORCE) +# The viewer code base can now be successfully compiled with -std=c++14. But +# turning that on in the generic viewer-build-variables/variables file would +# potentially require tweaking each of our ~50 third-party library builds. +# Until we decide to set -std=c++14 in viewer-build-variables/variables, set +# it locally here: we want to at least prevent inadvertently reintroducing +# viewer code that would fail with C++14. +set(CMAKE_CXX_STANDARD 17) # Platform-specific compilation flags. @@ -173,13 +180,7 @@ if (DARWIN) # see Variables.cmake. string(REPLACE "-gdwarf-2" "-g${CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT}" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - # The viewer code base can now be successfully compiled with -std=c++14. But - # turning that on in the generic viewer-build-variables/variables file would - # potentially require tweaking each of our ~50 third-party library builds. - # Until we decide to set -std=c++14 in viewer-build-variables/variables, set - # it locally here: we want to at least prevent inadvertently reintroducing - # viewer code that would fail with C++14. - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags} -std=c++14") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}") # NOTE: it's critical that the optimization flag is put in front. # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered. diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h index 24cb9bbce1..3daaef44fc 100644 --- a/indra/llcommon/llsd.h +++ b/indra/llcommon/llsd.h @@ -421,42 +421,42 @@ public: static std::string typeString(Type type); // Return human-readable type as a string }; -struct llsd_select_bool : public std::unary_function +struct llsd_select_bool { LLSD::Boolean operator()(const LLSD& sd) const { return sd.asBoolean(); } }; -struct llsd_select_integer : public std::unary_function +struct llsd_select_integer { LLSD::Integer operator()(const LLSD& sd) const { return sd.asInteger(); } }; -struct llsd_select_real : public std::unary_function +struct llsd_select_real { LLSD::Real operator()(const LLSD& sd) const { return sd.asReal(); } }; -struct llsd_select_float : public std::unary_function +struct llsd_select_float { F32 operator()(const LLSD& sd) const { return (F32)sd.asReal(); } }; -struct llsd_select_uuid : public std::unary_function +struct llsd_select_uuid { LLSD::UUID operator()(const LLSD& sd) const { return sd.asUUID(); } }; -struct llsd_select_string : public std::unary_function +struct llsd_select_string { LLSD::String operator()(const LLSD& sd) const { diff --git a/indra/llcommon/llstl.h b/indra/llcommon/llstl.h index a90c2c7e08..25131291f9 100644 --- a/indra/llcommon/llstl.h +++ b/indra/llcommon/llstl.h @@ -142,7 +142,7 @@ struct DeletePairedPointerArray // llselect2nd())); template -struct DeletePointerFunctor : public std::unary_function +struct DeletePointerFunctor { bool operator()(T* ptr) const { @@ -153,7 +153,7 @@ struct DeletePointerFunctor : public std::unary_function // See notes about DeleteArray for why you should consider avoiding this. template -struct DeleteArrayFunctor : public std::unary_function +struct DeleteArrayFunctor { bool operator()(T* ptr) const { @@ -395,16 +395,17 @@ OutputIter ll_transform_n( // select... with the stl. Look up usage on the sgi website. template -struct _LLSelect1st : public std::unary_function<_Pair, typename _Pair::first_type> { - const typename _Pair::first_type& operator()(const _Pair& __x) const { +struct _LLSelect1st +{ + const auto& operator()(const _Pair& __x) const { return __x.first; } }; template -struct _LLSelect2nd : public std::unary_function<_Pair, typename _Pair::second_type> +struct _LLSelect2nd { - const typename _Pair::second_type& operator()(const _Pair& __x) const { + const auto& operator()(const _Pair& __x) const { return __x.second; } }; @@ -416,9 +417,7 @@ template struct llselect2nd : public _LLSelect2nd<_Pair> {}; // compose... with the stl. Look up usage on the sgi website. template -class ll_unary_compose : - public std::unary_function +class ll_unary_compose { protected: _Operation1 __op1; @@ -426,8 +425,9 @@ protected: public: ll_unary_compose(const _Operation1& __x, const _Operation2& __y) : __op1(__x), __op2(__y) {} - typename _Operation1::result_type - operator()(const typename _Operation2::argument_type& __x) const { + template + auto + operator()(const _Op2Arg& __x) const { return __op1(__op2(__x)); } }; @@ -441,8 +441,7 @@ llcompose1(const _Operation1& __op1, const _Operation2& __op2) template class ll_binary_compose - : public std::unary_function { +{ protected: _Operation1 _M_op1; _Operation2 _M_op2; @@ -451,8 +450,9 @@ public: ll_binary_compose(const _Operation1& __x, const _Operation2& __y, const _Operation3& __z) : _M_op1(__x), _M_op2(__y), _M_op3(__z) { } - typename _Operation1::result_type - operator()(const typename _Operation2::argument_type& __x) const { + template + auto + operator()(const OP2ARG& __x) const { return _M_op1(_M_op2(__x), _M_op3(__x)); } }; @@ -468,54 +468,51 @@ llcompose2(const _Operation1& __op1, const _Operation2& __op2, // helpers to deal with the fact that MSDev does not package // bind... with the stl. Again, this is from sgi. -template -class llbinder1st : - public std::unary_function { +template +class llbinder1st +{ protected: _Operation op; - typename _Operation::first_argument_type value; + _Arg1 value; public: - llbinder1st(const _Operation& __x, - const typename _Operation::first_argument_type& __y) + llbinder1st(const _Operation& __x, const _Arg1& __y) : op(__x), value(__y) {} - typename _Operation::result_type - operator()(const typename _Operation::second_argument_type& __x) const { - return op(value, __x); - } + template + auto + operator()(const _Arg2& __x) const { + return op(value, __x); + } }; template -inline llbinder1st<_Operation> +inline auto llbind1st(const _Operation& __oper, const _Tp& __x) { - typedef typename _Operation::first_argument_type _Arg1_type; - return llbinder1st<_Operation>(__oper, _Arg1_type(__x)); + return llbinder1st<_Operation, _Tp>(__oper, __x); } -template +template class llbinder2nd - : public std::unary_function { +{ protected: _Operation op; - typename _Operation::second_argument_type value; + _Arg2 value; public: llbinder2nd(const _Operation& __x, - const typename _Operation::second_argument_type& __y) + const _Arg2& __y) : op(__x), value(__y) {} - typename _Operation::result_type - operator()(const typename _Operation::first_argument_type& __x) const { + template + auto + operator()(const _Arg1& __x) const { return op(__x, value); } }; template -inline llbinder2nd<_Operation> +inline auto llbind2nd(const _Operation& __oper, const _Tp& __x) { - typedef typename _Operation::second_argument_type _Arg2_type; - return llbinder2nd<_Operation>(__oper, _Arg2_type(__x)); + return llbinder2nd<_Operation, _Tp>(__oper, __x); } /** @@ -548,8 +545,7 @@ bool before(const std::type_info* lhs, const std::type_info* rhs) namespace std { template <> - struct less: - public std::binary_function + struct less { bool operator()(const std::type_info* lhs, const std::type_info* rhs) const { @@ -558,8 +554,7 @@ namespace std }; template <> - struct less: - public std::binary_function + struct less { bool operator()(std::type_info* lhs, std::type_info* rhs) const { diff --git a/indra/llcommon/tests/llleap_test.cpp b/indra/llcommon/tests/llleap_test.cpp index daa84df792..7ee36a9ea6 100644 --- a/indra/llcommon/tests/llleap_test.cpp +++ b/indra/llcommon/tests/llleap_test.cpp @@ -525,7 +525,7 @@ namespace tut result.ensure(); } - struct TestLargeMessage: public std::binary_function + struct TestLargeMessage { TestLargeMessage(const std::string& PYTHON_, const std::string& reader_module_, const std::string& test_name_): diff --git a/indra/llmessage/llioutil.h b/indra/llmessage/llioutil.h index e8d245f530..c404a98bed 100644 --- a/indra/llmessage/llioutil.h +++ b/indra/llmessage/llioutil.h @@ -147,7 +147,7 @@ protected: * } * */ -class LLChangeChannel //: public unary_function +class LLChangeChannel { public: /** diff --git a/indra/llmessage/llmessagethrottle.cpp b/indra/llmessage/llmessagethrottle.cpp index 579d6d7187..14582aaf32 100644 --- a/indra/llmessage/llmessagethrottle.cpp +++ b/indra/llmessage/llmessagethrottle.cpp @@ -32,18 +32,8 @@ #include "llframetimer.h" // This is used for the stl search_n function. -#if _MSC_VER >= 1500 // VC9 has a bug in search_n -struct eq_message_throttle_entry : public std::binary_function< LLMessageThrottleEntry, LLMessageThrottleEntry, bool > -{ - bool operator()(const LLMessageThrottleEntry& a, const LLMessageThrottleEntry& b) const - { - return a.getHash() == b.getHash(); - } -}; -#else bool eq_message_throttle_entry(LLMessageThrottleEntry a, LLMessageThrottleEntry b) { return a.getHash() == b.getHash(); } -#endif const U64 SEC_TO_USEC = 1000000; @@ -118,14 +108,8 @@ BOOL LLMessageThrottle::addViewerAlert(const LLUUID& to, const std::string& mesg LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime()); // Check if this message is already in the list. -#if _MSC_VER >= 1500 // VC9 has a bug in search_n - // SJB: This *should* work but has not been tested yet *TODO: Test! - message_list_iterator_t found = std::find_if(message_list->begin(), message_list->end(), - std::bind2nd(eq_message_throttle_entry(), entry)); -#else message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(), 1, entry, eq_message_throttle_entry); -#endif if (found == message_list->end()) { // This message was not found. Add it to the list. @@ -152,15 +136,8 @@ BOOL LLMessageThrottle::addAgentAlert(const LLUUID& agent, const LLUUID& task, c LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime()); // Check if this message is already in the list. -#if _MSC_VER >= 1500 // VC9 has a bug in search_n - // SJB: This *should* work but has not been tested yet *TODO: Test! - message_list_iterator_t found = std::find_if(message_list->begin(), message_list->end(), - std::bind2nd(eq_message_throttle_entry(), entry)); -#else message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(), 1, entry, eq_message_throttle_entry); -#endif - if (found == message_list->end()) { // This message was not found. Add it to the list. diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 489d34edca..c0f773968d 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -757,11 +757,11 @@ S32 LLGestureMgr::getPlayingCount() const } -struct IsGesturePlaying : public std::unary_function +struct IsGesturePlaying { bool operator()(const LLMultiGesture* gesture) const { - return gesture->mPlaying ? true : false; + return bool(gesture->mPlaying); } }; -- cgit v1.2.3 From 435ff355ed637b2a45d90b8174f13948897f9af1 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 30 Aug 2022 16:15:30 -0400 Subject: DRTVWR-568: Update to colladadom build 574693 --- autobuild.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index e0f82a45eb..bd76fe64bb 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -236,9 +236,9 @@ archive hash - 4699b8389dfb754da0393ddb5d325722 + a880dfc15fcb330baf548a85324cd88a url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/95882/856117/colladadom-2.3.569219-darwin64-569219.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/104133/913090/colladadom-2.3.574693-darwin64-574693.tar.bz2 name darwin64 @@ -260,9 +260,9 @@ archive hash - 343e46ea49a08ad6596d3dc702d5b812 + 7e84441d9c7cf019a7bdc7b818b16c27 url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/95883/856128/colladadom-2.3.569219-windows-569219.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/104112/912957/colladadom-2.3.574693-windows-574693.tar.bz2 name windows @@ -272,16 +272,16 @@ archive hash - de5bdfb61b31db56c5fe7d0962ad11e2 + 2eaffbb8a93b03a732d3c47055a8efcb url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/95884/856129/colladadom-2.3.569219-windows64-569219.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/104135/913103/colladadom-2.3.574693-windows64-574693.tar.bz2 name windows64 version - 2.3.569219 + 2.3.574693 cubemaptoequirectangular -- cgit v1.2.3 From 56d5666f9afe87f2563c6bbb1d220573abd5351e Mon Sep 17 00:00:00 2001 From: Brad Kittenbrink Date: Tue, 30 Aug 2022 14:42:40 -0700 Subject: DRTVWR-568 need to update cmake minimum --- indra/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 68f6e962ef..0e7f52d189 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -4,7 +4,8 @@ # other commands to guarantee full compatibility # with the version specified ## 3.8 added VS_DEBUGGER_WORKING_DIRECTORY support -cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR) +## 3.14 added FILE CREATE_LINK +cmake_minimum_required(VERSION 3.14.0 FATAL_ERROR) set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING "The root project/makefile/solution name. Defaults to SecondLife.") -- cgit v1.2.3 From ef58b9751a514e5e63cd77f9f78e6513bc6403cd Mon Sep 17 00:00:00 2001 From: Callum Linden Date: Tue, 30 Aug 2022 15:20:04 -0700 Subject: DRTVWR-568: Pull in new 3p-colladadom build, tweak to VSVER number hardcoded into autobuild.xml for VS 2022 and update cmake script to copy the MSVC runtime (proper fix coming --- autobuild.xml | 16 ++++++++-------- indra/cmake/Copy3rdPartyLibs.cmake | 2 ++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 68bfa4b0a1..273d52d47d 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -236,9 +236,9 @@ archive hash - 4699b8389dfb754da0393ddb5d325722 + a880dfc15fcb330baf548a85324cd88a url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/95882/856117/colladadom-2.3.569219-darwin64-569219.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/104133/913090/colladadom-2.3.574693-darwin64-574693.tar.bz2 name darwin64 @@ -260,9 +260,9 @@ archive hash - 343e46ea49a08ad6596d3dc702d5b812 + 7e84441d9c7cf019a7bdc7b818b16c27 url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/95883/856128/colladadom-2.3.569219-windows-569219.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/104112/912957/colladadom-2.3.574693-windows-574693.tar.bz2 name windows @@ -272,16 +272,16 @@ archive hash - de5bdfb61b31db56c5fe7d0962ad11e2 + 2eaffbb8a93b03a732d3c47055a8efcb url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/95884/856129/colladadom-2.3.569219-windows64-569219.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/104135/913103/colladadom-2.3.574693-windows64-574693.tar.bz2 name windows64 version - 2.3.569219 + 2.3.574693 cubemaptoequirectangular @@ -3114,7 +3114,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors windows build_directory - build-vc${AUTOBUILD_VSVER|160}-$AUTOBUILD_ADDRSIZE + build-vc${AUTOBUILD_VSVER|170}-$AUTOBUILD_ADDRSIZE configurations RelWithDebInfo diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index c2e1bb4b85..fbec709f0c 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -105,6 +105,8 @@ if(WINDOWS) set(MSVC_VER 140) elseif (MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1930) # Visual Studio 2019 set(MSVC_VER 140) + elseif (MSVC_VERSION GREATER_EQUAL 1930 AND MSVC_VERSION LESS 1940) # Visual Studio 2022 + set(MSVC_VER 140) else (MSVC80) MESSAGE(WARNING "New MSVC_VERSION ${MSVC_VERSION} of MSVC: adapt Copy3rdPartyLibs.cmake") endif (MSVC80) -- cgit v1.2.3 From 675cfedb8af74c14ce30759f1d6193f954b88f7b Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 1 Sep 2022 12:27:08 -0400 Subject: DRTVWR-568: Ensure parent directory exists before CREATE_LINK. --- indra/cmake/Copy3rdPartyLibs.cmake | 1 + indra/test/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index c2e1bb4b85..edf02bec2b 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -154,6 +154,7 @@ elseif(DARWIN) # Support our "@executable_path/../Resources" load path for executables # that end up in any of the above SHARED_LIB_STAGING_DIR_MUMBLE # directories. + file(MAKE_DIRECTORY "${SHARED_LIB_STAGING_DIR}") file(CREATE_LINK "Release/Resources" "${SHARED_LIB_STAGING_DIR}/Resources" SYMBOLIC) diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 161e957784..9e65ceb926 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -121,6 +121,8 @@ elseif (DARWIN) # executable. This SHOULD properly be "$/Resources", # but the CMake $ generator expression isn't evaluated by # CREATE_LINK, so fudge it. + # Make sure the symlink's parent directory exists... + file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/test") file(CREATE_LINK "../sharedlibs/Release/Resources" "${CMAKE_BINARY_DIR}/test/Resources" SYMBOLIC) endif (WINDOWS) -- cgit v1.2.3 From 554717044f52fa39e9d42f2c5ea032efb479b280 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Fri, 16 Sep 2022 23:24:39 +0200 Subject: Rename MESHOPTIMIZER.cmake to Meshoptimizer.cmake as those caps honestly bug me. --- indra/cmake/CMakeLists.txt | 2 +- indra/cmake/MESHOPTIMIZER.cmake | 21 --------------------- indra/cmake/Meshoptimizer.cmake | 20 ++++++++++++++++++++ indra/llmeshoptimizer/CMakeLists.txt | 2 +- indra/newview/CMakeLists.txt | 1 - 5 files changed, 22 insertions(+), 24 deletions(-) delete mode 100644 indra/cmake/MESHOPTIMIZER.cmake create mode 100644 indra/cmake/Meshoptimizer.cmake diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index ec143d86c9..f0b35c08f3 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -43,7 +43,7 @@ set(cmake_SOURCE_FILES LLTestCommand.cmake LLWindow.cmake Linking.cmake - MESHOPTIMIZER.cmake + Meshoptimizer.cmake NDOF.cmake OPENAL.cmake OpenGL.cmake diff --git a/indra/cmake/MESHOPTIMIZER.cmake b/indra/cmake/MESHOPTIMIZER.cmake deleted file mode 100644 index d1d4df067f..0000000000 --- a/indra/cmake/MESHOPTIMIZER.cmake +++ /dev/null @@ -1,21 +0,0 @@ -# -*- cmake -*- - -include(Linking) -include(Prebuilt) - -include_guard() -add_library( ll::meshoptimizer INTERFACE IMPORTED ) - -use_system_binary(meshoptimizer) -use_prebuilt_binary(meshoptimizer) - -if (WINDOWS) - target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.lib) - set(MESHOPTIMIZER_LIBRARIES ) -elseif (LINUX) - target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.o) -elseif (DARWIN) - target_link_libraries( ll::meshoptimizer INTERFACE libmeshoptimizer.a) -endif (WINDOWS) - -target_include_directories( ll::meshoptimizer SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/meshoptimizer) diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake new file mode 100644 index 0000000000..fd144d2b97 --- /dev/null +++ b/indra/cmake/Meshoptimizer.cmake @@ -0,0 +1,20 @@ +# -*- cmake -*- + +include(Linking) +include(Prebuilt) + +include_guard() +add_library( ll::meshoptimizer INTERFACE IMPORTED ) + +use_system_binary(meshoptimizer) +use_prebuilt_binary(meshoptimizer) + +if (WINDOWS) + target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.lib) +elseif (LINUX) + target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.o) +elseif (DARWIN) + target_link_libraries( ll::meshoptimizer INTERFACE libmeshoptimizer.a) +endif (WINDOWS) + +target_include_directories( ll::meshoptimizer SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/meshoptimizer) diff --git a/indra/llmeshoptimizer/CMakeLists.txt b/indra/llmeshoptimizer/CMakeLists.txt index 47cb424feb..dfac44c296 100644 --- a/indra/llmeshoptimizer/CMakeLists.txt +++ b/indra/llmeshoptimizer/CMakeLists.txt @@ -2,7 +2,7 @@ project(llmeshoptimizer) -include(MESHOPTIMIZER) +include(Meshoptimizer) include(00-Common) include(LLCommon) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index a2dad1fb17..2ad40faa37 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -27,7 +27,6 @@ include(LLCommon) include(LLCoreHttp) include(LLImage) include(LLKDU) -include(MESHOPTIMIZER) include(LLPhysicsExtensions) include(LLPrimitive) include(LLWindow) -- cgit v1.2.3 From 31341ac605f3f1ae24568af3e09b200daef77b8f Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Fri, 16 Sep 2022 23:53:32 +0200 Subject: Settings the startup project must come *after* add_subdirectory(newview). Only after this directory is added the target will be known and can be manipulated. --- indra/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 7e70a44cf2..8386953cdc 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -106,12 +106,6 @@ if (WINDOWS) endif (EXISTS ${VIEWER_DIR}win_setup) endif (WINDOWS) -# sets the 'startup project' for debugging from visual studio. -set_property( - DIRECTORY ${VIEWER_PREFIX} - PROPERTY VS_STARTUP_PROJECT secondlife-bin - ) - if (USE_BUGSPLAT) if (BUGSPLAT_DB) message(STATUS "Building with BugSplat; database '${BUGSPLAT_DB}'") @@ -127,6 +121,12 @@ add_dependencies(viewer secondlife-bin) add_subdirectory(${VIEWER_PREFIX}doxygen EXCLUDE_FROM_ALL) +# sets the 'startup project' for debugging from visual studio. +set_property( + DIRECTORY ${VIEWER_PREFIX} + PROPERTY VS_STARTUP_PROJECT ${VIEWER_BINARY_NAME} + ) + if (LL_TESTS) # Define after the custom targets are created so # individual apps can add themselves as dependencies -- cgit v1.2.3 From 68c680599b3ee038a33bcad36ac52912725cf3cd Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Sat, 17 Sep 2022 11:21:06 +0200 Subject: Try to make sure this also works with the havok version of llphysicsextension. --- indra/cmake/LLPhysicsExtensions.cmake | 10 +++++----- indra/llprimitive/CMakeLists.txt | 2 +- indra/newview/CMakeLists.txt | 7 ++++++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/indra/cmake/LLPhysicsExtensions.cmake b/indra/cmake/LLPhysicsExtensions.cmake index 9c628b84b1..36821447c9 100644 --- a/indra/cmake/LLPhysicsExtensions.cmake +++ b/indra/cmake/LLPhysicsExtensions.cmake @@ -11,7 +11,7 @@ if (INSTALL_PROPRIETARY) endif (INSTALL_PROPRIETARY) include_guard() -add_library( llphysicsextensions INTERFACE IMPORTED ) +add_library( llphysicsextensions_impl INTERFACE IMPORTED ) # Note that the use_prebuilt_binary macros below do not in fact include binaries; @@ -22,14 +22,14 @@ if (HAVOK) include(Havok) use_prebuilt_binary(llphysicsextensions_source) set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/src) - target_link_libraries( llphysicsextensions INTERFACE llphysicsextensions) + target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions) elseif (HAVOK_TPV) use_prebuilt_binary(llphysicsextensions_tpv) - target_link_libraries( llphysicsextensions INTERFACE llphysicsextensions_tpv) + target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions_tpv) else (HAVOK) use_prebuilt_binary(llphysicsextensions_stub) set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/stub) - target_link_libraries( llphysicsextensions INTERFACE llphysicsextensionsstub) + target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensionsstub) endif (HAVOK) -target_include_directories( llphysicsextensions INTERFACE ${LIBS_PREBUILT_DIR}/include/llphysicsextensions) +target_include_directories( llphysicsextensions_impl INTERFACE ${LIBS_PREBUILT_DIR}/include/llphysicsextensions) diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index bf35500bad..7d83dc77c1 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -60,7 +60,7 @@ target_link_libraries(llprimitive llcorehttp llxml llcharacter - llphysicsextensions + llphysicsextensions_impl ll::colladadom ll::pcre ll::glh_linear diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 2ad40faa37..74faf3d1b6 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -61,7 +61,12 @@ if (NOT HAVOK_TPV) # Another hack that works with newer cmake versions: cmake_policy( SET CMP0079 NEW) - target_link_libraries(llphysicsextensionsstub llcommon llmath) + if( TARGET llphysicsextensionsstub ) + target_link_libraries(llphysicsextensionsstub llcommon llmath) + endif() + if( TARGET llphysicsextensions ) + target_link_libraries(llphysicsextensions llrender ) + endif() endif (NOT HAVOK_TPV) -- cgit v1.2.3 From 7a71cea15bcef59c7085657fba9ae6bdb058cc5b Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 17 Sep 2022 12:02:25 +0200 Subject: Workaround to keep old cmake versions limping around. --- indra/CMakeLists.txt | 3 +++ indra/cmake/Linking.cmake | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 8386953cdc..ff6a68ff97 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -7,6 +7,9 @@ ## 3.13/12 is needed for add_link_options/add_compile_definitions ## 3.14 added FILE CREATE_LINK ## 3.16 is needed for target_precompile_headers +## Nicky: Ideally we want at least 3.21 for good preset support +## We're not there yet, but once done, there is a kludge in Linking.cmake +# "if(${CMAKE_VERSION} VERSION_LESS "3.20.0")" that can also be removed cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR) set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index 29aa6e89ea..5edb713cfa 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -8,7 +8,15 @@ set(ARCH_PREBUILT_DIRS_PLUGINS ${AUTOBUILD_INSTALL_DIR}/plugins) set(ARCH_PREBUILT_DIRS_RELEASE ${AUTOBUILD_INSTALL_DIR}/lib/release) set(ARCH_PREBUILT_DIRS_DEBUG ${AUTOBUILD_INSTALL_DIR}/lib/debug) if (WINDOWS OR DARWIN ) - set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/$,$,>) + # Kludge for older cmake versions, 3.20+ is needed to use a genex in add_custom_command( OUTPUT ... ) + # Using this will work okay-ish, as Debug is not supported anyway. But for property multi config and also + # ninja support the genex version is preferred. + if(${CMAKE_VERSION} VERSION_LESS "3.20.0") + set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/Release) + else() + set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/$,$,>) + endif() + if( DARWIN ) set( SHARED_LIB_STAGING_DIR ${SHARED_LIB_STAGING_DIR}/Resources) endif() -- cgit v1.2.3 From 8c1427c39f90a322d4069162636e4ee433b664fb Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Sat, 17 Sep 2022 12:57:49 +0200 Subject: Only set include property on ll::bugpsplat target when on Windows. The include was preveiously declared for all platforms, but the Mac package does not even ship this include directory. With the new way cmake works this will lead to an error (which is good, so we don't end with bogus include dirs). --- indra/cmake/bugsplat.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake index f645d9d449..509981d72c 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -19,6 +19,7 @@ if (USE_BUGSPLAT) target_link_libraries( ll::bugsplat INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib ) + target_include_directories( ll::bugsplat SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/bugsplat) elseif (DARWIN) find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}") @@ -33,7 +34,6 @@ if (USE_BUGSPLAT) message( FATAL_ERROR "You need to set BUGSPLAT_DB when setting USE_BUGSPLAT" ) endif() - target_include_directories( ll::bugsplat SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/bugsplat) set_property( TARGET ll::bugsplat APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS LL_BUGSPLAT) else() set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name") -- cgit v1.2.3 From 0e5251f7cea691cbe62db2dc587aecd293ec73ed Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 17 Sep 2022 16:50:38 +0200 Subject: cmake playing jedi mind tricks on me and making me miss one genex that needed changing. Interstingly add_custom_target will not complain about a file that would never be declared as OUTPUT and thus is not really a valid cmake build target.`` --- indra/newview/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 74faf3d1b6..6bddea25a1 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1830,7 +1830,7 @@ if (WINDOWS) ) add_custom_target(llpackage ALL DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/$,$,>/touched.bat + ${CMAKE_CFG_INTDIR}/touched.bat ) # temporarily disable packaging of event_host until hg subrepos get # sorted out on the parabuild cluster... -- cgit v1.2.3 From 8e0b039e554e320cedfdef3057a3073a493db2e7 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Sat, 17 Sep 2022 17:14:16 +0200 Subject: Cleanup sweep --- indra/cmake/LLAddBuildTest.cmake | 283 +++++++++++---------- indra/cmake/LLMath.cmake | 5 - .../llimage_libtest/CMakeLists.txt | 10 - .../integration_tests/llui_libtest/CMakeLists.txt | 17 -- indra/llcorehttp/CMakeLists.txt | 9 +- indra/llmessage/CMakeLists.txt | 2 - indra/newview/CMakeLists.txt | 2 - 7 files changed, 148 insertions(+), 180 deletions(-) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index fa95e08dcd..408280f0cc 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -19,89 +19,88 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources) # # More info and examples at: https://wiki.secondlife.com/wiki/How_to_add_unit_tests_to_indra_code # - # WARNING: do NOT modify this code without working with poppy - + # WARNING: do NOT modify this code without working with poppy - (2022-09-17: ND, I did not talk to poppy, are we all doomed now?) # there is another branch that will conflict heavily with any changes here. -INCLUDE(GoogleMock) - IF(LL_TEST_VERBOSE) - MESSAGE("LL_ADD_PROJECT_UNIT_TESTS UNITTEST_PROJECT_${project} sources: ${sources}") - ENDIF(LL_TEST_VERBOSE) + # This here looks weird, but is needed. It will inject GoogleMock into projects that forgot to include `this` (LLAddBuildTest.cmake) + # But through some other means have access to this macro + include(GoogleMock) + + if(LL_TEST_VERBOSE) + message("LL_ADD_PROJECT_UNIT_TESTS UNITTEST_PROJECT_${project} sources: ${sources}") + endif() # Start with the header and project-wide setup before making targets #project(UNITTEST_PROJECT_${project}) # Setup includes, paths, etc - SET(alltest_SOURCE_FILES - ${CMAKE_SOURCE_DIR}/test/test.cpp - ${CMAKE_SOURCE_DIR}/test/lltut.cpp - ) - SET(alltest_DEP_TARGETS - # needed by the test harness itself - llcommon - ) - - SET(alltest_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/test + set(alltest_SOURCE_FILES + ${CMAKE_SOURCE_DIR}/test/test.cpp + ${CMAKE_SOURCE_DIR}/test/lltut.cpp ) - SET(alltest_LIBRARIES + set(alltest_DEP_TARGETS + # needed by the test harness itself + llcommon + ) + + set(alltest_LIBRARIES llcommon ll::googlemock ) - IF(NOT "${project}" STREQUAL "llmath") + if(NOT "${project}" STREQUAL "llmath") # add llmath as a dep unless the tested module *is* llmath! - LIST(APPEND alltest_DEP_TARGETS - llmath - ) - LIST(APPEND alltest_LIBRARIES - llmath - ) - ENDIF(NOT "${project}" STREQUAL "llmath") + list(APPEND alltest_DEP_TARGETS llmath) + list(APPEND alltest_LIBRARIES llmath ) + endif() # Headers, for convenience in targets. - SET(alltest_HEADER_FILES - ${CMAKE_SOURCE_DIR}/test/test.h - ) + set(alltest_HEADER_FILES ${CMAKE_SOURCE_DIR}/test/test.h) # start the source test executable definitions - SET(${project}_TEST_OUTPUT "") - FOREACH (source ${sources}) - STRING( REGEX REPLACE "(.*)\\.[^.]+$" "\\1" name ${source} ) - STRING( REGEX REPLACE ".*\\.([^.]+)$" "\\1" extension ${source} ) - IF(LL_TEST_VERBOSE) - MESSAGE("LL_ADD_PROJECT_UNIT_TESTS UNITTEST_PROJECT_${project} individual source: ${source} (${name}.${extension})") - ENDIF(LL_TEST_VERBOSE) + set(${project}_TEST_OUTPUT "") + foreach (source ${sources}) + string( REGEX REPLACE "(.*)\\.[^.]+$" "\\1" name ${source} ) + string( REGEX REPLACE ".*\\.([^.]+)$" "\\1" extension ${source} ) + if(LL_TEST_VERBOSE) + message("LL_ADD_PROJECT_UNIT_TESTS UNITTEST_PROJECT_${project} individual source: ${source} (${name}.${extension})") + endif() # # Per-codefile additional / external source, header, and include dir property extraction # # Source GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_SOURCE_FILES ${source} LL_TEST_ADDITIONAL_SOURCE_FILES) - SET(${name}_test_SOURCE_FILES - ${source} - tests/${name}_test.${extension} - ${alltest_SOURCE_FILES} - ${${name}_test_additional_SOURCE_FILES} ) - IF(LL_TEST_VERBOSE) - MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_SOURCE_FILES ${${name}_test_SOURCE_FILES}") - ENDIF(LL_TEST_VERBOSE) + set(${name}_test_SOURCE_FILES + ${source} + tests/${name}_test.${extension} + ${alltest_SOURCE_FILES} + ${${name}_test_additional_SOURCE_FILES} ) + if(LL_TEST_VERBOSE) + message("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_SOURCE_FILES ${${name}_test_SOURCE_FILES}") + endif() # Headers GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_HEADER_FILES ${source} LL_TEST_ADDITIONAL_HEADER_FILES) - SET(${name}_test_HEADER_FILES ${name}.h ${${name}_test_additional_HEADER_FILES}) - LIST(APPEND ${name}_test_SOURCE_FILES ${${name}_test_HEADER_FILES}) - IF(LL_TEST_VERBOSE) - MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_HEADER_FILES ${${name}_test_HEADER_FILES}") - ENDIF(LL_TEST_VERBOSE) - # Include dirs + set(${name}_test_HEADER_FILES ${name}.h ${${name}_test_additional_HEADER_FILES}) + list(APPEND ${name}_test_SOURCE_FILES ${${name}_test_HEADER_FILES}) + if(LL_TEST_VERBOSE) + message("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_HEADER_FILES ${${name}_test_HEADER_FILES}") + endif() + + # Setup target + add_executable(PROJECT_${project}_TEST_${name} ${${name}_test_SOURCE_FILES}) + + # Cannot declare a dependency on ${project} because the executable create above will later declare + # add_dependencies( ${project} ${project}_tests) + # as such grab ${project}'s interface include dirs and inject them here + get_property( ${name}_test_additional_INCLUDE_DIRS TARGET ${project} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ) + target_include_directories (PROJECT_${project}_TEST_${name} PRIVATE ${${name}_test_additional_INCLUDE_DIRS} ) + GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_INCLUDE_DIRS ${source} LL_TEST_ADDITIONAL_INCLUDE_DIRS) - INCLUDE_DIRECTORIES(${alltest_INCLUDE_DIRS} ${${name}_test_additional_INCLUDE_DIRS} ) - IF(LL_TEST_VERBOSE) - MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_INCLUDE_DIRS ${${name}_test_additional_INCLUDE_DIRS}") - ENDIF(LL_TEST_VERBOSE) + target_include_directories (PROJECT_${project}_TEST_${name} PRIVATE ${${name}_test_additional_INCLUDE_DIRS} ) + target_include_directories (PROJECT_${project}_TEST_${name} PRIVATE ${LIBS_OPEN_DIR}/test ) - # Setup target - ADD_EXECUTABLE(PROJECT_${project}_TEST_${name} ${${name}_test_SOURCE_FILES}) - SET_TARGET_PROPERTIES(PROJECT_${project}_TEST_${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}") + set_target_properties(PROJECT_${project}_TEST_${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}") # # Per-codefile additional / external project dep and lib dep property extraction @@ -111,92 +110,95 @@ INCLUDE(GoogleMock) GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_PROJECTS ${source} LL_TEST_ADDITIONAL_PROJECTS) # Libraries GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_LIBRARIES ${source} LL_TEST_ADDITIONAL_LIBRARIES) - IF(LL_TEST_VERBOSE) - MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_PROJECTS ${${name}_test_additional_PROJECTS}") - MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_LIBRARIES ${${name}_test_additional_LIBRARIES}") - ENDIF(LL_TEST_VERBOSE) + + if(LL_TEST_VERBOSE) + message("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_PROJECTS ${${name}_test_additional_PROJECTS}") + message("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_LIBRARIES ${${name}_test_additional_LIBRARIES}") + endif() + # Add to project - TARGET_LINK_LIBRARIES(PROJECT_${project}_TEST_${name} ${alltest_LIBRARIES} ${${name}_test_additional_PROJECTS} ${${name}_test_additional_LIBRARIES} ) + target_link_libraries(PROJECT_${project}_TEST_${name} ${alltest_LIBRARIES} ${${name}_test_additional_PROJECTS} ${${name}_test_additional_LIBRARIES} ) add_dependencies( PROJECT_${project}_TEST_${name} ${alltest_DEP_TARGETS}) # Compile-time Definitions GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_CFLAGS ${source} LL_TEST_ADDITIONAL_CFLAGS) - SET_TARGET_PROPERTIES(PROJECT_${project}_TEST_${name} - PROPERTIES - COMPILE_FLAGS "${${name}_test_additional_CFLAGS}" - COMPILE_DEFINITIONS "LL_TEST=${name};LL_TEST_${name}") - IF(LL_TEST_VERBOSE) - MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_CFLAGS ${${name}_test_additional_CFLAGS}") - ENDIF(LL_TEST_VERBOSE) - + set_target_properties(PROJECT_${project}_TEST_${name} + PROPERTIES + COMPILE_FLAGS "${${name}_test_additional_CFLAGS}" + COMPILE_DEFINITIONS "LL_TEST=${name};LL_TEST_${name}") + if(LL_TEST_VERBOSE) + message("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_CFLAGS ${${name}_test_additional_CFLAGS}") + endif() + # # Setup test targets # - SET(TEST_EXE $) - SET(TEST_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/PROJECT_${project}_TEST_${name}_ok.txt) - SET(TEST_CMD ${TEST_EXE} --touch=${TEST_OUTPUT} --sourcedir=${CMAKE_CURRENT_SOURCE_DIR}) + set(TEST_EXE $) + set(TEST_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/PROJECT_${project}_TEST_${name}_ok.txt) + set(TEST_CMD ${TEST_EXE} --touch=${TEST_OUTPUT} --sourcedir=${CMAKE_CURRENT_SOURCE_DIR}) # daveh - what configuration does this use? Debug? it's cmake-time, not build time. + poppy 2009-04-19 - IF(LL_TEST_VERBOSE) - MESSAGE(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_cmd = ${TEST_CMD}") - ENDIF(LL_TEST_VERBOSE) + if(LL_TEST_VERBOSE) + message(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_cmd = ${TEST_CMD}") + endif() SET_TEST_PATH(LD_LIBRARY_PATH) LL_TEST_COMMAND(TEST_SCRIPT_CMD "${LD_LIBRARY_PATH}" ${TEST_CMD}) - IF(LL_TEST_VERBOSE) - MESSAGE(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_script = ${TEST_SCRIPT_CMD}") - ENDIF(LL_TEST_VERBOSE) - # Add test - ADD_CUSTOM_COMMAND( - OUTPUT ${TEST_OUTPUT} - COMMAND ${TEST_SCRIPT_CMD} - DEPENDS PROJECT_${project}_TEST_${name} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) + if(LL_TEST_VERBOSE) + message(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_script = ${TEST_SCRIPT_CMD}") + endif() + + # Add test + add_custom_command( + OUTPUT ${TEST_OUTPUT} + COMMAND ${TEST_SCRIPT_CMD} + DEPENDS PROJECT_${project}_TEST_${name} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) # Why not add custom target and add POST_BUILD command? # Slightly less uncertain behavior # (OUTPUT commands run non-deterministically AFAIK) + poppy 2009-04-19 - # > I did not use a post build step as I could not make it notify of a + # > I did not use a post build step as I could not make it notify of a # > failure after the first time you build and fail a test. - daveh 2009-04-20 - LIST(APPEND ${project}_TEST_OUTPUT ${TEST_OUTPUT}) - ENDFOREACH (source) + list(APPEND ${project}_TEST_OUTPUT ${TEST_OUTPUT}) + endforeach (source) # Add the test runner target per-project # (replaces old _test_ok targets all over the place) - ADD_CUSTOM_TARGET(${project}_tests ALL DEPENDS ${${project}_TEST_OUTPUT}) - ADD_DEPENDENCIES(${project} ${project}_tests) + add_custom_target(${project}_tests ALL DEPENDS ${${project}_TEST_OUTPUT}) + add_dependencies(${project} ${project}_tests) ENDMACRO(LL_ADD_PROJECT_UNIT_TESTS) #***************************************************************************** # GET_OPT_SOURCE_FILE_PROPERTY #***************************************************************************** MACRO(GET_OPT_SOURCE_FILE_PROPERTY var filename property) - GET_SOURCE_FILE_PROPERTY(${var} "${filename}" "${property}") - IF("${${var}}" MATCHES NOTFOUND) - SET(${var} "") - ENDIF("${${var}}" MATCHES NOTFOUND) + get_source_file_property(${var} "${filename}" "${property}") + if("${${var}}" MATCHES NOTFOUND) + set(${var} "") + endif() ENDMACRO(GET_OPT_SOURCE_FILE_PROPERTY) #***************************************************************************** # LL_ADD_INTEGRATION_TEST #***************************************************************************** -FUNCTION(LL_ADD_INTEGRATION_TEST - testname - additional_source_files - library_dependencies -# variable args - ) +FUNCTION(LL_ADD_INTEGRATION_TEST + testname + additional_source_files + library_dependencies + # variable args + ) if(TEST_DEBUG) message(STATUS "Adding INTEGRATION_TEST_${testname} - debug output is on") - endif(TEST_DEBUG) + endif() - SET(source_files - tests/${testname}_test.cpp - ${CMAKE_SOURCE_DIR}/test/test.cpp - ${CMAKE_SOURCE_DIR}/test/lltut.cpp - ${additional_source_files} - ) + set(source_files + tests/${testname}_test.cpp + ${CMAKE_SOURCE_DIR}/test/test.cpp + ${CMAKE_SOURCE_DIR}/test/lltut.cpp + ${additional_source_files} + ) - SET(libraries + set(libraries ${library_dependencies} ll::googlemock ) @@ -204,36 +206,37 @@ FUNCTION(LL_ADD_INTEGRATION_TEST # Add test executable build target if(TEST_DEBUG) message(STATUS "ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})") - endif(TEST_DEBUG) - ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files}) - SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} - PROPERTIES - RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}" - COMPILE_DEFINITIONS "LL_TEST=${testname};LL_TEST_${testname}" - ) + endif() + + add_executable(INTEGRATION_TEST_${testname} ${source_files}) + set_target_properties(INTEGRATION_TEST_${testname} + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}" + COMPILE_DEFINITIONS "LL_TEST=${testname};LL_TEST_${testname}" + ) - # The following was copied to llcorehttp/CMakeLists.txt's texture_load target. + # The following was copied to llcorehttp/CMakeLists.txt's texture_load target. # Any changes made here should be replicated there. if (WINDOWS) - SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} - PROPERTIES - LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:CONSOLE" - LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO" - LINK_FLAGS_RELEASE "" - ) - endif (WINDOWS) + set_target_properties(INTEGRATION_TEST_${testname} + PROPERTIES + LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:CONSOLE" + ) + endif () # Add link deps to the executable if(TEST_DEBUG) message(STATUS "TARGET_LINK_LIBRARIES(INTEGRATION_TEST_${testname} ${libraries})") - endif(TEST_DEBUG) - TARGET_LINK_LIBRARIES(INTEGRATION_TEST_${testname} ${libraries}) + endif() + + target_link_libraries(INTEGRATION_TEST_${testname} ${libraries}) + target_include_directories (INTEGRATION_TEST_${testname} PRIVATE ${LIBS_OPEN_DIR}/test ) # Create the test running command - SET(test_command ${ARGN}) - SET(TEST_EXE $) - LIST(FIND test_command "{}" test_exe_pos) - IF(test_exe_pos LESS 0) + set(test_command ${ARGN}) + set(TEST_EXE $) + list(FIND test_command "{}" test_exe_pos) + if(test_exe_pos LESS 0) # The {} marker means "the full pathname of the test executable." # test_exe_pos -1 means we didn't find it -- so append the test executable # name to $ARGN, the variable part of the arg list. This is convenient @@ -242,26 +245,26 @@ FUNCTION(LL_ADD_INTEGRATION_TEST # pathname of the test program as the last of its args. You need specify # {} only if the test program's pathname isn't the last argument in the # desired command line. - LIST(APPEND test_command "${TEST_EXE}") - ELSE (test_exe_pos LESS 0) + list(APPEND test_command "${TEST_EXE}") + else (test_exe_pos LESS 0) # Found {} marker at test_exe_pos. Remove the {}... - LIST(REMOVE_AT test_command test_exe_pos) + list(REMOVE_AT test_command test_exe_pos) # ...and replace it with the actual name of the test executable. - LIST(INSERT test_command test_exe_pos "${TEST_EXE}") - ENDIF (test_exe_pos LESS 0) + list(INSERT test_command test_exe_pos "${TEST_EXE}") + endif() SET_TEST_PATH(LD_LIBRARY_PATH) LL_TEST_COMMAND(TEST_SCRIPT_CMD "${LD_LIBRARY_PATH}" ${test_command}) if(TEST_DEBUG) message(STATUS "TEST_SCRIPT_CMD: ${TEST_SCRIPT_CMD}") - endif(TEST_DEBUG) + endif() - ADD_CUSTOM_COMMAND( - TARGET INTEGRATION_TEST_${testname} - POST_BUILD - COMMAND ${TEST_SCRIPT_CMD} - ) + add_custom_command( + TARGET INTEGRATION_TEST_${testname} + POST_BUILD + COMMAND ${TEST_SCRIPT_CMD} + ) # Use CTEST? Not sure how to yet... # ADD_TEST(INTEGRATION_TEST_RUNNER_${testname} ${TEST_SCRIPT_CMD}) diff --git a/indra/cmake/LLMath.cmake b/indra/cmake/LLMath.cmake index 893920ae6f..a707c75bc4 100644 --- a/indra/cmake/LLMath.cmake +++ b/indra/cmake/LLMath.cmake @@ -1,7 +1,2 @@ # -*- cmake -*- -set(LLMATH_INCLUDE_DIRS - ${LIBS_OPEN_DIR}/llmath - ) - -set(LLMATH_LIBRARIES llmath) diff --git a/indra/integration_tests/llimage_libtest/CMakeLists.txt b/indra/integration_tests/llimage_libtest/CMakeLists.txt index cf43292922..ee2890778b 100644 --- a/indra/integration_tests/llimage_libtest/CMakeLists.txt +++ b/indra/integration_tests/llimage_libtest/CMakeLists.txt @@ -12,16 +12,6 @@ include(LLImageJ2COJ) include(LLKDU) include(LLFileSystem) -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLFILESYSTEM_INCLUDE_DIRS} - ${LLIMAGE_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ) - set(llimage_libtest_SOURCE_FILES llimage_libtest.cpp ) diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt index 849eda1acf..a6ce657f4f 100644 --- a/indra/integration_tests/llui_libtest/CMakeLists.txt +++ b/indra/integration_tests/llui_libtest/CMakeLists.txt @@ -22,23 +22,6 @@ include(Hunspell) include(Linking) # include(Tut) -include_directories( - ${FREETYPE_INCLUDE_DIRS} - ${LLCOMMON_INCLUDE_DIRS} - ${LLIMAGE_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLRENDER_INCLUDE_DIRS} - ${LLUI_INCLUDE_DIRS} - ${LLFILESYSTEM_INCLUDE_DIRS} - ${LLWINDOW_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ${LIBS_PREBUILD_DIR}/include/hunspell - ) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ${LLXML_SYSTEM_INCLUDE_DIRS} - ) - set(llui_libtest_SOURCE_FILES llui_libtest.cpp llwidgetreg.cpp diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index 08139910d3..87796abd3c 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -14,8 +14,6 @@ include(LLCommon) include(Tut) include(bugsplat) -include_directories (${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../llmessage ) - set(llcorehttp_SOURCE_FILES bufferarray.cpp bufferstream.cpp @@ -89,8 +87,11 @@ target_link_libraries( ll::openssl ll::nghttp2 ) -target_include_directories( llcorehttp INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) - +target_include_directories( llcorehttp INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +# llmessage depends on llcorehttp, yet llcorehttp also depends on llmessage (at least for includes). +# Cannot/Should not use target_link_libraries here to add llmessage to the dependencies, as that would +# lead to circular dependencies (or in case of cmake, the first project declaring it's dependencies wins) +target_include_directories( llcorehttp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../llmessage) # tests set(LLCOREHTTP_TESTS ON CACHE BOOL diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index 7340752fb2..4786956e85 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -13,8 +13,6 @@ include(Tut) include(Python) include(JsonCpp) -include_directories (${CMAKE_CURRENT_SOURCE_DIR}) - set(llmessage_SOURCE_FILES llassetstorage.cpp llavatarname.cpp diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 74faf3d1b6..eef7ee8aae 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -47,8 +47,6 @@ include(ZLIBNG) include(URIPARSER) include(LLPrimitive) -include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) - if (NOT HAVOK_TPV) # When using HAVOK_TPV, the library is precompiled, so no need for this -- cgit v1.2.3 From e840b5eb40edbac8e72054256112deeaf5c580c2 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Sat, 17 Sep 2022 17:37:45 +0200 Subject: MacOs packaging is weird, as Nat already did point out :( Part of his change was omly taking Release builds into account, the other part from me made the same mistake. Use a generator expression with a custom command to get the symlink the way we want. --- indra/cmake/Copy3rdPartyLibs.cmake | 18 +++++++++--------- indra/test/CMakeLists.txt | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index b265c92e45..5bb988d639 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -152,15 +152,6 @@ if(WINDOWS) endforeach() elseif(DARWIN) - # Support our "@executable_path/../Resources" load path for executables - # that end up in any of the above SHARED_LIB_STAGING_DIR_MUMBLE - # directories. - # Cannot use ${SHARED_LIB_STAGING_DIR} here as it used a generator expression and tha this not - # supported by file(...) - file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/sharedlibs/Release/Resources") - file(CREATE_LINK "${CMAKE_BINARY_DIR}/sharedlibs/Release/Resources" "${CMAKE_BINARY_DIR}/sharedlibs/Resources" - SYMBOLIC) - set(vivox_lib_dir "${ARCH_PREBUILT_DIRS_RELEASE}") set(slvoice_files SLVoice) set(vivox_libs @@ -299,3 +290,12 @@ add_custom_target( stage_third_party_libs ALL DEPENDS ${third_party_targets} ) + +if(DARWIN) + # Support our "@executable_path/../Resources" load path for executables + # that end up in any of the above SHARED_LIB_STAGING_DIR_MUMBLE + # directories. + add_custom_command( TARGET stage_third_party_libs POST_BUILD + COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/sharedlibs/Resources + ) +endif() \ No newline at end of file diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index c913e4031f..48c15155a6 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -74,15 +74,6 @@ if (WINDOWS) LINK_FLAGS "/NODEFAULTLIB:LIBCMT" LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\"" ) -elseif (DARWIN) - # Support our "@executable_path/../Resources" load path for our test - # executable. This SHOULD properly be "$/Resources", - # but the CMake $ generator expression isn't evaluated by - # CREATE_LINK, so fudge it. - # Make sure the symlink's parent directory exists... - file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/test") - file(CREATE_LINK "../sharedlibs/Release/Resources" "${CMAKE_BINARY_DIR}/test/Resources" - SYMBOLIC) endif (WINDOWS) set(TEST_EXE $) @@ -111,4 +102,13 @@ set(test_results ${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt) # developers choose to disable LL_TESTS. if (LL_TESTS) add_custom_target(tests_ok ALL DEPENDS ${test_results}) + if(DARWIN) + # Support our "@executable_path/../Resources" load path for our test + # executable. This SHOULD properly be "$/Resources", + # but the CMake $ generator expression isn't evaluated by + # CREATE_LINK, so fudge it. + add_custom_command( TARGET tests_ok PRE_BUILD + COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/test/Resource + ) + endif() endif (LL_TESTS) -- cgit v1.2.3 From c47b2ae7458f88941e4a129b0bc9aa96ab4ae003 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Sat, 17 Sep 2022 17:58:08 +0200 Subject: We probably want this (have to guess as I cannot run the tests). --- indra/test/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 48c15155a6..b7a39a7450 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -107,8 +107,8 @@ if (LL_TESTS) # executable. This SHOULD properly be "$/Resources", # but the CMake $ generator expression isn't evaluated by # CREATE_LINK, so fudge it. - add_custom_command( TARGET tests_ok PRE_BUILD - COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/test/Resource + add_custom_command( TARGET lltest POST_BUILD + COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/test/Resources ) endif() endif (LL_TESTS) -- cgit v1.2.3 From c7366f4c55c6442414eb6c5a6736baf90f1a4700 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 17 Sep 2022 02:09:04 +0300 Subject: SL-17238 Fix coding policy build issues --- indra/CMakeLists.txt | 2 +- indra/cmake/Copy3rdPartyLibs.cmake | 13 ++++++------- indra/cmake/LLCommon.cmake | 2 +- indra/cmake/LLCoreHttp.cmake | 2 +- indra/cmake/LLPrimitive.cmake | 4 ++-- indra/cmake/Prebuilt.cmake | 14 +++++++------- indra/cmake/UI.cmake | 4 ++-- indra/llaudio/CMakeLists.txt | 2 +- indra/llcommon/CMakeLists.txt | 3 +-- indra/llprimitive/CMakeLists.txt | 2 +- indra/llwindow/CMakeLists.txt | 4 ++-- 11 files changed, 25 insertions(+), 27 deletions(-) diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index ff6a68ff97..205ce402a0 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -128,7 +128,7 @@ add_subdirectory(${VIEWER_PREFIX}doxygen EXCLUDE_FROM_ALL) set_property( DIRECTORY ${VIEWER_PREFIX} PROPERTY VS_STARTUP_PROJECT ${VIEWER_BINARY_NAME} - ) + ) if (LL_TESTS) # Define after the custom targets are created so diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 5bb988d639..7495de00d5 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -216,7 +216,7 @@ elseif(LINUX) list( APPEND release_files libapr-1.so.0 libaprutil-1.so.0 - libatk-1.0.so + libatk-1.0.so libfreetype.so.6.6.2 libfreetype.so.6 libhunspell-1.3.so.0.0.0 @@ -224,12 +224,11 @@ elseif(LINUX) libuuid.so.16.0.22 libfontconfig.so.1.8.0 libfontconfig.so.1 - libgmodule-2.0.so - libgobject-2.0.so + libgmodule-2.0.so + libgobject-2.0.so ) - endif() - - + endif() + if (TARGET ll::fmodstudio) set(debug_files ${debug_files} "libfmodL.so") set(release_files ${release_files} "libfmod.so") @@ -298,4 +297,4 @@ if(DARWIN) add_custom_command( TARGET stage_third_party_libs POST_BUILD COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/sharedlibs/Resources ) -endif() \ No newline at end of file +endif() diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake index e56625d051..92045f7b58 100644 --- a/indra/cmake/LLCommon.cmake +++ b/indra/cmake/LLCommon.cmake @@ -7,4 +7,4 @@ include(Tracy) include(ZLIBNG) include(JsonCpp) -include(XmlRpcEpi) \ No newline at end of file +include(XmlRpcEpi) diff --git a/indra/cmake/LLCoreHttp.cmake b/indra/cmake/LLCoreHttp.cmake index a166c96043..22ed5fef9c 100644 --- a/indra/cmake/LLCoreHttp.cmake +++ b/indra/cmake/LLCoreHttp.cmake @@ -2,4 +2,4 @@ include(CURL) include(OpenSSL) -include(NGHTTP2) \ No newline at end of file +include(NGHTTP2) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 04afe5e405..3d8499cbc3 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -14,8 +14,8 @@ add_library( ll::colladadom INTERFACE IMPORTED ) # ND, needs fixup in collada conan pkg if( USE_CONAN ) target_include_directories( ll::colladadom SYSTEM INTERFACE - "${CONAN_INCLUDE_DIRS_COLLADADOM}/collada-dom/" - "${CONAN_INCLUDE_DIRS_COLLADADOM}/collada-dom/1.4/" ) + "${CONAN_INCLUDE_DIRS_COLLADADOM}/collada-dom/" + "${CONAN_INCLUDE_DIRS_COLLADADOM}/collada-dom/1.4/" ) endif() use_system_binary( colladadom ) diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index f0239711aa..634cc15c21 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -60,13 +60,13 @@ endmacro (use_prebuilt_binary _binary) #Sadly we need a macro here, otherwise the return() will not properly work macro ( use_system_binary package ) if( USE_CONAN ) - target_link_libraries( ll::${package} INTERFACE CONAN_PKG::${package} ) - foreach( extra_pkg "${ARGN}" ) - if( extra_pkg ) - target_link_libraries( ll::${package} INTERFACE CONAN_PKG::${extra_pkg} ) - endif() - endforeach() + target_link_libraries( ll::${package} INTERFACE CONAN_PKG::${package} ) + foreach( extra_pkg "${ARGN}" ) + if( extra_pkg ) + target_link_libraries( ll::${package} INTERFACE CONAN_PKG::${extra_pkg} ) + endif() + endforeach() return() endif() endmacro() - + diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index c02ad3e161..8b70192efc 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -8,8 +8,8 @@ if (LINUX) target_compile_definitions(ll::uilibraries INTERFACE LL_GTK=1 LL_X11=1 ) if( USE_CONAN ) - target_link_libraries( ll::uilibraries INTERFACE CONAN_PKG::gtk ) - return() + target_link_libraries( ll::uilibraries INTERFACE CONAN_PKG::gtk ) + return() endif() use_prebuilt_binary(gtk-atk-pango-glib) diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index d6846ddf99..4f469b9bb5 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -68,4 +68,4 @@ if( TARGET ll::openal ) endif() if( TARGET ll::fmodstudio ) target_link_libraries( llaudio ll::fmodstudio ) -endif() \ No newline at end of file +endif() diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 8625060720..b576cdc1e1 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -268,8 +268,7 @@ target_link_libraries( ll::boost ll::uriparser ll::oslibraries - ll::tracy - + ll::tracy ) target_include_directories( llcommon INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 7d83dc77c1..d69cd958a0 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -63,7 +63,7 @@ target_link_libraries(llprimitive llphysicsextensions_impl ll::colladadom ll::pcre - ll::glh_linear + ll::glh_linear ) #add unit tests diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index cc60625683..dbab58c5de 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -54,8 +54,8 @@ set(llwindow_LINK_LIBRARIES llrender llfilesystem llxml - ll::glh_linear - ll::glext + ll::glh_linear + ll::glext ll::uilibraries ll::SDL ) -- cgit v1.2.3 From 9bad5d08fb8c5b705c9c620b0e809b20968a39be Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 17 Sep 2022 02:10:35 +0300 Subject: SL-17238 Large cmake contribution by NickyD --- doc/contributions.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/contributions.txt b/doc/contributions.txt index 2c1e5487ce..86b42a5ff0 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -1122,6 +1122,7 @@ Nicky Dasmijn SL-14541 SL-16438 SL-17218 + SL-17238 Nicky Perian OPEN-1 STORM-1087 -- cgit v1.2.3 From c333a7935d33b30fb663739c567cec5ae661ffe8 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 17 Sep 2022 02:38:52 +0300 Subject: SL-17238 Fixed llphysicsextensions connection to llrender --- .gitignore | 7 ++----- autobuild.xml | 8 ++++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 839d14bc0d..80eca667df 100755 --- a/.gitignore +++ b/.gitignore @@ -20,11 +20,8 @@ indra/.distcc build-vc80/ build-vc100/ build-vc120/ -build-vc120-32/ -build-vc120-64/ -build-vc150-32/ -build-vc150-64/ -build-vc160-64/ +build-vc*-32/ +build-vc*-64/ indra/CMakeFiles indra/build-vc[0-9]* indra/lib/mono/1.0/*.dll diff --git a/autobuild.xml b/autobuild.xml index 59bac89136..985bb55902 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1659,9 +1659,9 @@ archive hash - da57838d80cf332f4a3026713a13f086 + e51c6f5dfd76eb148348a44ff57e66c2 url - https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/90708/824484/llphysicsextensions_source-1.0.565754-darwin64-565754.tar.bz2 + https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/104810/918016/llphysicsextensions_source-1.0.575107-darwin64-575107.tar.bz2 name darwin64 @@ -1683,9 +1683,9 @@ archive hash - 28ad884012aa0bb70cf4101853af2f9a + dbbe4cc568ac149d862e421cdda4dd48 url - https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/90733/824570/llphysicsextensions_source-1.0.565768-windows-565768.tar.bz2 + https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/104809/918011/llphysicsextensions_source-1.0.575107-windows-575107.tar.bz2 name windows -- cgit v1.2.3 From c82f70ecace4e57bcaeada695d3a59ddb498b19e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 17 Sep 2022 13:48:01 +0300 Subject: SL-17238 bugsplat build issues --- indra/newview/llappviewerwin32.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index a39ec7f51b..6457c13ef3 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -75,7 +75,7 @@ // Bugsplat (http://bugsplat.com) crash reporting tool #ifdef LL_BUGSPLAT #include "BugSplat.h" -#include "reader.h" // JsonCpp +#include "json/reader.h" // JsonCpp #include "llagent.h" // for agent location #include "llviewerregion.h" #include "llvoavatarself.h" // for agent name -- cgit v1.2.3 From 7471788271174a673db10426b11db418928e1dd7 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 17 Sep 2022 14:30:40 +0300 Subject: SL-17238 MacOS build does not recognize no-unused-but-set-variable --- indra/cmake/00-Common.cmake | 2 +- indra/cmake/Linking.cmake | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index a144973a16..f1348dbad5 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -180,7 +180,7 @@ if (LINUX OR DARWIN) list(APPEND GCC_WARNINGS -Werror) endif (NOT GCC_DISABLE_FATAL_WARNINGS) - list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor -Wno-unused-but-set-variable -Wno-unused-variable ) + list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor -Wno-unused-variable ) add_compile_options(${GCC_WARNINGS}) add_compile_options(-m${ADDRESS_SIZE}) diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index 5edb713cfa..4a501f420b 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -11,8 +11,12 @@ if (WINDOWS OR DARWIN ) # Kludge for older cmake versions, 3.20+ is needed to use a genex in add_custom_command( OUTPUT ... ) # Using this will work okay-ish, as Debug is not supported anyway. But for property multi config and also # ninja support the genex version is preferred. - if(${CMAKE_VERSION} VERSION_LESS "3.20.0") - set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/Release) + if(${CMAKE_VERSION} VERSION_LESS "3.20.0") + if(CMAKE_BUILD_TYPE MATCHES Release) + set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/Release) + elseif (CMAKE_BUILD_TYPE MATCHES RelWithDebInfo) + set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/RelWithDebInfo) + endif() else() set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/$,$,>) endif() -- cgit v1.2.3 From 3c6e2a6e4c061add79b7a8eae96a6271148d278b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 17 Sep 2022 21:27:43 +0300 Subject: SL-17238 Supress errors from physicsextensions --- indra/newview/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 6bddea25a1..966630d1fc 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -66,6 +66,9 @@ if (NOT HAVOK_TPV) endif() if( TARGET llphysicsextensions ) target_link_libraries(llphysicsextensions llrender ) + if (DARWIN) + target_compile_options( llphysicsextensions PRIVATE -Wno-unused-local-typedef) + endif (DARWIN) endif() endif (NOT HAVOK_TPV) -- cgit v1.2.3 From c903b0b03005831bce7b4001bbed55b275066679 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Sat, 17 Sep 2022 23:53:43 +0200 Subject: Remove some leftovers of the old precompiled headers usage. Pointed out by Ansariel Hiller. --- indra/newview/CMakeLists.txt | 26 --------------------- indra/newview/llviewerprecompiledheaders.cpp | 34 ---------------------------- 2 files changed, 60 deletions(-) delete mode 100644 indra/newview/llviewerprecompiledheaders.cpp diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 50a6a4059d..ed495ed8b3 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1420,15 +1420,6 @@ if (WINDOWS) llwindebug.h ) - # precompiled header configuration - # llviewerprecompiledheaders.cpp generates - # the .pch file. - # All sources added to viewer_SOURCE_FILES - # at this point use it. - if(USE_PRECOMPILED_HEADERS) - set(viewer_SOURCE_FILES "${viewer_SOURCE_FILES}" llviewerprecompiledheaders.cpp) - endif(USE_PRECOMPILED_HEADERS) - # Replace the icons with the appropriate ones for the channel # ('test' is the default) set(ICON_PATH "test") @@ -2263,26 +2254,9 @@ if (LL_TESTS) LL_TEST_ADDITIONAL_LIBRARIES ${test_libs} ) - ################################################## - # DISABLING PRECOMPILED HEADERS USAGE FOR TESTS - ################################################## - # if(USE_PRECOMPILED_HEADERS) - # set_source_files_properties( - # ${viewer_TEST_SOURCE_FILES} - # PROPERTIES - # LL_TEST_ADDITIONAL_SOURCE_FILES llviewerprecompiledheaders.cpp - # ) - # endif(USE_PRECOMPILED_HEADERS) LL_ADD_PROJECT_UNIT_TESTS(${VIEWER_BINARY_NAME} "${viewer_TEST_SOURCE_FILES}") #set(TEST_DEBUG on) - ################################################## - # DISABLING PRECOMPILED HEADERS USAGE FOR TESTS - ################################################## - # if(USE_PRECOMPILED_HEADERS) - # set(test_sources "${test_sources}" llviewerprecompiledheaders.cpp) - # endif(USE_PRECOMPILED_HEADERS) - set(test_libs llfilesystem diff --git a/indra/newview/llviewerprecompiledheaders.cpp b/indra/newview/llviewerprecompiledheaders.cpp deleted file mode 100644 index 307e903726..0000000000 --- a/indra/newview/llviewerprecompiledheaders.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/** - * @file llviewerprecompiledheaders.cpp - * @brief precompiled headers for newview project - * - * $LicenseInfo:firstyear=2005&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -// source file that includes just the standard includes -// newview.pch will be the pre-compiled header -// llviewerprecompiledheaders.obj will contain the pre-compiled type information - -#include "llviewerprecompiledheaders.h" - -// TODO: reference any additional headers you need in llviewerprecompiledheaders.h -// and not in this file -- cgit v1.2.3 From a441ce184fef3b30daff2b3eeef9db650b748ac9 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Sep 2022 14:27:11 -0400 Subject: DRTVWR-568: Stop suppressing unused variable warnings -- we fixed?! --- indra/cmake/00-Common.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index f1348dbad5..c848d00710 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -180,7 +180,7 @@ if (LINUX OR DARWIN) list(APPEND GCC_WARNINGS -Werror) endif (NOT GCC_DISABLE_FATAL_WARNINGS) - list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor -Wno-unused-variable ) + list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor ) add_compile_options(${GCC_WARNINGS}) add_compile_options(-m${ADDRESS_SIZE}) -- cgit v1.2.3 From 5a353bb7b21e7d251017779cc01c71247e0d8b87 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 21 Sep 2022 10:59:20 +0300 Subject: SL-17238 Small cleanup Implied 'branch' is now two different version-control systems behind --- indra/cmake/LLAddBuildTest.cmake | 3 --- 1 file changed, 3 deletions(-) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 408280f0cc..bf569e5d99 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -18,9 +18,6 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources) # * properties for each sourcefile passed in indicate what libs to link that file with (MAKE NO ASSUMPTIONS ASIDE FROM TUT) # # More info and examples at: https://wiki.secondlife.com/wiki/How_to_add_unit_tests_to_indra_code - # - # WARNING: do NOT modify this code without working with poppy - (2022-09-17: ND, I did not talk to poppy, are we all doomed now?) - # there is another branch that will conflict heavily with any changes here. # This here looks weird, but is needed. It will inject GoogleMock into projects that forgot to include `this` (LLAddBuildTest.cmake) # But through some other means have access to this macro -- cgit v1.2.3 From 7018deb7f8bc22bdbab7be29896c92ec648a3f2f Mon Sep 17 00:00:00 2001 From: Callum Linden Date: Mon, 3 Oct 2022 11:31:44 -0700 Subject: SL-18289: Modify autobuild.xml to insert a CMaker architecture flag as well as the generator string for Windows builds --- autobuild.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/autobuild.xml b/autobuild.xml index 985bb55902..96f6918a99 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3235,6 +3235,8 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors -G ${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN} + -A + ${AUTOBUILD_WIN_VSPLATFORM|NOTWIN} default @@ -3273,6 +3275,8 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors -G ${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN} + -A + ${AUTOBUILD_WIN_VSPLATFORM|NOTWIN} -DINSTALL_PROPRIETARY=FALSE -DUSE_KDU=FALSE -DUSE_OPENAL:BOOL=ON @@ -3307,6 +3311,8 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors -G ${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN} + -A + ${AUTOBUILD_WIN_VSPLATFORM|NOTWIN} name @@ -3343,6 +3349,8 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors -G ${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN} + -A + ${AUTOBUILD_WIN_VSPLATFORM|NOTWIN} -DUNATTENDED:BOOL=ON -DINSTALL_PROPRIETARY=FALSE -DUSE_KDU=FALSE -- cgit v1.2.3 From 074ff9fd4bbe0a6c6d589b3bdf5fe1a48df0b1ed Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Tue, 18 Oct 2022 18:11:13 -0700 Subject: SL-18389 - tracking down an odd code-signing issue on mac - speculative fix - this is the only different between this and other viewers that do run correctly --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 3327ecfb56..ea3688888a 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -908,7 +908,7 @@ class DarwinManifest(ViewerManifest): # Let exception, if any, propagate -- if this doesn't # work, we need the build to noisily fail! oldpath = subprocess.check_output( - ['objdump', '--macho', '--dylib-id', '--non-verbose', + ['objdump', '-macho', '-dylib-id', '-non-verbose', os.path.join(relpkgdir, "BugsplatMac.framework", "BugsplatMac")] ).splitlines()[-1] # take the last line of output self.run_command( -- cgit v1.2.3 From 31917709d9f4d9d4742910ae7990009a1580b150 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Fri, 21 Oct 2022 16:04:22 -0700 Subject: SL-18390: speculative fix for broken notarization - part2 --- indra/cmake/Copy3rdPartyLibs.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 7495de00d5..2c99d93284 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -294,7 +294,7 @@ if(DARWIN) # Support our "@executable_path/../Resources" load path for executables # that end up in any of the above SHARED_LIB_STAGING_DIR_MUMBLE # directories. - add_custom_command( TARGET stage_third_party_libs POST_BUILD - COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/sharedlibs/Resources - ) + #add_custom_command( TARGET stage_third_party_libs POST_BUILD + # COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/sharedlibs/Resources + # ) endif() -- cgit v1.2.3 From 069ccb30241716403c2de2d2d1faad62720917a3 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 23 Oct 2022 20:04:32 +0200 Subject: Remove ll::bugsplat as a llcommon depencency In theory it is fine to do that, in practice it does break gatekeeper in subtle ways due to https://developer.apple.com/library/archive/technotes/tn2206/_index.html#//apple_ref/doc/uid/DTS40007919-CH1-TNTAG207 Having bugsplat linked to all executables results in executables with an embedded rpath that is invalid for Gatekeeper. Luckily it shows this is in the worst possible way. The viewer cannot be started with a non helpful message of teh viewer being unable to verified. While at the same time spctl and codesign both show no errors at all. --- indra/llcommon/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index b576cdc1e1..56939584bb 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -261,7 +261,6 @@ add_library (llcommon ${llcommon_SOURCE_FILES}) target_link_libraries( llcommon ll::apr - ll::bugsplat ll::expat ll::jsoncpp ll::zlib-ng -- cgit v1.2.3 From b4e8d7a7b28cfe8bb622e23148d66ee0a61e17e4 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 23 Oct 2022 20:08:46 +0200 Subject: Revert "SL-18390: speculative fix for broken notarization - part2" This reverts commit 31917709d9f4d9d4742910ae7990009a1580b150. --- indra/cmake/Copy3rdPartyLibs.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 2c99d93284..7495de00d5 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -294,7 +294,7 @@ if(DARWIN) # Support our "@executable_path/../Resources" load path for executables # that end up in any of the above SHARED_LIB_STAGING_DIR_MUMBLE # directories. - #add_custom_command( TARGET stage_third_party_libs POST_BUILD - # COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/sharedlibs/Resources - # ) + add_custom_command( TARGET stage_third_party_libs POST_BUILD + COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/sharedlibs/Resources + ) endif() -- cgit v1.2.3 From b0d69a20c262441125261c4949e59a8a1b9e9628 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 23 Oct 2022 20:09:14 +0200 Subject: Bring back Nat's tribute to Macho Man Randy Savage by reverting: "SL-18389 - tracking down an odd code-signing issue on mac - speculative fix - this is the only different between this and other viewers that do run correctly" This reverts commit 074ff9fd4bbe0a6c6d589b3bdf5fe1a48df0b1ed. --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index ea3688888a..3327ecfb56 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -908,7 +908,7 @@ class DarwinManifest(ViewerManifest): # Let exception, if any, propagate -- if this doesn't # work, we need the build to noisily fail! oldpath = subprocess.check_output( - ['objdump', '-macho', '-dylib-id', '-non-verbose', + ['objdump', '--macho', '--dylib-id', '--non-verbose', os.path.join(relpkgdir, "BugsplatMac.framework", "BugsplatMac")] ).splitlines()[-1] # take the last line of output self.run_command( -- cgit v1.2.3 From 8e4e72ceb7a4c02e7196dc9cf69c60de93fb17f7 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 26 Oct 2022 02:02:02 +0300 Subject: SL-18440 fix for sorting by "Date" column --- indra/newview/llfloateravatarrendersettings.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloateravatarrendersettings.cpp b/indra/newview/llfloateravatarrendersettings.cpp index b8f854feb3..8b28f6941e 100644 --- a/indra/newview/llfloateravatarrendersettings.cpp +++ b/indra/newview/llfloateravatarrendersettings.cpp @@ -89,6 +89,7 @@ BOOL LLFloaterAvatarRenderSettings::postBuild() LLFloater::postBuild(); mAvatarSettingsList = getChild("render_settings_list"); mAvatarSettingsList->setRightMouseDownCallback(boost::bind(&LLFloaterAvatarRenderSettings::onAvatarListRightClick, this, _1, _2, _3)); + mAvatarSettingsList->setAlternateSort(); getChild("people_filter_input")->setCommitCallback(boost::bind(&LLFloaterAvatarRenderSettings::onFilterEdit, this, _2)); return TRUE; @@ -138,8 +139,8 @@ void LLFloaterAvatarRenderSettings::updateList() item_params.columns.add().value(av_name.getCompleteName()).column("name"); std::string setting = getString(iter->second == 1 ? "av_never_render" : "av_always_render"); item_params.columns.add().value(setting).column("setting"); - std::string timestamp = createTimestamp(LLRenderMuteList::getInstance()->getVisualMuteDate(iter->first)); - item_params.columns.add().value(timestamp).column("timestamp"); + S32 mute_date = LLRenderMuteList::getInstance()->getVisualMuteDate(iter->first); + item_params.columns.add().value(createTimestamp(mute_date)).column("timestamp").alt_value(std::to_string(mute_date)); mAvatarSettingsList->addNameItemRow(item_params); } } -- cgit v1.2.3 From 9e227a2c6d2c585f9b9ddefb25e6a2f65d9e0892 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 27 Oct 2022 01:16:06 +0300 Subject: SL-18157 Allow translation services to work in IM and group messaging --- indra/newview/llimview.cpp | 87 ++++++++++++++++------ indra/newview/llimview.h | 5 +- .../skins/default/xui/en/menu_participant_view.xml | 2 +- 3 files changed, 69 insertions(+), 25 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 4d6ebf9cbb..9be00d1736 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -41,6 +41,7 @@ #include "llstring.h" #include "lltextutil.h" #include "lltrans.h" +#include "lltranslate.h" #include "lluictrlfactory.h" #include "llfloaterimsessiontab.h" #include "llagent.h" @@ -510,6 +511,31 @@ void chatterBoxInvitationCoro(std::string url, LLUUID sessionId, LLIMMgr::EInvit } +void translateSuccess(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text, + bool log2file, std::string originalMsg, std::string expectLang, std::string translation, const std::string detected_language) +{ + std::string message_txt(utf8_text); + // filter out non-interesting responses + if (!translation.empty() + && ((detected_language.empty()) || (expectLang != detected_language)) + && (LLStringUtil::compareInsensitive(translation, originalMsg) != 0)) + { + message_txt += " (" + LLTranslate::removeNoTranslateTags(translation) + ")"; + } + + LLIMModel::getInstance()->processAddingMessage(session_id, from, from_id, message_txt, log2file); +} + +void translateFailure(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text, + bool log2file, int status, const std::string err_msg) +{ + std::string message_txt(utf8_text); + std::string msg = LLTrans::getString("TranslationFailed", LLSD().with("[REASON]", err_msg)); + LLStringUtil::replaceString(msg, "\n", " "); // we want one-line error messages + message_txt += " (" + msg + ")"; + + LLIMModel::getInstance()->processAddingMessage(session_id, from, from_id, message_txt, log2file); +} LLIMModel::LLIMModel() { @@ -1188,39 +1214,56 @@ bool LLIMModel::logToFile(const std::string& file_name, const std::string& from, } } -bool LLIMModel::proccessOnlineOfflineNotification( +void LLIMModel::proccessOnlineOfflineNotification( const LLUUID& session_id, const std::string& utf8_text) { // Add system message to history - return addMessage(session_id, SYSTEM_FROM, LLUUID::null, utf8_text); + addMessage(session_id, SYSTEM_FROM, LLUUID::null, utf8_text); } -bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, +void LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text, bool log2file /* = true */) { - LLIMSession* session = addMessageSilently(session_id, from, from_id, utf8_text, log2file); - if (!session) return false; + if (gSavedSettings.getBOOL("TranslateChat") && (from != SYSTEM_FROM)) + { + const std::string from_lang = ""; // leave empty to trigger autodetect + const std::string to_lang = LLTranslate::getTranslateLanguage(); + + LLTranslate::translateMessage(from_lang, to_lang, utf8_text, + boost::bind(&translateSuccess, session_id, from, from_id, utf8_text, log2file, utf8_text, from_lang, _1, _2), + boost::bind(&translateFailure, session_id, from, from_id, utf8_text, log2file, _1, _2)); + } + else + { + processAddingMessage(session_id, from, from_id, utf8_text, log2file); + } +} - //good place to add some1 to recent list - //other places may be called from message history. - if( !from_id.isNull() && - ( session->isP2PSessionType() || session->isAdHocSessionType() ) ) - LLRecentPeople::instance().add(from_id); +void LLIMModel::processAddingMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, + const std::string& utf8_text, bool log2file /* = true */) +{ + LLIMSession* session = addMessageSilently(session_id, from, from_id, utf8_text, log2file); + if (!session) return; - // notify listeners - LLSD arg; - arg["session_id"] = session_id; - arg["num_unread"] = session->mNumUnread; - arg["participant_unread"] = session->mParticipantUnreadMessageCount; - arg["message"] = utf8_text; - arg["from"] = from; - arg["from_id"] = from_id; - arg["time"] = LLLogChat::timestamp(false); - arg["session_type"] = session->mSessionType; - mNewMsgSignal(arg); + //good place to add some1 to recent list + //other places may be called from message history. + if( !from_id.isNull() && + ( session->isP2PSessionType() || session->isAdHocSessionType() ) ) + LLRecentPeople::instance().add(from_id); - return true; + // notify listeners + LLSD arg; + arg["session_id"] = session_id; + arg["num_unread"] = session->mNumUnread; + arg["participant_unread"] = session->mParticipantUnreadMessageCount; + arg["message"] = utf8_text; + arg["from"] = from; + arg["from_id"] = from_id; + arg["time"] = LLLogChat::timestamp(false); + arg["session_type"] = session->mSessionType; + + mNewMsgSignal(arg); } LLIMModel::LLIMSession* LLIMModel::addMessageSilently(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index fdf9806e2e..5b9dedeac3 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -208,7 +208,8 @@ public: * and also saved into a file if log2file is specified. * It sends new message signal for each added message. */ - bool addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& other_participant_id, const std::string& utf8_text, bool log2file = true); + void addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& other_participant_id, const std::string& utf8_text, bool log2file = true); + void processAddingMessage(const LLUUID& session_id, const std::string& from, const LLUUID& other_participant_id, const std::string& utf8_text, bool log2file = true); /** * Similar to addMessage(...) above but won't send a signal about a new message added @@ -219,7 +220,7 @@ public: /** * Add a system message to an IM Model */ - bool proccessOnlineOfflineNotification(const LLUUID& session_id, const std::string& utf8_text); + void proccessOnlineOfflineNotification(const LLUUID& session_id, const std::string& utf8_text); /** * Get a session's name. diff --git a/indra/newview/skins/default/xui/en/menu_participant_view.xml b/indra/newview/skins/default/xui/en/menu_participant_view.xml index 7ea87ee05c..b9750284cd 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_view.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_view.xml @@ -90,7 +90,7 @@ parameter="conversation_log" /> - + -- cgit v1.2.3 From 449fa46b157c9cd30fd17f63a12a295da18c7b4f Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 27 Oct 2022 14:21:07 +0300 Subject: SL-18172 add the link to open object weights floater --- indra/newview/skins/default/xui/de/floater_tools.xml | 2 +- indra/newview/skins/default/xui/es/floater_tools.xml | 2 +- indra/newview/skins/default/xui/fr/floater_tools.xml | 2 +- indra/newview/skins/default/xui/it/floater_tools.xml | 2 +- indra/newview/skins/default/xui/ja/floater_tools.xml | 2 +- indra/newview/skins/default/xui/pl/floater_tools.xml | 2 +- indra/newview/skins/default/xui/pt/floater_tools.xml | 2 +- indra/newview/skins/default/xui/ru/floater_tools.xml | 2 +- indra/newview/skins/default/xui/tr/floater_tools.xml | 2 +- indra/newview/skins/default/xui/zh/floater_tools.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/indra/newview/skins/default/xui/de/floater_tools.xml b/indra/newview/skins/default/xui/de/floater_tools.xml index a4dfde66bc..f6208e11a5 100644 --- a/indra/newview/skins/default/xui/de/floater_tools.xml +++ b/indra/newview/skins/default/xui/de/floater_tools.xml @@ -40,7 +40,7 @@ Klicken und ziehen, um Land auszuwählen - [OBJ_COUNT] Objekte ausgewählt, Auswirkung auf Land [LAND_IMPACT] + [OBJ_COUNT] Objekte ausgewählt, Auswirkung auf Land [LAND_IMPACT] [secondlife:///app/openfloater/object_weights ?] Verbleibende Kapazität [LAND_CAPACITY]. diff --git a/indra/newview/skins/default/xui/es/floater_tools.xml b/indra/newview/skins/default/xui/es/floater_tools.xml index 6fce98472d..ffa85a2f04 100644 --- a/indra/newview/skins/default/xui/es/floater_tools.xml +++ b/indra/newview/skins/default/xui/es/floater_tools.xml @@ -25,7 +25,7 @@ Pulsa y arrastra para seleccionar el terreno. - [OBJ_COUNT] objetos seleccionados, impacto en el terreno [LAND_IMPACT] + [OBJ_COUNT] objetos seleccionados, impacto en el terreno [LAND_IMPACT] [secondlife:///app/openfloater/object_weights ?] Capacidad restante [LAND_CAPACITY]. diff --git a/indra/newview/skins/default/xui/fr/floater_tools.xml b/indra/newview/skins/default/xui/fr/floater_tools.xml index 9597d38dca..c161f3f530 100644 --- a/indra/newview/skins/default/xui/fr/floater_tools.xml +++ b/indra/newview/skins/default/xui/fr/floater_tools.xml @@ -40,7 +40,7 @@ Cliquez et faites glisser pour sélectionner le terrain. - [OBJ_COUNT] objets sélectionnés, impact sur le terrain [LAND_IMPACT] + [OBJ_COUNT] objets sélectionnés, impact sur le terrain [LAND_IMPACT] [secondlife:///app/openfloater/object_weights ?] Capacité restante [LAND_CAPACITY]. diff --git a/indra/newview/skins/default/xui/it/floater_tools.xml b/indra/newview/skins/default/xui/it/floater_tools.xml index a21ae9a485..f98a2da277 100644 --- a/indra/newview/skins/default/xui/it/floater_tools.xml +++ b/indra/newview/skins/default/xui/it/floater_tools.xml @@ -40,7 +40,7 @@ Clicca e trascina per selezionare il terreno - [OBJ_COUNT] oggetti selezionati, impatto terreno [LAND_IMPACT] + [OBJ_COUNT] oggetti selezionati, impatto terreno [LAND_IMPACT] [secondlife:///app/openfloater/object_weights ?] Capacità restante [LAND_CAPACITY]. diff --git a/indra/newview/skins/default/xui/ja/floater_tools.xml b/indra/newview/skins/default/xui/ja/floater_tools.xml index aec0dbdb55..13f766698e 100644 --- a/indra/newview/skins/default/xui/ja/floater_tools.xml +++ b/indra/newview/skins/default/xui/ja/floater_tools.xml @@ -40,7 +40,7 @@ 土地をクリックし、ドラッグして選択 - 選択されているオブジェクトは [OBJ_COUNT] 個、土地の負荷は [LAND_IMPACT] + 選択されているオブジェクトは [OBJ_COUNT] 個、土地の負荷は [LAND_IMPACT] [secondlife:///app/openfloater/object_weights 詳細] 残りの許容数 [LAND_CAPACITY]。 diff --git a/indra/newview/skins/default/xui/pl/floater_tools.xml b/indra/newview/skins/default/xui/pl/floater_tools.xml index 5e2ed4a351..8932a86fd1 100644 --- a/indra/newview/skins/default/xui/pl/floater_tools.xml +++ b/indra/newview/skins/default/xui/pl/floater_tools.xml @@ -40,7 +40,7 @@ Kliknij i przeciągnij, aby zaznaczyć teren - [OBJ_COUNT] zaznaczonych obiektów, wpływ na strefę: [LAND_IMPACT] + [OBJ_COUNT] zaznaczonych obiektów, wpływ na strefę: [LAND_IMPACT] [secondlife:///app/openfloater/object_weights ?] Pojemność pozostała: [LAND_CAPACITY]. diff --git a/indra/newview/skins/default/xui/pt/floater_tools.xml b/indra/newview/skins/default/xui/pt/floater_tools.xml index 0882f485a6..c0eab171c8 100644 --- a/indra/newview/skins/default/xui/pt/floater_tools.xml +++ b/indra/newview/skins/default/xui/pt/floater_tools.xml @@ -40,7 +40,7 @@ Clicar e arrastar para selecionar a terra - [OBJ_COUNT] objetos selecionados, impacto no terreno [LAND_IMPACT] + [OBJ_COUNT] objetos selecionados, impacto no terreno [LAND_IMPACT] [secondlife:///app/openfloater/object_weights ?] Capacidade restante [LAND_CAPACITY]. diff --git a/indra/newview/skins/default/xui/ru/floater_tools.xml b/indra/newview/skins/default/xui/ru/floater_tools.xml index 82ee3c49ae..44f54aabb6 100644 --- a/indra/newview/skins/default/xui/ru/floater_tools.xml +++ b/indra/newview/skins/default/xui/ru/floater_tools.xml @@ -40,7 +40,7 @@ Щелкните и перетащите для выделения земли - Выбрано объектов: [OBJ_COUNT], влияние на землю [LAND_IMPACT] + Выбрано объектов: [OBJ_COUNT], влияние на землю [LAND_IMPACT] [secondlife:///app/openfloater/object_weights ?] Остаток емкости [LAND_CAPACITY]. diff --git a/indra/newview/skins/default/xui/tr/floater_tools.xml b/indra/newview/skins/default/xui/tr/floater_tools.xml index d6b9a4a533..d48a617e38 100644 --- a/indra/newview/skins/default/xui/tr/floater_tools.xml +++ b/indra/newview/skins/default/xui/tr/floater_tools.xml @@ -40,7 +40,7 @@ Araziyi seçmek için tıklayın ve sürükleyin - [OBJ_COUNT] nesne seçili, [LAND_IMPACT] arazi etkisi + [OBJ_COUNT] nesne seçili, [LAND_IMPACT] arazi etkisi [secondlife:///app/openfloater/object_weights Ek bilgi] Kalan kapasite [LAND_CAPACITY]. diff --git a/indra/newview/skins/default/xui/zh/floater_tools.xml b/indra/newview/skins/default/xui/zh/floater_tools.xml index 539c7454f1..f83b058ce1 100644 --- a/indra/newview/skins/default/xui/zh/floater_tools.xml +++ b/indra/newview/skins/default/xui/zh/floater_tools.xml @@ -40,7 +40,7 @@ 按住並拖曳,可以選取土地 - 選取了 [OBJ_COUNT] 個物件,土地衝擊量 [LAND_IMPACT] + 選取了 [OBJ_COUNT] 個物件,土地衝擊量 [LAND_IMPACT] [secondlife:///app/openfloater/object_weights 詳情] 剩餘容納量 [LAND_CAPACITY]。 -- cgit v1.2.3 From 27f7edeedbbf65086e4a6ba28724f8a80c48bcd0 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 28 Oct 2022 19:55:40 +0300 Subject: SL-16534 The link item is not updating after rezzing the linked object in-world --- indra/newview/llinventoryfunctions.cpp | 6 ++++- indra/newview/llinventorymodel.cpp | 41 +++++++++++++++++----------------- indra/newview/llinventorymodel.h | 2 +- 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 27edc8148e..dab1e5c38d 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -529,7 +529,11 @@ BOOL get_is_item_worn(const LLUUID& id) const LLViewerInventoryItem* item = gInventory.getItem(id); if (!item) return FALSE; - + + if (item->getIsLinkType() && !gInventory.getItem(item->getLinkedUUID())) + { + return FALSE; + } // Consider the item as worn if it has links in COF. if (LLAppearanceMgr::instance().isLinkedInCOF(id)) { diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index fab7ae8f1a..cf0219e76e 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1636,6 +1636,8 @@ void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links, boo LL_WARNS(LOG_INV) << "Deleting non-existent object [ id: " << id << " ] " << LL_ENDL; return; } + + LLInventoryModel::item_array_t links = collectLinksTo(id); LL_DEBUGS(LOG_INV) << "Deleting inventory object " << id << LL_ENDL; mLastItem = NULL; @@ -1694,7 +1696,7 @@ void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links, boo obj = NULL; // delete obj if (fix_broken_links && !is_link_type) { - updateLinkedObjectsFromPurge(id); + rebuildLinkItems(links); } if (do_notify_observers) { @@ -1702,26 +1704,25 @@ void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links, boo } } -void LLInventoryModel::updateLinkedObjectsFromPurge(const LLUUID &baseobj_id) +void LLInventoryModel::rebuildLinkItems(LLInventoryModel::item_array_t& items) { - LLInventoryModel::item_array_t item_array = collectLinksTo(baseobj_id); - - // REBUILD is expensive, so clear the current change list first else - // everything else on the changelist will also get rebuilt. - if (item_array.size() > 0) - { - notifyObservers(); - for (LLInventoryModel::item_array_t::const_iterator iter = item_array.begin(); - iter != item_array.end(); - iter++) - { - const LLViewerInventoryItem *linked_item = (*iter); - const LLUUID &item_id = linked_item->getUUID(); - if (item_id == baseobj_id) continue; - addChangedMask(LLInventoryObserver::REBUILD, item_id); - } - notifyObservers(); - } + // REBUILD is expensive, so clear the current change list first else + // everything else on the changelist will also get rebuilt. + if (items.size() > 0) + { + notifyObservers(); + for (LLInventoryModel::item_array_t::const_iterator iter = items.begin(); + iter != items.end(); + iter++) + { + const LLViewerInventoryItem *linked_item = (*iter); + if (linked_item) + { + addChangedMask(LLInventoryObserver::REBUILD, linked_item->getUUID()); + } + } + notifyObservers(); + } } // Add/remove an observer. If the observer is destroyed, be sure to diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index c4133ff9bb..685c2c0fe5 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -445,7 +445,7 @@ public: void checkTrashOverflow(); protected: - void updateLinkedObjectsFromPurge(const LLUUID& baseobj_id); + void rebuildLinkItems(LLInventoryModel::item_array_t& items); //-------------------------------------------------------------------- // Reorder -- cgit v1.2.3 From 10fcee5be60fe9a5e87e4202e894466476b24b28 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 3 Nov 2022 20:03:55 +0200 Subject: SL-18492 Switch inventory script compiler default from LSO to mono --- indra/newview/llinventorymodel.cpp | 1 + indra/newview/llviewerassetupload.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index cf0219e76e..58925dfce6 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1637,6 +1637,7 @@ void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links, boo return; } + //collect the links before removing the item from mItemMap LLInventoryModel::item_array_t links = collectLinksTo(id); LL_DEBUGS(LOG_INV) << "Deleting inventory object " << id << LL_ENDL; diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 14fae8d035..7bdb611eb7 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -704,7 +704,7 @@ LLUUID LLBufferedAssetUploadInfo::finishUpload(LLSD &result) LLScriptAssetUpload::LLScriptAssetUpload(LLUUID itemId, std::string buffer, invnUploadFinish_f finish): LLBufferedAssetUploadInfo(itemId, LLAssetType::AT_LSL_TEXT, buffer, finish), mExerienceId(), - mTargetType(LSL2), + mTargetType(MONO), mIsRunning(false) { } @@ -725,7 +725,7 @@ LLSD LLScriptAssetUpload::generatePostBody() if (getTaskId().isNull()) { body["item_id"] = getItemId(); - body["target"] = "lsl2"; + body["target"] = "mono"; } else { -- cgit v1.2.3 From 549c6375f1ac3e1a165475279558a6d598333c0e Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 4 Nov 2022 18:18:46 +0200 Subject: SL-7277 show Advanced permissions in Item profile that was opened from inventory --- .../skins/default/xui/en/sidepanel_item_info.xml | 68 +++++++++++++++++++++- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml index 9a68479d05..ff7ea08251 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml @@ -461,8 +461,72 @@ max_val="999999999" top_pad="10" tool_tip="Object cost." /> - - + + B: + + + O: + + + G: + + + E: + + + N: + + Date: Thu, 10 Nov 2022 19:40:57 +0200 Subject: SL-18426 At log in only a part friends reported to chat as online Server sends updates in bulk now, so notify per agent instead of per update --- indra/newview/llcallingcard.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 1ad2157df0..193d368b83 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -719,11 +719,12 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online) // we were tracking someone who went offline deleteTrackingData(); } - } - if(chat_notify) - { - // Look up the name of this agent for the notification - LLAvatarNameCache::get(agent_id,boost::bind(&on_avatar_name_cache_notify,_1, _2, online, payload)); + + if(chat_notify) + { + // Look up the name of this agent for the notification + LLAvatarNameCache::get(agent_id,boost::bind(&on_avatar_name_cache_notify,_1, _2, online, payload)); + } } mModifyMask |= LLFriendObserver::ONLINE; -- cgit v1.2.3 From 333786d2ba3dc3b1771a9286c1e8c60152ed7037 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Thu, 17 Nov 2022 17:21:37 +0200 Subject: SL-18644 reset 'All items' filter when using 'Find Original' in Recent tab --- indra/newview/llinventoryfunctions.cpp | 2 +- indra/newview/llpanelmaininventory.cpp | 12 ++++++++++++ indra/newview/llpanelmaininventory.h | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index dab1e5c38d..f454ca5bfb 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -791,7 +791,7 @@ void show_item_original(const LLUUID& item_uuid) LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel(); if (main_inventory) { - main_inventory->resetFilters(); + main_inventory->resetAllItemsFilters(); } reset_inventory_filter(); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 89256b40c4..ccda9c2399 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -403,6 +403,18 @@ void LLPanelMainInventory::resetFilters() setFilterTextFromFilter(); } +void LLPanelMainInventory::resetAllItemsFilters() +{ + LLFloaterInventoryFinder *finder = getFinder(); + getAllItemsPanel()->getFilter().resetDefault(); + if (finder) + { + finder->updateElementsFromFilter(); + } + + setFilterTextFromFilter(); +} + void LLPanelMainInventory::setSortBy(const LLSD& userdata) { U32 sort_order_mask = getActivePanel()->getSortOrder(); diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index 257bce930c..7aae5a0b3c 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -96,6 +96,7 @@ public: void toggleFindOptions(); void resetFilters(); + void resetAllItemsFilters(); protected: // -- cgit v1.2.3 From d57e95da968f74f869063caad524fd4182593159 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 18 Nov 2022 14:21:58 +0200 Subject: SL-18528 Clear cached MFA token when Remember Password is unchecked in viewer --- indra/newview/llpanellogin.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 9df3a8e31a..b14fdbf38e 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -1103,6 +1103,18 @@ void LLPanelLogin::onRememberPasswordCheck(void*) if (sInstance) { gSavedSettings.setBOOL("UpdateRememberPasswordSetting", TRUE); + + LLPointer cred; + bool remember_user, remember_password; + getFields(cred, remember_user, remember_password); + + std::string grid(LLGridManager::getInstance()->getGridId()); + std::string user_id(cred->userID()); + if (!remember_password) + { + gSecAPIHandler->removeFromProtectedMap("mfa_hash", grid, user_id); + gSecAPIHandler->syncProtectedMap(); + } } } -- cgit v1.2.3 From 9c5043d8c62ae0d321d01560098edf67bf17ebf7 Mon Sep 17 00:00:00 2001 From: Henri Beauchamp Date: Sat, 19 Nov 2022 21:42:41 +0100 Subject: Fix a thread safety issue in the GL image worker. LLViewerTexture::mNeedsCreateTexture needs to be an attomic bool since it is written both in the main thread and in the GL image worker thread. We can now enable threaded bump maps creation as a result of this fix. I have read the CLA Document and I hereby sign the CLA --- indra/newview/lldrawpoolbump.cpp | 4 +++- indra/newview/llviewertexture.cpp | 16 ++++++++-------- indra/newview/llviewertexture.h | 5 ++++- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 8db6a10e26..ed991a2bbf 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -77,7 +77,9 @@ static S32 cube_channel = -1; static S32 diffuse_channel = -1; static S32 bump_channel = -1; -#define LL_BUMPLIST_MULTITHREADED 0 // TODO -- figure out why this doesn't work +// Enabled after changing LLViewerTexture::mNeedsCreateTexture to an +// LLAtomicBool; this should work just fine, now. HB +#define LL_BUMPLIST_MULTITHREADED 1 // static void LLStandardBumpmap::init() diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index e3ac56d0d3..8a11c5cf8f 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1118,7 +1118,7 @@ void LLViewerFetchedTexture::init(bool firstinit) mLoadedCallbackDesiredDiscardLevel = S8_MAX; mPauseLoadedCallBacks = FALSE; - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; mIsRawImageValid = FALSE; mRawDiscardLevel = INVALID_DISCARD_LEVEL; @@ -1400,12 +1400,12 @@ void LLViewerFetchedTexture::addToCreateTexture() { //just update some variables, not to create a real GL texture. createGLTexture(mRawDiscardLevel, mRawImage, 0, FALSE); - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; destroyRawImage(); } else if(!force_update && getDiscardLevel() > -1 && getDiscardLevel() <= mRawDiscardLevel) { - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; destroyRawImage(); } else @@ -1441,7 +1441,7 @@ void LLViewerFetchedTexture::addToCreateTexture() mRawDiscardLevel += i; if(mRawDiscardLevel >= getDiscardLevel() && getDiscardLevel() > 0) { - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; destroyRawImage(); return; } @@ -1473,7 +1473,7 @@ BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/) destroyRawImage(); return FALSE; } - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; if (mRawImage.isNull()) { @@ -1609,14 +1609,14 @@ void LLViewerFetchedTexture::postCreateTexture() destroyRawImage(); } - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; } void LLViewerFetchedTexture::scheduleCreateTexture() { if (!mNeedsCreateTexture) { - mNeedsCreateTexture = TRUE; + mNeedsCreateTexture = true; if (preCreateTexture()) { #if LL_IMAGEGL_THREAD_CHECK @@ -1630,7 +1630,7 @@ void LLViewerFetchedTexture::scheduleCreateTexture() memcpy(data_copy, data, size); } #endif - mNeedsCreateTexture = TRUE; + mNeedsCreateTexture = true; auto mainq = LLImageGLThread::sEnabled ? mMainQueue.lock() : nullptr; if (mainq) { diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index b953d7006b..2f5e0d01df 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -27,6 +27,7 @@ #ifndef LL_LLVIEWERTEXTURE_H #define LL_LLVIEWERTEXTURE_H +#include "llatomic.h" #include "llgltexture.h" #include "lltimer.h" #include "llframetimer.h" @@ -528,7 +529,9 @@ protected: LLFrameTimer mStopFetchingTimer; // Time since mDecodePriority == 0.f. BOOL mInImageList; // TRUE if image is in list (in which case don't reset priority!) - BOOL mNeedsCreateTexture; + // This needs to be atomic, since it is written both in the main thread + // and in the GL image worker thread... HB + LLAtomicBool mNeedsCreateTexture; BOOL mForSculpt ; //a flag if the texture is used as sculpt data. BOOL mIsFetched ; //is loaded from remote or from cache, not generated locally. -- cgit v1.2.3 From d01f7afff206dd610b6c209e6bd69d646b47863f Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko <118780484+maxim-productengine@users.noreply.github.com> Date: Fri, 25 Nov 2022 18:16:31 +0200 Subject: SL-18713 fix crash in handleCompositionMessage (#12) --- indra/llwindow/llwindowwin32.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index c487877caf..740224adf9 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -4100,6 +4100,10 @@ void LLWindowWin32::handleStartCompositionMessage() void LLWindowWin32::handleCompositionMessage(const U32 indexes) { + if (!mPreeditor) + { + return; + } BOOL needs_update = FALSE; LLWString result_string; LLWString preedit_string; -- cgit v1.2.3 From e01486715aa83e513f247c6db99b95cde47f433d Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 25 Nov 2022 23:58:27 +0200 Subject: SL-18101 MoaP Reset button should reset the Current URL --- indra/newview/llpanelmediasettingsgeneral.cpp | 31 +++++++++++++++++++--- .../xui/en/panel_media_settings_general.xml | 5 +--- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index e1818cc68b..b9cb534034 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -39,6 +39,7 @@ #include "llagent.h" #include "llviewerwindow.h" #include "llviewermedia.h" +#include "llvovolume.h" #include "llsdutil.h" #include "llselectmgr.h" #include "llbutton.h" @@ -452,9 +453,16 @@ bool LLPanelMediaSettingsGeneral::navigateHomeSelectedFace(bool only_if_current_ { viewer_media_t media_impl = LLViewerMedia::getInstance()->getMediaImplFromTextureID(object->getTE(face)->getMediaData()->getMediaID()); - if(media_impl) - { - media_impl->navigateHome(); + if (media_impl) + { + media_impl->navigateHome(); + + if (!only_if_current_is_empty) + { + LLSD media_data; + media_data[LLMediaEntry::CURRENT_URL_KEY] = std::string(); + object->getTE(face)->mergeIntoMediaData(media_data); + } return true; } } @@ -470,6 +478,23 @@ bool LLPanelMediaSettingsGeneral::navigateHomeSelectedFace(bool only_if_current_ LLObjectSelectionHandle selected_objects =LLSelectMgr::getInstance()->getSelection(); selected_objects->getSelectedTEValue( &functor_navigate_media, all_face_media_navigated ); + if (all_face_media_navigated) + { + struct functor_sync_to_server : public LLSelectedObjectFunctor + { + virtual bool apply(LLViewerObject* object) + { + LLVOVolume *volume = dynamic_cast(object); + if (volume) + { + volume->sendMediaDataUpdate(); + } + return true; + } + } sendfunc; + selected_objects->applyToObjects(&sendfunc); + } + // Note: we don't update the 'current URL' field until the media data itself changes return all_face_media_navigated; diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml index 2316beeb36..4c566dc60a 100644 --- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml +++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml @@ -92,10 +92,7 @@ label="Reset" left_delta="233" name="current_url_reset_btn" - width="110" > - - + width="110"/> Date: Fri, 2 Dec 2022 00:45:34 +0200 Subject: SL-18734 certain links are not displayed appropriately --- indra/llui/llurlentry.cpp | 1 + indra/llui/llurlregistry.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 1547a4ba5c..6a9070634c 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -206,6 +206,7 @@ bool LLUrlEntryBase::isWikiLinkCorrect(const std::string &labeled_url) const { return (chr == L'\u02D0') // "Modifier Letter Colon" || (chr == L'\uFF1A') // "Fullwidth Colon" + || (chr == L'\u2236') // "Ratio" || (chr == L'\uFE55'); // "Small Colon" }, L'\u003A'); // Colon diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index c9d7013a11..23f3dca3fb 100644 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -169,7 +169,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL for (it = mUrlEntry.begin(); it != mUrlEntry.end(); ++it) { //Skip for url entry icon if content is not trusted - if(!is_content_trusted && (mUrlEntryIcon == *it)) + if((mUrlEntryIcon == *it) && ((text.find("Hand") != std::string::npos) || !is_content_trusted)) { continue; } -- cgit v1.2.3 From 120d9c16fa08add7d5945cdcbc7af707a1d8cf2b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 7 Dec 2022 03:39:35 +0200 Subject: SL-18776 Avatar picker search not updated on http error --- indra/newview/llfloateravatarpicker.cpp | 130 +++++++++++++++++--------------- 1 file changed, 71 insertions(+), 59 deletions(-) diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 0186c4aebe..7cd2e0146a 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -428,13 +428,18 @@ void LLFloaterAvatarPicker::findCoro(std::string url, LLUUID queryID, std::strin if (status || (status == LLCore::HttpStatus(HTTP_BAD_REQUEST))) { - LLFloaterAvatarPicker* floater = - LLFloaterReg::findTypedInstance("avatar_picker", name); - if (floater) - { - result.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS); - floater->processResponse(queryID, result); - } + result.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS); + } + else + { + result["failure_reason"] = status.toString(); + } + + LLFloaterAvatarPicker* floater = + LLFloaterReg::findTypedInstance("avatar_picker", name); + if (floater) + { + floater->processResponse(queryID, result); } } @@ -672,59 +677,66 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD& { LLScrollListCtrl* search_results = getChild("SearchResults"); - LLSD agents = content["agents"]; - - // clear "Searching" label on first results - search_results->deleteAllItems(); - - LLSD item; - LLSD::array_const_iterator it = agents.beginArray(); - for ( ; it != agents.endArray(); ++it) - { - const LLSD& row = *it; - if (row["id"].asUUID() != gAgent.getID() || !mExcludeAgentFromSearchResults) - { - item["id"] = row["id"]; - LLSD& columns = item["columns"]; - columns[0]["column"] = "name"; - columns[0]["value"] = row["display_name"]; - columns[1]["column"] = "username"; - columns[1]["value"] = row["username"]; - search_results->addElement(item); - - // add the avatar name to our list - LLAvatarName avatar_name; - avatar_name.fromLLSD(row); - sAvatarNameMap[row["id"].asUUID()] = avatar_name; - } - } + // clear "Searching" label on first results + search_results->deleteAllItems(); - if (search_results->isEmpty()) - { - std::string name = "'" + getChild("Edit")->getValue().asString() + "'"; - LLSD item; - item["id"] = LLUUID::null; - item["columns"][0]["column"] = "name"; - item["columns"][0]["value"] = name; - item["columns"][1]["column"] = "username"; - item["columns"][1]["value"] = getString("not_found_text"); - search_results->addElement(item); - search_results->setEnabled(false); - getChildView("ok_btn")->setEnabled(false); - } - else - { - getChildView("ok_btn")->setEnabled(true); - search_results->setEnabled(true); - search_results->sortByColumnIndex(1, TRUE); - std::string text = getChild("Edit")->getValue().asString(); - if (!search_results->selectItemByLabel(text, TRUE, 1)) - { - search_results->selectFirstItem(); - } - onList(); - search_results->setFocus(TRUE); - } + if (content.has("agents")) + { + LLSD agents = content["agents"]; + + LLSD item; + LLSD::array_const_iterator it = agents.beginArray(); + for (; it != agents.endArray(); ++it) + { + const LLSD& row = *it; + if (row["id"].asUUID() != gAgent.getID() || !mExcludeAgentFromSearchResults) + { + item["id"] = row["id"]; + LLSD& columns = item["columns"]; + columns[0]["column"] = "name"; + columns[0]["value"] = row["display_name"]; + columns[1]["column"] = "username"; + columns[1]["value"] = row["username"]; + search_results->addElement(item); + + // add the avatar name to our list + LLAvatarName avatar_name; + avatar_name.fromLLSD(row); + sAvatarNameMap[row["id"].asUUID()] = avatar_name; + } + } + + if (search_results->isEmpty()) + { + std::string name = "'" + getChild("Edit")->getValue().asString() + "'"; + LLSD item; + item["id"] = LLUUID::null; + item["columns"][0]["column"] = "name"; + item["columns"][0]["value"] = name; + item["columns"][1]["column"] = "username"; + item["columns"][1]["value"] = getString("not_found_text"); + search_results->addElement(item); + search_results->setEnabled(false); + getChildView("ok_btn")->setEnabled(false); + } + else + { + getChildView("ok_btn")->setEnabled(true); + search_results->setEnabled(true); + search_results->sortByColumnIndex(1, TRUE); + std::string text = getChild("Edit")->getValue().asString(); + if (!search_results->selectItemByLabel(text, TRUE, 1)) + { + search_results->selectFirstItem(); + } + onList(); + search_results->setFocus(TRUE); + } + } + else if (content.has("failure_reason")) + { + getChild("SearchResults")->setCommentText(content["failure_reason"].asString()); + } } } -- cgit v1.2.3 From 3d6c4036a605588e0c12c4a09d4d50cd9990ae8e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 7 Dec 2022 08:55:45 +0200 Subject: SL-18799 Crash at requestPostCapability --- indra/newview/llagent.cpp | 2 +- indra/newview/llinventorymodelbackgroundfetch.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 5250369813..39506d62e8 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2914,7 +2914,7 @@ bool LLAgent::requestPostCapability(const std::string &capName, LLSD &postData, { std::string url; - url = getRegion()->getCapability(capName); + url = getRegionCapability(capName); if (url.empty()) { diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 406c8b89d0..4a9b471a47 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -363,7 +363,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch() //If there are items in mFetchQueue, we want to check the time since the last bulkFetch was //sent. If it exceeds our retry time, go ahead and fire off another batch. LLViewerRegion * region(gAgent.getRegion()); - if (! region || gDisconnected) + if (! region || gDisconnected || LLApp::isExiting()) { return; } -- cgit v1.2.3 From 71926db3a5bed6d4984619b4e587402c9e556516 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 7 Dec 2022 12:55:55 +0200 Subject: SL-18800 fix crash in removeMutedAVsLights --- indra/newview/pipeline.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 96ba80dacc..b2010cc189 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1776,7 +1776,9 @@ void LLPipeline::removeMutedAVsLights(LLVOAvatar* muted_avatar) for (light_set_t::iterator iter = gPipeline.mNearbyLights.begin(); iter != gPipeline.mNearbyLights.end(); iter++) { - if (iter->drawable->getVObj()->isAttachment() && iter->drawable->getVObj()->getAvatar() == muted_avatar) + const LLViewerObject *vobj = iter->drawable->getVObj(); + if (vobj && vobj->getAvatar() + && vobj->isAttachment() && vobj->getAvatar() == muted_avatar) { gPipeline.mLights.erase(iter->drawable); gPipeline.mNearbyLights.erase(iter); -- cgit v1.2.3 From 823dbc880540a789c5768930e0dffafd7c4a0269 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 7 Dec 2022 19:33:12 +0200 Subject: SL-18801 Crash at LLPluginProcessParent::pollTick() Looks like pollTick tried to call an already dead process --- indra/llcommon/llprocess.cpp | 8 ++++++++ indra/llplugin/llpluginprocessparent.cpp | 5 +++++ indra/newview/llviewerobjectlist.cpp | 5 ++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/indra/llcommon/llprocess.cpp b/indra/llcommon/llprocess.cpp index 23936f0526..97a38ea992 100644 --- a/indra/llcommon/llprocess.cpp +++ b/indra/llcommon/llprocess.cpp @@ -272,6 +272,14 @@ public: boost::bind(&ReadPipeImpl::tick, this, _1)); } + ~ReadPipeImpl() + { + if (mConnection.connected()) + { + mConnection.disconnect(); + } + } + // Much of the implementation is simply connecting the abstract virtual // methods with implementation data concealed from the base class. virtual std::istream& get_istream() { return mStream; } diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp index 1fbbad06d4..756d0b5db8 100644 --- a/indra/llplugin/llpluginprocessparent.cpp +++ b/indra/llplugin/llpluginprocessparent.cpp @@ -162,6 +162,11 @@ LLPluginProcessParent::~LLPluginProcessParent() { // If we are quitting, the network sockets will already have been destroyed. killSockets(); } + + if (mPolling.connected()) + { + mPolling.disconnect(); + } } /*static*/ diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index e930b58111..efc4ded79e 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -815,7 +815,10 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent) { virtual bool apply(LLViewerObject* objectp) { - objectp->boostTexturePriority(); + if (objectp) + { + objectp->boostTexturePriority(); + } return true; } } func; -- cgit v1.2.3 From 8496ae48dd4c5265f4d8007c394fbdf16640d8a2 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Thu, 8 Dec 2022 15:07:10 +0200 Subject: SL-18807 FIXED Viewer crashes when trying to purge item using 'Pick: Select settings' floater --- indra/newview/llinventorypanel.cpp | 17 +++++++---------- indra/newview/llinventorypanel.h | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 6b102c7500..0e3db51d2a 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1622,6 +1622,7 @@ void LLInventoryPanel::purgeSelectedItems() if (inventory_selected.empty()) return; LLSD args; S32 count = inventory_selected.size(); + std::vector selected_items; for (std::set::const_iterator it = inventory_selected.begin(), end_it = inventory_selected.end(); it != end_it; ++it) @@ -1631,27 +1632,23 @@ void LLInventoryPanel::purgeSelectedItems() LLInventoryModel::item_array_t items; gInventory.collectDescendents(item_id, cats, items, LLInventoryModel::INCLUDE_TRASH); count += items.size() + cats.size(); + selected_items.push_back(item_id); } args["COUNT"] = count; - LLNotificationsUtil::add("PurgeSelectedItems", args, LLSD(), boost::bind(&LLInventoryPanel::callbackPurgeSelectedItems, this, _1, _2)); + LLNotificationsUtil::add("PurgeSelectedItems", args, LLSD(), boost::bind(callbackPurgeSelectedItems, _1, _2, selected_items)); } -void LLInventoryPanel::callbackPurgeSelectedItems(const LLSD& notification, const LLSD& response) +// static +void LLInventoryPanel::callbackPurgeSelectedItems(const LLSD& notification, const LLSD& response, const std::vector inventory_selected) { - if (!mFolderRoot.get()) return; - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) { - const std::set inventory_selected = mFolderRoot.get()->getSelectionList(); if (inventory_selected.empty()) return; - std::set::const_iterator it = inventory_selected.begin(); - const std::set::const_iterator it_end = inventory_selected.end(); - for (; it != it_end; ++it) + for (auto it : inventory_selected) { - LLUUID item_id = static_cast((*it)->getViewModelItem())->getUUID(); - remove_inventory_object(item_id, NULL); + remove_inventory_object(it, NULL); } } } diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 552c61b915..2c782a5ea7 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -260,7 +260,7 @@ public: // Clean up stuff when the folder root gets deleted void clearFolderRoot(); - void callbackPurgeSelectedItems(const LLSD& notification, const LLSD& response); + static void callbackPurgeSelectedItems(const LLSD& notification, const LLSD& response, const std::vector inventory_selected); protected: void openStartFolderOrMyInventory(); // open the first level of inventory -- cgit v1.2.3 From b79c4e47a80e4e4aba01475cdd2e65cbaf6385a6 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 9 Dec 2022 07:44:27 +0200 Subject: SL-18776 Fix handling for an empty avatar list --- indra/newview/llfloateravatarpicker.cpp | 11 ++++++----- .../default/xui/en/floater_inventory_item_properties.xml | 1 - indra/newview/skins/default/xui/en/floater_tools.xml | 1 - indra/newview/skins/default/xui/en/sidepanel_item_info.xml | 1 - indra/newview/skins/default/xui/en/sidepanel_task_info.xml | 1 - 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 7cd2e0146a..2422596f60 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -680,7 +680,12 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD& // clear "Searching" label on first results search_results->deleteAllItems(); - if (content.has("agents")) + if (content.has("failure_reason")) + { + getChild("SearchResults")->setCommentText(content["failure_reason"].asString()); + getChildView("ok_btn")->setEnabled(false); + } + else { LLSD agents = content["agents"]; @@ -733,10 +738,6 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD& search_results->setFocus(TRUE); } } - else if (content.has("failure_reason")) - { - getChild("SearchResults")->setCommentText(content["failure_reason"].asString()); - } } } diff --git a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml index 45e16c59ae..850e1be372 100644 --- a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml @@ -323,7 +323,6 @@ follows="left|top" decimal_digits="0" increment="1" - control_name="Edit Cost" name="Edit Cost" label="Price:" label_width="100" diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index ade79b8884..d9b0ac0060 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -1140,7 +1140,6 @@ even though the user gets a free copy. decimal_digits="0" increment="1" left_pad="0" - control_name="Edit Cost" name="Edit Cost" label="L$" label_width="15" diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml index ff7ea08251..35d14251c7 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml @@ -450,7 +450,6 @@ follows="left|top" decimal_digits="0" increment="1" - control_name="Edit Cost" name="Edit Cost" label="Price: L$" label_width="75" diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml index 1c9d750aa6..0b32215964 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml @@ -454,7 +454,6 @@ increment="1" top_pad="10" left="120" - control_name="Edit Cost" name="Edit Cost" label="Price: L$" label_width="73" -- cgit v1.2.3 From 9f7c22bbe5794409a6fbb2a1a08834944438e619 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 9 Dec 2022 11:12:20 +0200 Subject: SL-18810 FIXED "Find Original" doesn't work if Item profile was previously selected --- indra/newview/llinventoryfunctions.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index f454ca5bfb..0e0f924d3c 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -799,6 +799,7 @@ void show_item_original(const LLUUID& item_uuid) { LLFloaterReg::toggleInstanceOrBringToFront("inventory"); } + sidepanel_inventory->showInventoryPanel(); const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX); if (gInventory.isObjectDescendentOf(gInventory.getLinkedItemID(item_uuid), inbox_id)) -- cgit v1.2.3 From 94cc9149477e59411f7b0fc96823296f121e1b4f Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 9 Dec 2022 14:47:26 +0200 Subject: SL-18823 FIXED Crash when using 'Create folder from selected' --- indra/newview/llinventoryfunctions.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 0e0f924d3c..43b30dea5f 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2587,9 +2587,13 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root LLFloater::setFloaterHost(multi_propertiesp); } - std::set selected_uuid_set = LLAvatarActions::getInventorySelectedUUIDs(); uuid_vec_t ids; - std::copy(selected_uuid_set.begin(), selected_uuid_set.end(), std::back_inserter(ids)); + for (std::set::iterator it = selected_items.begin(), end_it = selected_items.end(); + it != end_it; + ++it) + { + ids.push_back(static_cast((*it)->getViewModelItem())->getUUID()); + } // Check for actions that get handled in bulk if (action == "wear") { @@ -2648,7 +2652,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root } else if ("ungroup_folder_items" == action) { - if (selected_uuid_set.size() == 1) + if (ids.size() == 1) { LLInventoryCategory* inv_cat = gInventory.getCategory(*ids.begin()); if (!inv_cat || LLFolderType::lookupIsProtectedType(inv_cat->getPreferredType())) -- cgit v1.2.3 From 4a554bfded4b916576054ffb19963a8a52dc719d Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 9 Dec 2022 15:02:26 +0000 Subject: SL-18824 - added hardare_concurrency to system stats --- indra/newview/llviewerstats.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index a4fbbb3e78..df3db9bb1d 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -509,6 +509,7 @@ void send_viewer_stats(bool include_preferences) system["cpu_sse"] = gSysCPU.getSSEVersions(); system["address_size"] = ADDRESS_SIZE; system["os_bitness"] = LLOSInfo::instance().getOSBitness(); + system["hardware_concurrency"] = (LLSD::Integer) std::thread::hardware_concurrency(); unsigned char MACAddress[MAC_ADDRESS_BYTES]; LLUUID::getNodeID(MACAddress); std::string macAddressString = llformat("%02x-%02x-%02x-%02x-%02x-%02x", -- cgit v1.2.3 From f01f39afd1b43a43a9886d3146fd4ea0950459b0 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 9 Dec 2022 20:56:00 +0200 Subject: SL-8294 Fixed Incorrect coordinates in address bar Example: Stepping over 183/255/22 will show position 183/1/22 of the same region --- indra/newview/llagentui.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 3410a37890..c19ad2ae6f 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -53,7 +53,16 @@ void LLAgentUI::buildSLURL(LLSLURL& slurl, const bool escaped /*= true*/) LLViewerRegion *regionp = gAgent.getRegion(); if (regionp) { - return_slurl = LLSLURL(regionp->getName(), gAgent.getPositionGlobal()); + // Make sure coordinates are within current region + LLVector3d global_pos = gAgent.getPositionGlobal(); + LLVector3d region_origin = regionp->getOriginGlobal(); + // -1 otherwise slurl will fmod 256 to 0. + // And valid slurl range is supposed to be 0..255 + F64 max_val = REGION_WIDTH_METERS - 1; + global_pos.mdV[VX] = llclamp(global_pos[VX], region_origin[VX], region_origin[VX] + max_val); + global_pos.mdV[VY] = llclamp(global_pos[VY], region_origin[VY], region_origin[VY] + max_val); + + return_slurl = LLSLURL(regionp->getName(), global_pos); } slurl = return_slurl; } -- cgit v1.2.3 From 5bfe93b4ea6ed1d402fca3e40fba9ede8b45864f Mon Sep 17 00:00:00 2001 From: akleshchev <117672381+akleshchev@users.noreply.github.com> Date: Sun, 11 Dec 2022 19:08:48 +0200 Subject: SL-18159 Windows' mouse from keyboard emulation causes pointer to jump around the screen. Emulated mouse was trigering "not a valid zoomable object" case and jumping to garbage mMouseDownX/Y due to 'up' event being too early. --- indra/newview/llagentcamera.h | 1 - indra/newview/lltoolfocus.cpp | 78 +++++++++++++++++++++++++------------------ indra/newview/lltoolfocus.h | 1 + 3 files changed, 46 insertions(+), 34 deletions(-) diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h index 89680f95dc..4d005ef024 100644 --- a/indra/newview/llagentcamera.h +++ b/indra/newview/llagentcamera.h @@ -167,7 +167,6 @@ private: // Follow //-------------------------------------------------------------------- public: - void setUsingFollowCam(bool using_follow_cam); bool isfollowCamLocked(); private: LLFollowCam mFollowCam; // Ventrella diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp index 07f46c5fbe..4e94895a3e 100644 --- a/indra/newview/lltoolfocus.cpp +++ b/indra/newview/lltoolfocus.cpp @@ -75,6 +75,7 @@ LLToolCamera::LLToolCamera() mOutsideSlopX(FALSE), mOutsideSlopY(FALSE), mValidClickPoint(FALSE), + mClickPickPending(false), mValidSelection(FALSE), mMouseSteering(FALSE), mMouseUpX(0), @@ -127,6 +128,11 @@ BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask) mValidClickPoint = FALSE; + // Sometimes Windows issues down and up events near simultaneously + // without giving async pick a chance to trigged + // Ex: mouse from numlock emulation + mClickPickPending = true; + // If mouse capture gets ripped away, claim we moused up // at the point we moused down. JC mMouseUpX = x; @@ -142,13 +148,15 @@ BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask) void LLToolCamera::pickCallback(const LLPickInfo& pick_info) { - if (!LLToolCamera::getInstance()->hasMouseCapture()) + LLToolCamera* camera = LLToolCamera::getInstance(); + if (!camera->mClickPickPending) { return; } + camera->mClickPickPending = false; - LLToolCamera::getInstance()->mMouseDownX = pick_info.mMousePt.mX; - LLToolCamera::getInstance()->mMouseDownY = pick_info.mMousePt.mY; + camera->mMouseDownX = pick_info.mMousePt.mX; + camera->mMouseDownY = pick_info.mMousePt.mY; gViewerWindow->moveCursorToCenter(); @@ -158,7 +166,7 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info) // Check for hit the sky, or some other invalid point if (!hit_obj && pick_info.mPosGlobal.isExactlyZero()) { - LLToolCamera::getInstance()->mValidClickPoint = FALSE; + camera->mValidClickPoint = FALSE; return; } @@ -168,7 +176,7 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info) LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); if (!selection->getObjectCount() || selection->getSelectType() != SELECT_TYPE_HUD) { - LLToolCamera::getInstance()->mValidClickPoint = FALSE; + camera->mValidClickPoint = FALSE; return; } } @@ -192,7 +200,7 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info) if( !good_customize_avatar_hit ) { - LLToolCamera::getInstance()->mValidClickPoint = FALSE; + camera->mValidClickPoint = FALSE; return; } @@ -237,7 +245,7 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info) } - LLToolCamera::getInstance()->mValidClickPoint = TRUE; + camera->mValidClickPoint = TRUE; if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() ) { @@ -284,32 +292,36 @@ BOOL LLToolCamera::handleMouseUp(S32 x, S32 y, MASK mask) if (hasMouseCapture()) { - if (mValidClickPoint) - { - if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() ) - { - LLCoordGL mouse_pos; - LLVector3 focus_pos = gAgent.getPosAgentFromGlobal(gAgentCamera.getFocusGlobal()); - BOOL success = LLViewerCamera::getInstance()->projectPosAgentToScreen(focus_pos, mouse_pos); - if (success) - { - LLUI::getInstance()->setMousePositionScreen(mouse_pos.mX, mouse_pos.mY); - } - } - else if (mMouseSteering) - { - LLUI::getInstance()->setMousePositionScreen(mMouseDownX, mMouseDownY); - } - else - { - gViewerWindow->moveCursorToCenter(); - } - } - else - { - // not a valid zoomable object - LLUI::getInstance()->setMousePositionScreen(mMouseDownX, mMouseDownY); - } + // Do not move camera if we haven't gotten a pick + if (!mClickPickPending) + { + if (mValidClickPoint) + { + if (CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode()) + { + LLCoordGL mouse_pos; + LLVector3 focus_pos = gAgent.getPosAgentFromGlobal(gAgentCamera.getFocusGlobal()); + BOOL success = LLViewerCamera::getInstance()->projectPosAgentToScreen(focus_pos, mouse_pos); + if (success) + { + LLUI::getInstance()->setMousePositionScreen(mouse_pos.mX, mouse_pos.mY); + } + } + else if (mMouseSteering) + { + LLUI::getInstance()->setMousePositionScreen(mMouseDownX, mMouseDownY); + } + else + { + gViewerWindow->moveCursorToCenter(); + } + } + else + { + // not a valid zoomable object + LLUI::getInstance()->setMousePositionScreen(mMouseDownX, mMouseDownY); + } + } // calls releaseMouse() internally setMouseCapture(FALSE); diff --git a/indra/newview/lltoolfocus.h b/indra/newview/lltoolfocus.h index cfc235b6c2..6615193318 100644 --- a/indra/newview/lltoolfocus.h +++ b/indra/newview/lltoolfocus.h @@ -65,6 +65,7 @@ protected: BOOL mOutsideSlopX; BOOL mOutsideSlopY; BOOL mValidClickPoint; + bool mClickPickPending; BOOL mValidSelection; BOOL mMouseSteering; S32 mMouseUpX; // needed for releaseMouse() -- cgit v1.2.3 From da373e66cbcab3bd0a09566a6a36682188cb7876 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Tue, 13 Dec 2022 18:10:26 +0200 Subject: mac build fix - remove unused variables --- indra/newview/llagentcamera.cpp | 2 -- indra/newview/llagentcamera.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 8d2e3905d1..ecaa2cb316 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -133,7 +133,6 @@ LLAgentCamera::LLAgentCamera() : mCameraFOVZoomFactor(0.f), mCameraCurrentFOVZoomFactor(0.f), mCameraFocusOffset(), - mCameraFOVDefault(DEFAULT_FIELD_OF_VIEW), mCameraCollidePlane(), @@ -155,7 +154,6 @@ LLAgentCamera::LLAgentCamera() : mFocusObject(NULL), mFocusObjectDist(0.f), mFocusObjectOffset(), - mFocusDotRadius( 0.1f ), // meters mTrackFocusObject(TRUE), mAtKey(0), // Either 1, 0, or -1... indicates that movement-key is pressed diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h index 4d005ef024..d27cdb0c5c 100644 --- a/indra/newview/llagentcamera.h +++ b/indra/newview/llagentcamera.h @@ -152,7 +152,6 @@ private: F32 mTargetCameraDistance; // Target camera offset from avatar F32 mCameraFOVZoomFactor; // Amount of fov zoom applied to camera when zeroing in on an object F32 mCameraCurrentFOVZoomFactor; // Interpolated fov zoom - F32 mCameraFOVDefault; // Default field of view that is basis for FOV zoom effect LLVector4 mCameraCollidePlane; // Colliding plane for camera F32 mCameraZoomFraction; // Mousewheel driven fraction of zoom LLVector3 mCameraPositionAgent; // Camera position in agent coordinates @@ -232,7 +231,6 @@ private: LLPointer mFocusObject; F32 mFocusObjectDist; LLVector3 mFocusObjectOffset; - F32 mFocusDotRadius; // Meters BOOL mTrackFocusObject; //-------------------------------------------------------------------- -- cgit v1.2.3 From efb96d8c6e47e2ccc2dd608984205c083577dd2f Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 14 Dec 2022 15:36:24 +0200 Subject: SL-18786 Display updater on the top of other windows --- autobuild.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 25d95a6849..f94aedc090 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2671,9 +2671,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 1dda5fb3bb649b0ab5a93f22df7cb11e + 9e1b5515ab59b4e9cfeef6626d65d03d url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/96998/862110/viewer_manager-3.0.569958-darwin64-569958.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/108609/945996/viewer_manager-3.0.577252-darwin64-577252.tar.bz2 name darwin64 @@ -2683,9 +2683,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 30d1386d0a6883d898fc56757a789b8b + a3c599595ecc8fb987a5499fca42520a url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/97002/862130/viewer_manager-3.0.569958-windows-569958.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/108610/946003/viewer_manager-3.0.577252-windows-577252.tar.bz2 name windows @@ -2696,7 +2696,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors source_type hg version - 3.0.569958 + 3.0.577252 vlc-bin -- cgit v1.2.3 From 200e185dff108605f0dde45c42b3d827b7a9f0b4 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 16 Dec 2022 17:27:38 +0200 Subject: SL-18857 FIXED Editing attachment before Shape can stop av turning for user --- indra/newview/llagentcamera.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index ecaa2cb316..77131efd75 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -2359,6 +2359,11 @@ void LLAgentCamera::changeCameraToCustomizeAvatar() gAgent.standUp(); // force stand up gViewerWindow->getWindow()->resetBusyCount(); + if (LLSelectMgr::getInstance()->getSelection()->isAttachment()) + { + LLSelectMgr::getInstance()->deselectAll(); + } + if (gFaceEditToolset) { LLToolMgr::getInstance()->setCurrentToolset(gFaceEditToolset); -- cgit v1.2.3 From 7196c8c2edeeb01ef4ffb839f7731a99df888bd1 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 22 Dec 2022 02:16:10 +0200 Subject: SL-17659 Reset button for user profile --- indra/newview/llfloaterdisplayname.cpp | 16 ++++++++++++++++ .../skins/default/xui/en/floater_display_name.xml | 20 +++++++++++++++----- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/indra/newview/llfloaterdisplayname.cpp b/indra/newview/llfloaterdisplayname.cpp index 3b0c67415a..19bc865d8b 100644 --- a/indra/newview/llfloaterdisplayname.cpp +++ b/indra/newview/llfloaterdisplayname.cpp @@ -47,6 +47,7 @@ public: virtual ~LLFloaterDisplayName() { } /*virtual*/ BOOL postBuild(); void onSave(); + void onReset(); void onCancel(); /*virtual*/ void onOpen(const LLSD& key); @@ -101,6 +102,7 @@ void LLFloaterDisplayName::onOpen(const LLSD& key) BOOL LLFloaterDisplayName::postBuild() { + getChild("reset_btn")->setCommitCallback(boost::bind(&LLFloaterDisplayName::onReset, this)); getChild("cancel_btn")->setCommitCallback(boost::bind(&LLFloaterDisplayName::onCancel, this)); getChild("save_btn")->setCommitCallback(boost::bind(&LLFloaterDisplayName::onSave, this)); @@ -156,6 +158,20 @@ void LLFloaterDisplayName::onCancel() setVisible(false); } +void LLFloaterDisplayName::onReset() +{ + LLAvatarName av_name; + if (!LLAvatarNameCache::get(gAgent.getID(), &av_name)) + { + return; + } + getChild("display_name_editor")->setValue(av_name.getCompleteName()); + + getChild("display_name_confirm")->clear(); + getChild("display_name_confirm")->setFocus(TRUE); +} + + void LLFloaterDisplayName::onSave() { std::string display_name_utf8 = getChild("display_name_editor")->getValue().asString(); diff --git a/indra/newview/skins/default/xui/en/floater_display_name.xml b/indra/newview/skins/default/xui/en/floater_display_name.xml index 3c8f415860..f3431da858 100644 --- a/indra/newview/skins/default/xui/en/floater_display_name.xml +++ b/indra/newview/skins/default/xui/en/floater_display_name.xml @@ -56,7 +56,7 @@ max_length_chars="31" height="20" top_pad="5" - left="50" /> + left_delta="0" /> + left_delta="0" /> +