From 8185df66b435a66cb2b20abb2898c7205a98837d Mon Sep 17 00:00:00 2001 From: taynpg Date: Sun, 29 Jun 2025 12:38:52 +0800 Subject: [PATCH] crashlib: cmake modify. --- crashelper/CMakeLists.txt | 3 +++ crashelper/include/crashelper.h | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/crashelper/CMakeLists.txt b/crashelper/CMakeLists.txt index 3ee3c47..ad690a0 100644 --- a/crashelper/CMakeLists.txt +++ b/crashelper/CMakeLists.txt @@ -23,6 +23,9 @@ add_library(crashelper STATIC ${CRASHELPER_SOURCES}) if(CMAKE_SYSTEM_NAME STREQUAL "Linux") target_link_libraries(crashelper PUBLIC pthread dl bfd Qt${QT_VERSION_MAJOR}::Core) target_compile_options(crashelper PUBLIC -g) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Android") +target_link_libraries(crashelper PUBLIC pthread dl bfd Qt${QT_VERSION_MAJOR}::Core) +target_compile_options(crashelper PUBLIC -g) elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") target_link_libraries(crashelper PRIVATE DbgHelp Qt${QT_VERSION_MAJOR}::Core) diff --git a/crashelper/include/crashelper.h b/crashelper/include/crashelper.h index 972fe1f..6180d9c 100644 --- a/crashelper/include/crashelper.h +++ b/crashelper/include/crashelper.h @@ -9,9 +9,11 @@ #endif #elif defined(__APPLE__) && defined(__MACH__) #define MAC_OS -#else // default linux +#elif defined(__linux__) || defined(__TERMUX__) || defined(TERMUX) || defined(__ANDROID__) #define LINUX_OS #define BACKWARD_HAS_BFD 1 +#else +#error "Unsupported OS" #endif #include "backward.hpp"