From 9b45f0661ebcf2c8a901b574c69ffb0560460d3a Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Tue, 27 Aug 2019 22:29:48 +0200 Subject: [PATCH] Add option to bundle gstreamer plugins on Linux --- CMakeLists.txt | 16 +++++++++++----- src/engine/gststartup.cpp | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 279d807f..f98223a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -347,14 +347,20 @@ optional_component(MOODBAR ON "Moodbar" DEPENDS "gstreamer" HAVE_GSTREAMER ) -if(APPLE) - option(USE_BUNDLE "Bundle macOS dependencies" OFF) +if(LINUX OR APPLE) + option(USE_BUNDLE "Bundle dependencies" OFF) elseif(WIN32) - option(USE_BUNDLE "Bundle Windows dependencies" ON) + option(USE_BUNDLE "Bundle dependencies" ON) endif() -if (APPLE AND USE_BUNDLE AND NOT USE_BUNDLE_DIR) + +if (USE_BUNDLE AND NOT USE_BUNDLE_DIR) +if(LINUX) + set(USE_BUNDLE_DIR "../plugins") +endif(LINUX) +if(APPLE) set(USE_BUNDLE_DIR "../PlugIns") -endif() +endif(APPLE) +endif(USE_BUNDLE AND NOT USE_BUNDLE_DIR) # Check that we have sqlite3 with FTS5 diff --git a/src/engine/gststartup.cpp b/src/engine/gststartup.cpp index ea676aac..4a4d23aa 100644 --- a/src/engine/gststartup.cpp +++ b/src/engine/gststartup.cpp @@ -66,7 +66,7 @@ void GstStartup::SetEnvironment() { // On Windows and macOS we bundle the gstreamer plugins with strawberry #ifdef USE_BUNDLE -#if defined(Q_OS_MACOS) +#if defined(Q_OS_LINUX) || defined(Q_OS_MACOS) scanner_path = QCoreApplication::applicationDirPath() + "/" + USE_BUNDLE_DIR + "/gst-plugin-scanner"; plugin_path = QCoreApplication::applicationDirPath() + "/" + USE_BUNDLE_DIR + "/gstreamer"; #elif defined(Q_OS_WIN32)