Skip to content

Commit

Permalink
Add flatpak manifests and only check for OBS when builing plugin (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
SuNNjek authored Dec 24, 2021
1 parent 4e3ca51 commit 570fbd7
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
10 changes: 10 additions & 0 deletions dist/flatpak/com.obsproject.Studio.Plugin.VkCapture.metainfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="addon">
<id>com.obsproject.Studio.Plugin.VkCapture</id>
<extends>com.obsproject.Studio</extends>
<name>OBS Vulkan/OpenGL Capture</name>
<summary>OBS Linux Vulkan/OpenGL game capture</summary>
<url type="homepage">https://github.com/nowrep/obs-vkcapture</url>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0</project_license>
</component>
27 changes: 27 additions & 0 deletions dist/flatpak/com.obsproject.Studio.Plugin.VkCapture.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 570fbd7

Please sign in to comment.