[Spice-commits] meson.build server/meson.build

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 8 17:58:14 UTC 2020


 meson.build        |   19 -------------------
 server/meson.build |    6 ++++++
 2 files changed, 6 insertions(+), 19 deletions(-)

New commits:
commit f00224a0947fd9ecd8475d7df5d0da34462ce2e7
Author: James Le Cuirot <chewi at gentoo.org>
Date:   Mon Apr 6 22:44:26 2020 +0100

    build: Use Meson's pkgconfig module to generate the .pc file
    
    The existing .pc file had the wrong dependencies for Windows and was
    missing the optional private dependencies for static linking.
    
    Signed-off-by: James Le Cuirot <chewi at gentoo.org>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/meson.build b/meson.build
index 5ab0e716..a4278508 100644
--- a/meson.build
+++ b/meson.build
@@ -213,22 +213,3 @@ endif
 
 configure_file(output : 'config.h',
                configuration : spice_server_config_data)
-
-#
-# write spice-server.pc
-#
-spice_server_pc = configuration_data()
-spice_server_pc.set('prefix', get_option('prefix'))
-spice_server_pc.set('exec_prefix', '${prefix}')
-spice_server_pc.set('libdir', join_paths('${exec_prefix}', get_option('libdir')))
-spice_server_pc.set('includedir', join_paths('${prefix}', get_option('includedir')))
-spice_server_pc.set('VERSION', meson.project_version())
-spice_server_pc.set('SPICE_PROTOCOL_MIN_VER', spice_protocol_version)
-spice_server_requires += 'glib-2.0 @0@ gio-2.0 @0@ gobject-2.0 @0@ pixman-1 @1@ openssl'.format(glib_version_info, pixman_version)
-spice_server_pc.set('SPICE_REQUIRES', spice_server_requires)
-spice_server_pc.set('SPICE_NONPKGCONFIG_LIBS', '-pthread -lm -lrt')
-
-configure_file(input : 'spice-server.pc.in',
-               output : 'spice-server.pc',
-               install_dir : join_paths(get_option('libdir'), 'pkgconfig'),
-               configuration : spice_server_pc)
diff --git a/server/meson.build b/server/meson.build
index a3c43eb5..3b38b082 100644
--- a/server/meson.build
+++ b/server/meson.build
@@ -202,3 +202,9 @@ if get_option('tests')
   endif
   subdir('tests')
 endif
+
+pc = import('pkgconfig')
+pc.generate(spice_server_libs,
+            description : 'SPICE server library',
+            subdirs : 'spice-server',
+            requires : 'spice-protocol')


More information about the Spice-commits mailing list