Modified Cmake and bootstrap to porperly support exclusion of Sentry.io
This commit is contained in:
parent
aad67cdad9
commit
493a9fa60d
2 changed files with 12 additions and 5 deletions
|
@ -195,7 +195,7 @@ option(ENABLE_DEMCONVERT "Set to ON to build the dem conversion tool (default)"
|
||||||
option(ENABLE_HID_INPUT "Set to ON to build HID-based input code" ${EVENT_INPUT_DEFAULT})
|
option(ENABLE_HID_INPUT "Set to ON to build HID-based input code" ${EVENT_INPUT_DEFAULT})
|
||||||
option(ENABLE_PLIB_JOYSTICK "Set to ON to enable legacy joystick code (default)" ON)
|
option(ENABLE_PLIB_JOYSTICK "Set to ON to enable legacy joystick code (default)" ON)
|
||||||
option(ENABLE_SWIFT "Set to ON to build the swift module" ON)
|
option(ENABLE_SWIFT "Set to ON to build the swift module" ON)
|
||||||
|
option(ENABLE_SENTRY "Set to ON to build the Sentry.io crash reporting" ON)
|
||||||
|
|
||||||
# Test-suite options.
|
# Test-suite options.
|
||||||
option(ENABLE_AUTOTESTING "Set to ON to execute the test suite after building the test_suite target (default)" ON)
|
option(ENABLE_AUTOTESTING "Set to ON to execute the test suite after building the test_suite target (default)" ON)
|
||||||
|
@ -275,6 +275,9 @@ find_package(OpenSceneGraph 3.6.0 REQUIRED
|
||||||
osgGA
|
osgGA
|
||||||
)
|
)
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
## Sentry.io setup
|
||||||
|
if (ENABLE_SENTRY)
|
||||||
find_package(sentry QUIET)
|
find_package(sentry QUIET)
|
||||||
|
|
||||||
set(sentry_api_key "https://b10d9504e71244a7a86ba6c93acf6412@o372956.ingest.sentry.io/5188535")
|
set(sentry_api_key "https://b10d9504e71244a7a86ba6c93acf6412@o372956.ingest.sentry.io/5188535")
|
||||||
|
@ -282,6 +285,7 @@ if (TARGET sentry::sentry)
|
||||||
message(STATUS "Sentry.io crash reporting enabled")
|
message(STATUS "Sentry.io crash reporting enabled")
|
||||||
set(HAVE_SENTRY 1)
|
set(HAVE_SENTRY 1)
|
||||||
endif()
|
endif()
|
||||||
|
endif (ENABLE_SENTRY)
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
## Sqlite3 setup
|
## Sqlite3 setup
|
||||||
|
|
|
@ -268,10 +268,13 @@ int main ( int argc, char **argv )
|
||||||
_bootstrap_OSInit = 0;
|
_bootstrap_OSInit = 0;
|
||||||
|
|
||||||
#if defined(HAVE_SENTRY)
|
#if defined(HAVE_SENTRY)
|
||||||
|
const bool noSentry = flightgear::Options::checkForArg(argc, argv, "disable-sentry");
|
||||||
|
if (!noSentry) {
|
||||||
std::cerr << "Will init sentry" << std::endl;
|
std::cerr << "Will init sentry" << std::endl;
|
||||||
flightgear::initSentry();
|
flightgear::initSentry();
|
||||||
std::cerr << "Did init sentry" << std::endl;
|
std::cerr << "Did init sentry" << std::endl;
|
||||||
#endif
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// if we're not using the normal crash-reported, install our
|
// if we're not using the normal crash-reported, install our
|
||||||
// custom segfault handler on Linux, in debug builds.
|
// custom segfault handler on Linux, in debug builds.
|
||||||
|
|
Loading…
Reference in a new issue