summaryrefslogtreecommitdiff
path: root/indra/cmake/bugsplat.cmake
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-03-30 00:25:16 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-03-30 00:25:16 +0300
commit5217e6bfb77d8f6e0d955415e9d0edea964908e8 (patch)
tree33b7436bd46a0807bcf21f3b97a3dc9af9849aa7 /indra/cmake/bugsplat.cmake
parentf6ba8306f0210289f12ccbfde3c43eb4dc3feaed (diff)
parentc7053a6928fd5eafdc935453742e92951ae4e0c1 (diff)
Merge branch 'main' into DRTVWR-577-maint-S
# Conflicts: # indra/cmake/CMakeLists.txt # indra/newview/skins/default/xui/es/floater_tools.xml
Diffstat (limited to 'indra/cmake/bugsplat.cmake')
-rw-r--r--indra/cmake/bugsplat.cmake40
1 files changed, 22 insertions, 18 deletions
diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake
index 4edc4c59cd..509981d72c 100644
--- a/indra/cmake/bugsplat.cmake
+++ b/indra/cmake/bugsplat.cmake
@@ -9,29 +9,33 @@ else (INSTALL_PROPRIETARY)
set(USE_BUGSPLAT OFF CACHE BOOL "Use the BugSplat crash reporting system")
endif (INSTALL_PROPRIETARY)
+include_guard()
+add_library( ll::bugsplat INTERFACE IMPORTED )
+
if (USE_BUGSPLAT)
- if (NOT USESYSTEMLIBS)
- include(Prebuilt)
- use_prebuilt_binary(bugsplat)
- if (WINDOWS)
- set(BUGSPLAT_LIBRARIES
+ include(Prebuilt)
+ use_prebuilt_binary(bugsplat)
+ if (WINDOWS)
+ target_link_libraries( ll::bugsplat INTERFACE
${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib
)
- elseif (DARWIN)
- find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED
+ 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}")
- 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)
+ target_link_libraries( ll::bugsplat INTERFACE
+ ${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(BUGSPLAT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/bugsplat)
- set(BUGSPLAT_DEFINE "LL_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)