From 570fbd785634822f62f35a823bd143d2c30bcd85 Mon Sep 17 00:00:00 2001 From: Sunner Date: Fri, 24 Dec 2021 13:34:43 +0100 Subject: [PATCH] Add flatpak manifests and only check for OBS when builing plugin (#49) --- CMakeLists.txt | 8 +++--- ...oject.Studio.Plugin.VkCapture.metainfo.xml | 10 +++++++ ...com.obsproject.Studio.Plugin.VkCapture.yml | 27 +++++++++++++++++++ 3 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 dist/flatpak/com.obsproject.Studio.Plugin.VkCapture.metainfo.xml create mode 100644 dist/flatpak/com.obsproject.Studio.Plugin.VkCapture.yml diff --git a/CMakeLists.txt b/CMakeLists.txt index 43e3289..53ccb61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,10 +12,6 @@ pkg_check_modules(XCB xcb IMPORTED_TARGET) pkg_check_modules(XCB_XFIXES xcb-xfixes IMPORTED_TARGET) pkg_check_modules(WAYLAND_CLIENT wayland-client IMPORTED_TARGET) -if (NOT TARGET libobs) - find_package(LibObs REQUIRED) -endif() - if (VULKAN_FOUND AND NOT TARGET Vulkan::Vulkan) add_library(Vulkan::Vulkan UNKNOWN IMPORTED) set_target_properties(Vulkan::Vulkan PROPERTIES @@ -44,6 +40,10 @@ endif() set(CMAKE_C_STANDARD 11) if (BUILD_PLUGIN) + if (NOT TARGET libobs) + find_package(LibObs REQUIRED) + endif() + set(PLUGIN_SOURCES src/vkcapture.c) set(PLUGIN_LIBS libobs obs-frontend-api) if (HAVE_X11_XCB) diff --git a/dist/flatpak/com.obsproject.Studio.Plugin.VkCapture.metainfo.xml b/dist/flatpak/com.obsproject.Studio.Plugin.VkCapture.metainfo.xml new file mode 100644 index 0000000..94a1230 --- /dev/null +++ b/dist/flatpak/com.obsproject.Studio.Plugin.VkCapture.metainfo.xml @@ -0,0 +1,10 @@ + + + com.obsproject.Studio.Plugin.VkCapture + com.obsproject.Studio + OBS Vulkan/OpenGL Capture + OBS Linux Vulkan/OpenGL game capture + https://github.com/nowrep/obs-vkcapture + CC0-1.0 + GPL-2.0 + diff --git a/dist/flatpak/com.obsproject.Studio.Plugin.VkCapture.yml b/dist/flatpak/com.obsproject.Studio.Plugin.VkCapture.yml new file mode 100644 index 0000000..549a2c0 --- /dev/null +++ b/dist/flatpak/com.obsproject.Studio.Plugin.VkCapture.yml @@ -0,0 +1,27 @@ +id: com.obsproject.Studio.Plugin.VkCapture +branch: stable +runtime: com.obsproject.Studio +runtime-version: stable +sdk: org.kde.Sdk//5.15-21.08 +build-extension: true +separate-locales: false +appstream-compose: false +build-options: + prefix: /app/plugins/VkCapture +modules: + - name: VkCapture + buildsystem: cmake-ninja + config-opts: + - -DCMAKE_BUILD_TYPE=Release + - -DLIBOBS_INCLUDE_DIR=/app/include/obs + post-install: + - install -Dm644 --target-directory=${FLATPAK_DEST}/share/metainfo ${FLATPAK_ID}.metainfo.xml + - appstream-compose --basename=${FLATPAK_ID} --prefix=${FLATPAK_DEST} --origin=flatpak ${FLATPAK_ID} + cleanup: + - '/bin' + sources: + - type: git + url: https://github.com/nowrep/obs-vkcapture.git + tag: v1.1 + - type: file + path: com.obsproject.Studio.Plugin.VkCapture.metainfo.xml