[gst-debugger] fix pkg-config file



commit 0fb05e74e41ce01aed35ffe2593a7a6c870783fc
Author: Marcin Kolny <marcin kolny gmail com>
Date:   Sun Oct 1 20:48:37 2017 +0100

    fix pkg-config file

 meson.build                             |   14 ++++++++------
 src/common/libgst-debugger-common.pc.in |   11 -----------
 src/common/libgstdebugger-common.pc.in  |   11 +++++++++++
 src/common/meson.build                  |   31 +++++++++++++++++++++++++++----
 src/debugserver/meson.build             |    2 +-
 src/gst-debugger/meson.build            |    2 +-
 6 files changed, 48 insertions(+), 23 deletions(-)
---
diff --git a/meson.build b/meson.build
index 7f2da0c..8a733f7 100644
--- a/meson.build
+++ b/meson.build
@@ -15,16 +15,18 @@ gst_apiversion = '1.0'
 gnome = import('gnome')
 
 # Dependencies
-glib_version = '>=2.41.1'
-gio_dep = dependency('gio-2.0', version : glib_version)
-gmoduledep = dependency('gmodule-2.0', version : glib_version)
-gobjectdep = dependency('gobject-2.0', version : glib_version)
-gst_dep = dependency('gstreamer-1.0', version : '>=1.8.0')
+glib_version = '2.41.1'
+protobuf_c_version = '1.1.1'
+gstreamer_version = '1.8.0'
+glib_dep_version = '>=@0@'.format(glib_version)
+gmoduledep = dependency('gmodule-2.0', version : glib_dep_version)
+gio_dep = dependency('gio-2.0', version : glib_dep_version)
+gst_dep = dependency('gstreamer-1.0', version : '>=@0@'.format(gstreamer_version))
 gstmm_dep = dependency('gstreamermm-1.0')
 gtkmm_dep = dependency('gtkmm-3.0', version : '>=3.14.0')
 x11_dep = dependency('x11')
 gvc_dep = dependency('libgvc', version : '>=2.38')
-libprotobuf_c_dep = dependency('libprotobuf-c', version : '>=1.1.1')
+libprotobuf_c_dep = dependency('libprotobuf-c', version : '>=@0@'.format(protobuf_c_version))
 protobuf_dep = dependency('protobuf', version : '>=2.6.1')
 boost_dep = dependency('boost', modules : ['filesystem', 'system'], version : '>=1.55')
 thread_dep = dependency('threads')
diff --git a/src/common/libgstdebugger-common.pc.in b/src/common/libgstdebugger-common.pc.in
new file mode 100644
index 0000000..2d7be97
--- /dev/null
+++ b/src/common/libgstdebugger-common.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/gstdebugger-@API_VERSION@
+
+Name: libgstdebugger-common
+Description: Common infrastructure for the GStreamer Remote Debugger gst-debugger and debugserver plugin
+Version: @VERSION@
+Requires: gstreamer-@GST_API_VERSION@ >= @GSTREAMER_VERSION@ libprotobuf-c >= @PROTOBUF_C_VERSION@ gio-2.0 
= @GIO_VERSION@
+Libs: -L${libdir} -lgst-debugger-common-@API_VERSION@
+Cflags: -I${includedir}
diff --git a/src/common/meson.build b/src/common/meson.build
index 5cf4d0a..5febaa3 100644
--- a/src/common/meson.build
+++ b/src/common/meson.build
@@ -25,19 +25,42 @@ gstdebugger_common_headers = [
     'serializer.h']
 
 gstdebugger_common_deps = [
-    gio_dep,
     gst_dep,
+    gio_dep,
     libprotobuf_c_dep]
 
-gstdebugger_common_lib = static_library(
-    'gstdebugger-common',
+gstdebugger_common_lib = shared_library(
+    'gstdebugger-common-@0@'.format(apiversion),
     gstdebugger_common_sources,
     generate_c_proto,
     protoc_c_gen_src,
     dependencies : gstdebugger_common_deps,
     install : true)
 
-install_headers(gstdebugger_common_headers, subdir : 'gstreamer-1.0/gst/debugger')
+pkgconf = configuration_data()
+
+pkgconf.set('prefix', get_option('prefix'))
+pkgconf.set('exec_prefix', '${prefix}')
+pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir')))
+pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
+pkgconf.set('GST_API_VERSION', gst_apiversion)
+pkgconf.set('GSTREAMER_VERSION', gstreamer_version)
+pkgconf.set('PROTOBUF_C_VERSION', protobuf_c_version)
+pkgconf.set('GIO_VERSION', glib_version)
+pkgconf.set('API_VERSION', apiversion)
+pkgconf.set('VERSION', meson.project_version())
+
+pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
+
+configure_file(
+    input : 'libgstdebugger-common.pc.in',
+    output : 'libgstdebugger-common-@0@.pc'.format(apiversion),
+    configuration : pkgconf,
+    install_dir : pkg_install_dir)
+
+install_headers(
+    gstdebugger_common_headers,
+    subdir : 'gstdebugger-@0@/gst/debugger'.format(apiversion))
 
 gstdebugger_common_dep = declare_dependency(
     link_with : gstdebugger_common_lib,
diff --git a/src/debugserver/meson.build b/src/debugserver/meson.build
index 21c0ca3..9bb2c79 100644
--- a/src/debugserver/meson.build
+++ b/src/debugserver/meson.build
@@ -10,7 +10,7 @@ gstdebugger_sources = [
     'gstdebugserverbuffer.c']
 
 gstdebugger = shared_library(
-    'gstdebugserver',
+    'gstdebugserver-@0@'.format(gst_apiversion),
     gstdebugger_sources,
     dependencies : gstdebugger_common_dep,
     install : true,
diff --git a/src/gst-debugger/meson.build b/src/gst-debugger/meson.build
index 46662d2..546c20e 100644
--- a/src/gst-debugger/meson.build
+++ b/src/gst-debugger/meson.build
@@ -93,7 +93,7 @@ gst_debugger_sources = [
     'addins/addins-interface.h',
     'addins/addins-notifier.h']
 
-exe_name = '@0@-@1@'.format('gst-debugger', apiversion)
+exe_name = '@0@-@1@'.format('gst-debugger', gst_apiversion)
 executable(
     exe_name,
     gst_debugger_sources,


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