mirror of https://github.com/PCSX2/pcsx2.git
linux/cmake: Allow libbacktrace to be disabled
This commit is contained in:
parent
47606400fa
commit
7e5016fdab
|
@ -23,6 +23,7 @@ if(UNIX AND NOT APPLE)
|
||||||
option(ENABLE_SETCAP "Enable networking capability for DEV9" OFF)
|
option(ENABLE_SETCAP "Enable networking capability for DEV9" OFF)
|
||||||
option(X11_API "Enable X11 support" ON)
|
option(X11_API "Enable X11 support" ON)
|
||||||
option(WAYLAND_API "Enable Wayland support" ON)
|
option(WAYLAND_API "Enable Wayland support" ON)
|
||||||
|
option(USE_BACKTRACE "Enable libbacktrace support" ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
|
|
|
@ -65,7 +65,10 @@ else()
|
||||||
find_package(Wayland REQUIRED Egl)
|
find_package(Wayland REQUIRED Egl)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(Libbacktrace REQUIRED)
|
if(USE_BACKTRACE)
|
||||||
|
find_package(Libbacktrace REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
pkg_check_modules(DBUS REQUIRED dbus-1)
|
pkg_check_modules(DBUS REQUIRED dbus-1)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -167,10 +167,13 @@ else()
|
||||||
)
|
)
|
||||||
target_link_libraries(common PRIVATE
|
target_link_libraries(common PRIVATE
|
||||||
${DBUS_LINK_LIBRARIES}
|
${DBUS_LINK_LIBRARIES}
|
||||||
libbacktrace::libbacktrace
|
|
||||||
X11::X11
|
X11::X11
|
||||||
X11::Xrandr
|
X11::Xrandr
|
||||||
)
|
)
|
||||||
|
if(USE_BACKTRACE)
|
||||||
|
target_compile_definitions(common PRIVATE "HAS_LIBBACKTRACE=1")
|
||||||
|
target_link_libraries(common PRIVATE libbacktrace::libbacktrace)
|
||||||
|
endif()
|
||||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||||
target_link_libraries(common PRIVATE cpuinfo)
|
target_link_libraries(common PRIVATE cpuinfo)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -176,7 +176,7 @@ void CrashHandler::WriteDumpForCaller()
|
||||||
WriteMinidumpAndCallstack(nullptr);
|
WriteMinidumpAndCallstack(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif !defined(__APPLE__)
|
#elif !defined(__APPLE__) && defined(HAS_LIBBACKTRACE)
|
||||||
|
|
||||||
#include "FileSystem.h"
|
#include "FileSystem.h"
|
||||||
|
|
||||||
|
@ -377,4 +377,4 @@ void CrashHandler::CrashSignalHandler(int signal, siginfo_t* siginfo, void* ctx)
|
||||||
std::abort();
|
std::abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue