# garage_updates on windows is no plugin code at all, only the stub. the
# pubspec says ffiPlugin so that flutter adds this folder to the host apps
# build, and what comes out is garage_stub.exe sat beside the app.
cmake_minimum_required(VERSION 3.14)

set(PROJECT_NAME "garage_updates")
project(${PROJECT_NAME} LANGUAGES CXX)

cmake_policy(VERSION 3.14...3.25)

# the host apps own icon, where flutter create puts it. an app that keeps it
# somewhere else sets GARAGE_STUB_ICON in its windows/CMakeLists.txt before
# generated_plugins.cmake is included
if(NOT GARAGE_STUB_ICON)
  set(GARAGE_STUB_ICON "${CMAKE_SOURCE_DIR}/runner/resources/app_icon.ico")
endif()

add_subdirectory("stub")


# flutter installs everything in this list next to the app exe. its meant for
# dlls but its install(FILES), so an exe goes along just the same
set(garage_updates_bundled_libraries
  "$<TARGET_FILE:garage_stub>"
  PARENT_SCOPE
)
