Skip to content

Commit 84cf314

Browse files
committed
cmake: bundle crashpad_handler into flutter-pi executable instead of module
1 parent f3f2aba commit 84cf314

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

CMakeLists.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ pkg_check_modules(LIBUDEV REQUIRED IMPORTED_TARGET libudev)
9797
set(THREADS_PREFER_PTHREAD_FLAG ON)
9898
find_package(Threads REQUIRED)
9999

100+
add_executable(
101+
flutter-pi
102+
src/main.c
103+
)
104+
100105
add_library(
101106
flutterpi_module OBJECT
102107
src/flutter-pi.c
@@ -363,11 +368,11 @@ if (BUILD_SENTRY_PLUGIN)
363368
if (SENTRY_PLUGIN_BUNDLE_CRASHPAD_HANDLER)
364369
set(HAVE_BUNDLED_CRASHPAD_HANDLER ON)
365370

366-
target_sources(flutterpi_module PRIVATE src/crashpad_handler_trampoline.cc)
371+
target_sources(flutter-pi PRIVATE src/crashpad_handler_trampoline.cc)
367372
# link against the same libraries the crashpad_handler uses
368373

369374
get_target_property(handler_deps crashpad_handler INTERFACE_LINK_LIBRARIES)
370-
target_link_libraries(flutterpi_module PUBLIC ${handler_deps})
375+
target_link_libraries(flutter-pi PUBLIC ${handler_deps})
371376
endif()
372377
endif()
373378
message(STATUS "Sentry plugin: ${BUILD_SENTRY_PLUGIN}")
@@ -426,12 +431,8 @@ if (COMPILER_SUPPORTS_MACRO_PREFIX_MAP)
426431
endif()
427432

428433
# Actual flutter-pi executable.
429-
add_executable(
430-
flutter-pi
431-
src/main.c
432-
)
433434
target_link_libraries(
434-
flutter-pi
435+
flutter-pi PUBLIC
435436
flutterpi_module
436437
)
437438
install(TARGETS flutter-pi RUNTIME DESTINATION bin)

0 commit comments

Comments
 (0)