[totem/wip/hadess/glsink-preparation: 4/5] build: Add explicit gmodule and x11 dependencies




commit c89c70401e3e87df315061dc056344b5ed4a2997
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jan 26 12:09:19 2022 +0100

    build: Add explicit gmodule and x11 dependencies
    
    As used by the plugin system and XInitThreads() respectively.

 meson.build             | 7 +++++++
 src/backend/meson.build | 6 ++++--
 src/meson.build         | 4 ++--
 3 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index 8809463cb..802b51fd5 100644
--- a/meson.build
+++ b/meson.build
@@ -133,8 +133,15 @@ totem_plparser_req_version = '>= 3.26.5'
 
 glib_dep =  dependency('glib-2.0', version: glib_req_version)
 gobject_dep =  dependency('gobject-2.0', version: glib_req_version)
+gmodule_dep = dependency('gmodule-2.0', version: glib_req_version)
 gio_dep = dependency('gio-2.0', version: '>= 2.43.4')
 gtk_dep = dependency('gtk+-3.0', version: gtk_req_version)
+targets = gtk_dep.get_pkgconfig_variable('targets')
+if targets.split(' ').contains('x11')
+  x11_dep = dependency('x11')
+else
+  x11_dep = dependency('', required : false)
+endif
 hdy_dep = dependency('libhandy-1', version: hdy_req_version)
 gst_dep = dependency('gstreamer-1.0', version: gst_req_version)
 gst_tag_dep = dependency('gstreamer-tag-1.0', version: '>= 0.11.93')
diff --git a/src/backend/meson.build b/src/backend/meson.build
index 9bd9e468e..a9265c40c 100644
--- a/src/backend/meson.build
+++ b/src/backend/meson.build
@@ -73,7 +73,9 @@ libbacon_video_widget_deps = [
   m_dep,
   libtotem_gst_helpers_dep,
   libtotem_gst_pixbuf_helpers_dep,
-  libtotem_time_helpers_dep
+  libtotem_time_helpers_dep,
+  gtk_dep,
+  gmodule_dep,
 ]
 
 libbacon_video_widget_cflags = common_flags + warn_flags + [
@@ -101,7 +103,7 @@ executable(
   backend_test,
   backend_test + '.c',
   include_directories: libbacon_video_widget_incs,
-  dependencies: libbacon_video_widget_dep,
+  dependencies: [libbacon_video_widget_dep, x11_dep],
   c_args: libbacon_video_widget_cflags + [
     '-DLOGO_PATH="@0@"'.format(join_paths(totem_pkgdatadir, meson.project_name(), 'totem_logo.png')),
     '-DG_LOG_DOMAIN="@0@"'.format(backend_test)
diff --git a/src/meson.build b/src/meson.build
index 6e3a334bb..b74fc1a6c 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -53,9 +53,9 @@ totem_common_incs = [
 totem_common_deps = libbacon_video_widget_deps + python_deps + [
   glib_dep,
   gio_dep,
+  gmodule_dep,
   gtk_dep,
   hdy_dep,
-  dependency('gmodule-2.0'),
   totem_plparser_dep,
   gir_dep,
   peas_dep,
@@ -189,7 +189,7 @@ totem = executable(
   meson.project_name(),
   'totem.c',
   include_directories: totem_common_incs,
-  dependencies: libtotem_dep,
+  dependencies: [ libtotem_dep, x11_dep ],
   c_args: totem_common_cflags + [
     '-DG_LOG_DOMAIN="Totem"'
   ],


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]