From 85525f529a1058c251c9b1ea7eb61efb7e2ad25f Mon Sep 17 00:00:00 2001 From: Holden Date: Wed, 15 May 2024 21:38:10 -0400 Subject: [PATCH] Linux: Build GStreamer --- .github/actions/gstreamer/action.yml | 2 +- .github/workflows/linux.yml | 9 +++++++-- cmake/GStreamer.cmake | 11 +++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/actions/gstreamer/action.yml b/.github/actions/gstreamer/action.yml index 7527b9c53a36..df94839b459f 100644 --- a/.github/actions/gstreamer/action.yml +++ b/.github/actions/gstreamer/action.yml @@ -4,7 +4,7 @@ inputs: gst_version: description: Version of GStreamer to Build required: true - default: 1.22.11 + default: 1.24.7 build_type: description: Build Type "release" or "debug" required: true diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index d117c4ec8d1f..695887a8097f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -102,8 +102,13 @@ jobs: modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors cache: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} - # - name: Build GStreamer - # uses: ./.github/actions/gstreamer + # - name: Install Gstreamer + # uses: blinemedical/setup-gstreamer@v1 + # with: + # version: ${{ env.GST_VERSION }} + + - name: Build GStreamer + uses: ./.github/actions/gstreamer - run: mkdir ${{ runner.temp }}/shadow_build_dir diff --git a/cmake/GStreamer.cmake b/cmake/GStreamer.cmake index 18503839f981..29ffb39b0384 100644 --- a/cmake/GStreamer.cmake +++ b/cmake/GStreamer.cmake @@ -1,3 +1,14 @@ +if(LINUX) + set(GST_FULL_STATIC ON) +endif() + +if(GST_FULL_STATIC) + find_package(PkgConfig) + pkg_check_modules(GST IMPORTED_TARGET gstreamer-full-1.0) + target_link_libraries(qmlglsink PUBLIC PkgConfig::GST) + return() +endif() + if(ANDROID) set(GST_STATIC_BUILD ON) else()