The Webview Univeral Flutter package for Appeto SDK.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

45 lignes
1.6 KiB

  1. cmake_minimum_required(VERSION 3.14)
  2. set(PROJECT_NAME "webview_universal")
  3. project(${PROJECT_NAME} LANGUAGES CXX)
  4. # This value is used when generating builds using this plugin, so it must
  5. # not be changed
  6. set(PLUGIN_NAME "webview_universal_plugin")
  7. add_library(${PLUGIN_NAME} SHARED
  8. "webview_universal_plugin.cpp"
  9. "webview_window.h"
  10. "webview_window.cc"
  11. "strconv.h"
  12. "utils.h"
  13. "utils.cc"
  14. "flutter_view.h"
  15. "flutter_view.cc"
  16. "web_view.h"
  17. "web_view.cc"
  18. "message_channel_plugin.h"
  19. "message_channel_plugin.cc"
  20. "web_view_window_plugin.h"
  21. "web_view_window_plugin.cc"
  22. )
  23. apply_standard_settings(${PLUGIN_NAME})
  24. set_target_properties(${PLUGIN_NAME} PROPERTIES
  25. CXX_VISIBILITY_PRESET hidden)
  26. target_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL)
  27. target_include_directories(${PLUGIN_NAME} INTERFACE
  28. "${CMAKE_CURRENT_SOURCE_DIR}/include")
  29. target_link_libraries(${PLUGIN_NAME} PRIVATE flutter flutter_wrapper_plugin flutter_wrapper_app)
  30. add_library(Webview2 SHARED IMPORTED GLOBAL)
  31. SET_PROPERTY(TARGET Webview2 PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/libs/x64/Webview2Loader.dll)
  32. SET_PROPERTY(TARGET Webview2 PROPERTY IMPORTED_IMPLIB ${CMAKE_CURRENT_SOURCE_DIR}/libs/x64/Webview2Loader.dll.lib)
  33. target_link_libraries(${PLUGIN_NAME} PRIVATE Webview2 uxtheme)
  34. # List of absolute paths to libraries that should be bundled with the plugin
  35. set(webview_universal_bundled_libraries
  36. "$<TARGET_FILE:Webview2>"
  37. PARENT_SCOPE
  38. )