From bd13a1404b0c6268b4c16908f7b7479a379e7bdb Mon Sep 17 00:00:00 2001 From: BlackAngelTV Date: Sat, 29 Aug 2026 20:34:37 +0200 Subject: [PATCH] build(flatpak): add plugin target building a runtime flatpak provider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduces the flatpak-provider-plugin module target, producing libflatpak-provider.so and copying it next to the executable so PluginManager can load it at runtime. Generated with Codebuff 🤖 Co-Authored-By: Codebuff --- CMakeLists.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c7ecc9..8098d8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,3 +93,20 @@ if(FWS_BUILD_EXAMPLE_PLUGIN) COMMAND ${CMAKE_COMMAND} -E copy $ $/plugins/) endif() + +# Flatpak provider plugin. Flatpak ships as an external plugin (not compiled +# into the binary): the produced .so is copied next to the executable and +# discovered at runtime by PluginManager, so it can be updated or removed +# independently of the core app. +add_library(flatpak-provider-plugin MODULE + plugins/flatpak-provider/flatpak-provider.cpp + plugins/flatpak-provider/flatpak-manager.cpp) +target_include_directories(flatpak-provider-plugin PRIVATE include plugins/flatpak-provider) +set_target_properties(flatpak-provider-plugin PROPERTIES + OUTPUT_NAME "flatpak-provider" + CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON) +add_custom_command(TARGET flatpak-provider-plugin POST_BUILD + COMMAND ${CMAKE_COMMAND} -E make_directory $/plugins + COMMAND ${CMAKE_COMMAND} -E copy $ + $/plugins/)