|
25 | 25 |
|
26 | 26 | cmake_minimum_required(VERSION 3.10.0)
|
27 | 27 |
|
28 |
| -if(NOT CMAKE_BUILD_TYPE) |
29 |
| - set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug, Release, or MinSizeRel." FORCE) |
30 |
| - message(STATUS "CMAKE_BUILD_TYPE not set, defaulting to Release.") |
31 |
| -endif() |
32 |
| - |
33 |
| -project(flutter-pi LANGUAGES C CXX ASM VERSION "1.0.0") |
34 |
| - |
35 |
| -message(STATUS "Generator .............. ${CMAKE_GENERATOR}") |
36 |
| -message(STATUS "Build Type ............. ${CMAKE_BUILD_TYPE}") |
37 |
| - |
38 | 28 | # configure options
|
39 | 29 | option(BUILD_TEXT_INPUT_PLUGIN "Include the text input plugin in the finished binary. Enables text input (to flutter text fields, for example) via attached keyboards." ON)
|
40 | 30 | option(BUILD_RAW_KEYBOARD_PLUGIN "Include the raw keyboard plugin in the finished binary. Enables raw keycode listening in flutter via the flutter RawKeyboard interface." ON)
|
@@ -82,6 +72,22 @@ option(SENTRY_PLUGIN_BUNDLE_CRASHPAD_HANDLER "Bundle the crashpad_handler with t
|
82 | 72 |
|
83 | 73 | set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
84 | 74 |
|
| 75 | +if(NOT CMAKE_BUILD_TYPE) |
| 76 | + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug, Release, or MinSizeRel." FORCE) |
| 77 | + message(STATUS "CMAKE_BUILD_TYPE not set, defaulting to Release.") |
| 78 | +endif() |
| 79 | + |
| 80 | +if (BUILD_SENTRY_PLUGIN) |
| 81 | + set(flutterpi_languages C CXX ASM) |
| 82 | +else() |
| 83 | + set(flutterpi_languages C ASM) |
| 84 | +endif() |
| 85 | + |
| 86 | +project(flutter-pi LANGUAGES ${flutterpi_languages} VERSION "1.0.0") |
| 87 | + |
| 88 | +message(STATUS "Generator .............. ${CMAKE_GENERATOR}") |
| 89 | +message(STATUS "Build Type ............. ${CMAKE_BUILD_TYPE}") |
| 90 | + |
85 | 91 | include(CheckCCompilerFlag)
|
86 | 92 |
|
87 | 93 | # Those libraries we definitely need.
|
@@ -376,12 +382,7 @@ endif()
|
376 | 382 | # Sentry Plugin
|
377 | 383 | set(HAVE_BUNDLED_CRASHPAD_HANDLER OFF)
|
378 | 384 | if (BUILD_SENTRY_PLUGIN)
|
379 |
| - if (POLICY CMP0077) |
380 |
| - cmake_policy(SET CMP0077 NEW) |
381 |
| - set(SENTRY_PIC ${CMAKE_POSITION_INDEPENDENT_CODE}) |
382 |
| - else() |
383 |
| - set(SENTRY_PIC ${CMAKE_POSITION_INDEPENDENT_CODE} CACHE BOOL) |
384 |
| - endif() |
| 385 | + set(SENTRY_PIC ${CMAKE_POSITION_INDEPENDENT_CODE} CACHE BOOL "") |
385 | 386 | add_subdirectory(third_party/sentry-native)
|
386 | 387 |
|
387 | 388 | target_sources(flutterpi_module PRIVATE src/plugins/sentry/sentry.c)
|
|
0 commit comments