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