mirror of
https://github.com/AxioDL/logvisor.git
synced 2025-12-08 13:15:09 +00:00
Compare commits
2 Commits
0e3fe3e766
...
fd343eb234
| Author | SHA1 | Date | |
|---|---|---|---|
| fd343eb234 | |||
| aac06c3465 |
@@ -19,13 +19,32 @@ if ("${SENTRY_DSN}" STREQUAL "")
|
|||||||
message(STATUS "SENTRY_DSN not set, not enabling Sentry")
|
message(STATUS "SENTRY_DSN not set, not enabling Sentry")
|
||||||
target_compile_definitions(logvisor PUBLIC SENTRY_ENABLED=0)
|
target_compile_definitions(logvisor PUBLIC SENTRY_ENABLED=0)
|
||||||
set(SENTRY_LIB "")
|
set(SENTRY_LIB "")
|
||||||
else()
|
set(BREAKPAD_CLIENT "")
|
||||||
|
else ()
|
||||||
message(STATUS "Enabling Sentry integration")
|
message(STATUS "Enabling Sentry integration")
|
||||||
add_subdirectory(sentry)
|
add_subdirectory(sentry)
|
||||||
target_compile_definitions(logvisor PUBLIC SENTRY_ENABLED=1)
|
target_compile_definitions(logvisor PUBLIC SENTRY_ENABLED=1)
|
||||||
target_compile_definitions(logvisor PRIVATE SENTRY_DSN="${SENTRY_DSN}")
|
target_compile_definitions(logvisor PRIVATE SENTRY_DSN="${SENTRY_DSN}")
|
||||||
set(SENTRY_LIB sentry)
|
set(SENTRY_LIB sentry)
|
||||||
endif()
|
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
set(BREAKPAD_CLIENT breakpad_client)
|
||||||
|
target_compile_options(breakpad_client PRIVATE "-Wno-implicit-fallthrough")
|
||||||
|
target_compile_options(sentry PRIVATE "-Wno-implicit-fallthrough")
|
||||||
|
set_property(TARGET breakpad_client PROPERTY CXX_STANDARD 17)
|
||||||
|
set_property(TARGET sentry PROPERTY CXX_STANDARD 17)
|
||||||
|
else ()
|
||||||
|
set(BREAKPAD_CLIENT "")
|
||||||
|
endif ()
|
||||||
|
if (MSVC)
|
||||||
|
target_compile_options(crashpad_client PRIVATE "/W0")
|
||||||
|
target_compile_options(crashpad_util PRIVATE "/W0")
|
||||||
|
target_compile_options(crashpad_snapshot PRIVATE "/W0")
|
||||||
|
target_compile_options(mini_chromium PRIVATE "/W0")
|
||||||
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
|
target_compile_options(crashpad_zlib PRIVATE "-mpclmul")
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(logvisor PUBLIC fmt ${SENTRY_LIB})
|
target_link_libraries(logvisor PUBLIC fmt ${SENTRY_LIB})
|
||||||
if(NX)
|
if(NX)
|
||||||
@@ -45,7 +64,7 @@ set(config_install_dir "lib/cmake/logvisor")
|
|||||||
|
|
||||||
# Associate target with export
|
# Associate target with export
|
||||||
install(
|
install(
|
||||||
TARGETS logvisor fmt ${SENTRY_LIB}
|
TARGETS logvisor fmt ${SENTRY_LIB} ${BREAKPAD_CLIENT}
|
||||||
EXPORT logvisorTargets
|
EXPORT logvisorTargets
|
||||||
ARCHIVE DESTINATION "lib"
|
ARCHIVE DESTINATION "lib"
|
||||||
INCLUDES DESTINATION include # This sets the INTERFACE_INCLUDE_DIRECTORIES property of the target.
|
INCLUDES DESTINATION include # This sets the INTERFACE_INCLUDE_DIRECTORIES property of the target.
|
||||||
|
|||||||
Reference in New Issue
Block a user