mirror of https://github.com/AxioDL/logvisor.git
Fix compiling breakpad_client on Linux
This commit is contained in:
parent
0e3fe3e766
commit
aac06c3465
|
@ -19,12 +19,22 @@ if ("${SENTRY_DSN}" STREQUAL "")
|
|||
message(STATUS "SENTRY_DSN not set, not enabling Sentry")
|
||||
target_compile_definitions(logvisor PUBLIC SENTRY_ENABLED=0)
|
||||
set(SENTRY_LIB "")
|
||||
set(BREAKPAD_CLIENT "")
|
||||
else()
|
||||
message(STATUS "Enabling Sentry integration")
|
||||
add_subdirectory(sentry)
|
||||
target_compile_definitions(logvisor PUBLIC SENTRY_ENABLED=1)
|
||||
target_compile_definitions(logvisor PRIVATE SENTRY_DSN="${SENTRY_DSN}")
|
||||
set(SENTRY_LIB sentry)
|
||||
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 ()
|
||||
endif ()
|
||||
|
||||
target_link_libraries(logvisor PUBLIC fmt ${SENTRY_LIB})
|
||||
|
@ -45,7 +55,7 @@ set(config_install_dir "lib/cmake/logvisor")
|
|||
|
||||
# Associate target with export
|
||||
install(
|
||||
TARGETS logvisor fmt ${SENTRY_LIB}
|
||||
TARGETS logvisor fmt ${SENTRY_LIB} ${BREAKPAD_CLIENT}
|
||||
EXPORT logvisorTargets
|
||||
ARCHIVE DESTINATION "lib"
|
||||
INCLUDES DESTINATION include # This sets the INTERFACE_INCLUDE_DIRECTORIES property of the target.
|
||||
|
|
Loading…
Reference in New Issue