1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/259
From a34623e08e368d56fe6c7fcb7a1f87ea59ad5094 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Wed, 31 May 2023 18:34:11 +0530
Subject: [PATCH] meson: Generate nice-version.h in the right builddir
We want it in the `nice/` subdir so that it gets picked up correctly
during uninstalled builds, such as in the gstreamer monorepo.
The `NICE_CHECK_VERSION` macro was non-functional in the monorepo
because of this.
---
gst/meson.build | 3 +--
meson.build | 9 ---------
nice/meson.build | 12 +++++++++++-
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/gst/meson.build b/gst/meson.build
index 572c6abc..4ed4794f 100644
--- a/gst/meson.build
+++ b/gst/meson.build
@@ -12,8 +12,7 @@ libgstnice = library('gstnice',
gst_nice_sources,
c_args : gst_nice_args,
include_directories: nice_incs,
- dependencies: [nice_deps, gst_dep],
- link_with: libnice,
+ dependencies: [libnice_dep, gst_dep],
install_dir: gst_plugins_install_dir,
install: true)
plugins = [libgstnice]
diff --git a/meson.build b/meson.build
index 6a733b73..4faffb40 100644
--- a/meson.build
+++ b/meson.build
@@ -85,15 +85,6 @@ add_project_arguments('-D_GNU_SOURCE',
'-DNICE_VERSION_NANO=' + version_nano,
language: 'c')
-version_conf = configuration_data()
-version_conf.set('NICE_VERSION_MAJOR', version_major)
-version_conf.set('NICE_VERSION_MINOR', version_minor)
-version_conf.set('NICE_VERSION_MICRO', version_micro)
-version_conf.set('NICE_VERSION_NANO', version_nano)
-nice_version_h = configure_file(output: 'nice-version.h',
- install_dir: get_option('includedir') / 'nice',
- configuration: version_conf)
-
cdata = configuration_data()
cdata.set_quoted('PACKAGE_STRING', meson.project_name())
diff --git a/nice/meson.build b/nice/meson.build
index 6916781d..4f826d81 100644
--- a/nice/meson.build
+++ b/nice/meson.build
@@ -1,4 +1,3 @@
-nice_gen_sources = [nice_version_h]
nice_link_args = []
# libnice.def
@@ -31,9 +30,20 @@ libnice = library('nice',
link_depends: mapfile,
install: true)
+version_conf = configuration_data()
+version_conf.set('NICE_VERSION_MAJOR', version_major)
+version_conf.set('NICE_VERSION_MINOR', version_minor)
+version_conf.set('NICE_VERSION_MICRO', version_micro)
+version_conf.set('NICE_VERSION_NANO', version_nano)
+nice_version_h = configure_file(output: 'nice-version.h',
+ install_dir: get_option('includedir') / 'nice',
+ configuration: version_conf)
+
install_headers('nice.h', subdir: 'nice')
nice_include = include_directories('.')
+nice_gen_sources = [nice_version_h]
+
# introspection
build_gir = gir.found() and not get_option('introspection').disabled()
if build_gir
--
GitLab
|