diff --git a/handler/CMakeLists.txt b/handler/CMakeLists.txt index fb6a4616..2dadea96 100644 --- a/handler/CMakeLists.txt +++ b/handler/CMakeLists.txt @@ -44,6 +44,14 @@ if (ANDROID) ) endif (ANDROID) +# Used to implement a work-around for launching the Crashpad handler stored in an APK. +if (CRASHPAD_HANDLER_GENERATE_STATIC_LIB) + add_library(handlerlib STATIC ${CRASHPAD_HANDLER_LIBRARY_FILES}) + target_compile_features(handlerlib PUBLIC cxx_std_17) + target_link_libraries(handlerlib PRIVATE client tools compat snapshot minidump) + target_include_directories(handlerlib PUBLIC ..) +endif(CRASHPAD_HANDLER_GENERATE_STATIC_LIB) + add_executable(handler main.cc) target_sources(handler PRIVATE ${CRASHPAD_HANDLER_LIBRARY_FILES}) target_compile_features(handler PUBLIC cxx_std_17) @@ -73,4 +81,4 @@ if (ANDROID) ${CUSTOM_CRASHPAD_HANDLER_DESTINATION} ) endif (CUSTOM_CRASHPAD_HANDLER_DESTINATION) -endif (ANDROID) +endif (ANDROID) \ No newline at end of file