CMakeLists.txt 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # The Flutter tooling requires that developers have a version of Visual Studio
  2. # installed that includes CMake 3.14 or later. You should not increase this
  3. # version, as doing so will cause the plugin to fail to compile for some
  4. # customers of the plugin.
  5. cmake_minimum_required(VERSION 3.14)
  6. # Project-level configuration.
  7. set(PROJECT_NAME "flowy_board")
  8. project(${PROJECT_NAME} LANGUAGES CXX)
  9. # This value is used when generating builds using this plugin, so it must
  10. # not be changed
  11. set(PLUGIN_NAME "flowy_board_plugin")
  12. # Any new source files that you add to the plugin should be added here.
  13. list(APPEND PLUGIN_SOURCES
  14. "flowy_board_plugin.cpp"
  15. "flowy_board_plugin.h"
  16. )
  17. # Define the plugin library target. Its name must not be changed (see comment
  18. # on PLUGIN_NAME above).
  19. add_library(${PLUGIN_NAME} SHARED
  20. "include/flowy_board/flowy_board_plugin_c_api.h"
  21. "flowy_board_plugin_c_api.cpp"
  22. ${PLUGIN_SOURCES}
  23. )
  24. # Apply a standard set of build settings that are configured in the
  25. # application-level CMakeLists.txt. This can be removed for plugins that want
  26. # full control over build settings.
  27. apply_standard_settings(${PLUGIN_NAME})
  28. # Symbols are hidden by default to reduce the chance of accidental conflicts
  29. # between plugins. This should not be removed; any symbols that should be
  30. # exported should be explicitly exported with the FLUTTER_PLUGIN_EXPORT macro.
  31. set_target_properties(${PLUGIN_NAME} PROPERTIES
  32. CXX_VISIBILITY_PRESET hidden)
  33. target_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL)
  34. # Source include directories and library dependencies. Add any plugin-specific
  35. # dependencies here.
  36. target_include_directories(${PLUGIN_NAME} INTERFACE
  37. "${CMAKE_CURRENT_SOURCE_DIR}/include")
  38. target_link_libraries(${PLUGIN_NAME} PRIVATE flutter flutter_wrapper_plugin)
  39. # List of absolute paths to libraries that should be bundled with the plugin.
  40. # This list could contain prebuilt libraries, or libraries created by an
  41. # external build triggered from this build file.
  42. set(flowy_board_bundled_libraries
  43. ""
  44. PARENT_SCOPE
  45. )