cmake_minimum_required(VERSION 3.13)
project(flutter_inappwebview_linux LANGUAGES CXX)

set(PLUGIN_NAME "flutter_inappwebview_linux_plugin")

add_library(${PLUGIN_NAME} SHARED
  "flutter_inappwebview_linux_plugin.cc"
)

apply_standard_settings(${PLUGIN_NAME})

set_target_properties(${PLUGIN_NAME} PROPERTIES
  CXX_VISIBILITY_PRESET hidden)

target_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL)

target_include_directories(${PLUGIN_NAME} INTERFACE
  "${CMAKE_CURRENT_SOURCE_DIR}/include")

target_link_libraries(${PLUGIN_NAME} PRIVATE flutter)

list(APPEND flutter_inappwebview_linux_bundled_libraries
  $<TARGET_FILE:${PLUGIN_NAME}>
)
