diff options
Diffstat (limited to 'indra/newview')
26 files changed, 231 insertions, 475 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 7d78ec9e3c..ed495ed8b3 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -23,25 +23,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(LLMeshOptimizer) -include(LLMessage) include(LLPhysicsExtensions) -include(LLPlugin) include(LLPrimitive) -include(LLRender) -include(LLUI) -include(LLFileSystem) include(LLWindow) -include(LLXML) include(NDOF) include(NVAPI) include(OPENAL) @@ -52,64 +40,36 @@ include(TemplateCheck) include(ThreeJS) include(Tracy) include(UI) -include(UnixInstall) include(ViewerMiscLibs) include(ViewerManager) include(VisualLeakDetector) include(ZLIBNG) include(URIPARSER) +include(LLPrimitive) if (NOT HAVOK_TPV) # When using HAVOK_TPV, the library is precompiled, so no need for this - add_subdirectory(${LLPHYSICSEXTENSIONS_SRC_DIR} llphysicsextensions) -endif (NOT HAVOK_TPV) -if(FMODSTUDIO) - include_directories(${FMODSTUDIO_INCLUDE_DIR}) -endif(FMODSTUDIO) - -include_directories( - ${DBUSGLIB_INCLUDE_DIRS} - ${JSONCPP_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} - ${LLMESHOPTIMIZER_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} - ${TRACY_INCLUDE_DIR} - ) + # 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 ... -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ${LLXML_SYSTEM_INCLUDE_DIRS} - ${LLPHYSICSEXTENSIONS_INCLUDE_DIRS} - ) + add_subdirectory(${LLPHYSICSEXTENSIONS_SRC_DIR} llphysicsextensions) + + # Another hack that works with newer cmake versions: + cmake_policy( SET CMP0079 NEW) + if( TARGET llphysicsextensionsstub ) + target_link_libraries(llphysicsextensionsstub llcommon llmath) + 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) -if (USE_BUGSPLAT) - include_directories(AFTER - ${BUGSPLAT_INCLUDE_DIR} - ) -endif (USE_BUGSPLAT) set(viewer_SOURCE_FILES groupchatlistener.cpp @@ -1414,25 +1374,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_LIBRARIES} - ) - endif (USE_BUGSPLAT) - # Add resource files to the project. set(viewer_RESOURCE_FILES secondlife.icns @@ -1446,12 +1387,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) @@ -1466,12 +1402,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) @@ -1490,19 +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_source_files_properties(llviewerprecompiledheaders.cpp - PROPERTIES - COMPILE_FLAGS "/Ycllviewerprecompiledheaders.h" - ) - 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") @@ -1599,26 +1516,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) - -# see EXP-1765 - theory is opengl32.lib needs to be included before gdi32.lib (windows libs) - set(viewer_LIBRARIES - opengl32 - ${WINDOWS_LIBRARIES} - comdlg32 - dxguid - imm32 - kernel32 - odbc32 - odbccp32 - oleaut32 - shell32 - Vfw32 - wer - winspool - ) + list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES}) find_library(INTEL_MEMOPS_LIBRARY NAMES ll_intel_memops @@ -1628,8 +1526,10 @@ if (WINDOWS) ) mark_as_advanced(INTEL_MEMOPS_LIBRARY) + if (INTEL_MEMOPS_LIBRARY) - list(APPEND viewer_LIBRARIES ${INTEL_MEMOPS_LIBRARY}) + add_library( ll::intel_memops INTERFACE IMPORTED ) + target_link_libraries( ll::intel_memops ${INTEL_MEMOPS_LIBRARY} ) endif (INTEL_MEMOPS_LIBRARY) if (ADDRESS_SIZE EQUAL 64) @@ -1641,9 +1541,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 @@ -1722,9 +1619,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) @@ -1737,28 +1632,18 @@ if (WINDOWS) list(APPEND viewer_SOURCE_FILES ${viewer_INSTALLER_FILES}) endif (WINDOWS) -if (OPENAL) - set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_OPENAL") -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}") - 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}") -list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES}) + set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") +endif() -set_source_files_properties(${viewer_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) +list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES}) add_executable(${VIEWER_BINARY_NAME} WIN32 @@ -1766,17 +1651,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) @@ -1795,11 +1669,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 @@ -1818,67 +1688,51 @@ 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}/${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/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 - ${GOOGLE_PERF_TOOLS_SOURCE} + ${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 + ${AUTOBUILD_INSTALL_DIR}/ca-bundle.crt ${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 - ${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}/${CMAKE_CFG_INTDIR}/vivoxsdk.dll - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_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 (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}/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}/${CMAKE_CFG_INTDIR}/OpenAL32.dll - ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/alut.dll + ${SHARED_LIB_STAGING_DIR}/OpenAL32.dll + ${SHARED_LIB_STAGING_DIR}/alut.dll ) - endif (OPENAL) + endif () add_custom_command( OUTPUT ${CMAKE_CFG_INTDIR}/copy_touched.bat @@ -1889,16 +1743,16 @@ 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} + --buildtype=$<CONFIG> "--channel=${VIEWER_CHANNEL}" --configuration=${CMAKE_CFG_INTDIR} - --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} + --dest=${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,> --grid=${GRID} --source=${CMAKE_CURRENT_SOURCE_DIR} - --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/copy_touched.bat + --touch=${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/copy_touched.bat --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -1945,21 +1799,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=${FMODSTUDIO}" - "--openal=${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=$<CONFIG> + "--channel=${VIEWER_CHANNEL}" + --configuration=${CMAKE_CFG_INTDIR} + --dest=${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,> + --grid=${GRID} + --source=${CMAKE_CURRENT_SOURCE_DIR} + --touch=${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/touched.bat + --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -1968,8 +1822,7 @@ if (WINDOWS) ) add_custom_target(llpackage ALL DEPENDS - ${CMAKE_CFG_INTDIR}/touched.bat - windows-setup-build-all + ${CMAKE_CFG_INTDIR}/touched.bat ) # temporarily disable packaging of event_host until hg subrepos get # sorted out on the parabuild cluster... @@ -2018,61 +1871,38 @@ 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} - ${LLMESHOPTIMIZER_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 - ${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} - ${TRACY_LIBRARY} - ) + llaudio + llcharacter + llimage + llinventory + llmessage + llplugin + llprimitive + llrender + llui + llfilesystem + llwindow + llxml + llmath + llcorehttp + llcommon + llmeshoptimizer + ll::ndof + lllogin + llprimitive + llappearance + ${LLPHYSICSEXTENSIONS_LIBRARIES} + ll::bugsplat + ll::tracy + ) -if (USE_BUGSPLAT) - target_link_libraries(${VIEWER_BINARY_NAME} - ${BUGSPLAT_LIBRARIES} - ) -endif (USE_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() set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "Path to artwork files.") @@ -2084,14 +1914,13 @@ if (LINUX) set(COPY_INPUT_DEPENDENCIES ${VIEWER_BINARY_NAME} SLPlugin - media_plugin_gstreamer010 - media_plugin_libvlc + #media_plugin_gstreamer010 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 @@ -2101,8 +1930,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}" @@ -2129,8 +1958,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}" @@ -2188,7 +2017,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}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/${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") @@ -2207,10 +2036,10 @@ 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} + --buildtype=$<CONFIG> --bundleid=${MACOSX_BUNDLE_GUI_IDENTIFIER} "--channel=${VIEWER_CHANNEL}" --configuration=${CMAKE_CFG_INTDIR} @@ -2238,22 +2067,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=${FMODSTUDIO}" - "--openal=${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=$<CONFIG> + "--channel=${VIEWER_CHANNEL}" + --configuration=${CMAKE_CFG_INTDIR} + --dest=${VIEWER_APP_BUNDLE} + --grid=${GRID} + --source=${CMAKE_CURRENT_SOURCE_DIR} + --touch=${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/.${product}.bat + --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt + ${SIGNING_SETTING} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) @@ -2382,10 +2211,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( @@ -2394,17 +2228,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 @@ -2412,83 +2235,49 @@ 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} ) - ################################################## - # 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 - ${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} - ) + 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}" @@ -2504,7 +2293,6 @@ if (LL_TESTS) llviewernetwork.cpp ) - LL_ADD_INTEGRATION_TEST(llslurl "${llslurl_test_sources}" "${test_libs}" @@ -2527,15 +2315,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/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 <memory> class LLWearableHoldingPattern; class LLInventoryCallback; @@ -276,7 +277,7 @@ private: LLUUID mCOFImageID; - std::auto_ptr<LLOutfitUnLockTimer> mUnlockOutfitTimer; + std::unique_ptr<LLOutfitUnLockTimer> mUnlockOutfitTimer; // Set of temp attachment UUIDs that should be removed typedef std::set<LLUUID> doomed_temp_attachments_t; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 4f3e0b08e4..a7f213a034 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; @@ -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; 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 diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 70e8437190..cdce6f7156 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -878,8 +878,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/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 3669fb1eeb..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; @@ -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) diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index c075f7e8bd..16f251c9b3 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -892,8 +892,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 07d4dcae38..64f84cbe4f 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -657,13 +657,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/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<LLMultiGesture*, bool> +struct IsGesturePlaying { bool operator()(const LLMultiGesture* gesture) const { - return gesture->mPlaying ? true : false; + return bool(gesture->mPlaying); } }; diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index fab7ae8f1a..3ed75cb98e 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -4587,7 +4587,6 @@ void LLInventoryModel::FetchItemHttpHandler::processData(LLSD & content, LLCore: { gInventory.updateItem(*it); } - gInventory.notifyObservers(); gViewerWindow->getWindow()->decBusyCount(); } diff --git a/indra/newview/lllegacyatmospherics.cpp b/indra/newview/lllegacyatmospherics.cpp index ce4ec668f1..a34dafb19a 100644 --- a/indra/newview/lllegacyatmospherics.cpp +++ b/indra/newview/lllegacyatmospherics.cpp @@ -482,7 +482,6 @@ void LLAtmospherics::updateFog(const F32 distance, const LLVector3& tosun_in) { LLSettingsWater::ptr_t pwater = LLEnvironment::instance().getCurrentWater(); F32 depth = water_height - camera_height; - LLColor4 water_fog_color(pwater->getWaterFogColor()); // adjust the color based on depth. We're doing linear approximations diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index dd4ae4d201..5e9669b2ba 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/llsceneview.cpp b/indra/newview/llsceneview.cpp index e250f9bc7a..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; diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index d0da3387ec..8e8f2f4fe0 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); 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) 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 <memory> #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<LLToastLifeTimer> mTimer; + std::unique_ptr<LLToastLifeTimer> mTimer; F32 mToastLifetime; // in seconds F32 mToastFadingTime; // in seconds 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/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 diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index da3c860ddb..441648d4e9 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1156,6 +1156,7 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time) { LLViewerFetchedTexture* imagep = *iter3++; 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 f3affbeb33..51cf5f20c6 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -909,7 +909,6 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group) llassert(facep->getGeomCount() == 4); llassert(facep->getIndicesCount() == 6); - S32 idx = draw_vec.size()-1; BOOL fullbright = facep->isState(LLFace::FULLBRIGHT); 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/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp index 3cc82621c4..f2d7e4585a 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: diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index aa32ef04b2..05e3aa783f 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -762,13 +762,10 @@ void LLWorld::updateParticles() void LLWorld::renderPropertyLines() { - S32 region_count = 0; - for (region_list_t::iterator iter = mVisibleRegionList.begin(); iter != mVisibleRegionList.end(); ++iter) { LLViewerRegion* regionp = *iter; - region_count++; regionp->renderPropertyLines(); } } 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 <boost/scoped_ptr.hpp> #include <boost/range.hpp> // boost::begin(), boost::end() + +#ifdef LL_USESYSTEMLIBS +#include <xmlrpc.h> +#else #include <xmlrpc-epi/xmlrpc.h> +#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 5c56a1d34f..8d178dbbdc 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -44,7 +44,12 @@ #include "llviewercontrol.h" // Have to include these last to avoid queue redefinition! + +#ifdef LL_USESYSTEMLIBS +#include <xmlrpc.h> +#else #include <xmlrpc-epi/xmlrpc.h> +#endif #include "llappviewer.h" #include "lltrans.h" @@ -508,10 +513,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"); diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 59eb18b734..be5c9bfcc5 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) @@ -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", "") @@ -504,10 +504,10 @@ 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'])): # 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") @@ -603,7 +603,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") self.path_optional("vcruntime140_1.dll") @@ -909,7 +909,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( @@ -1040,7 +1040,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", ): |