diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2022-05-26 14:56:43 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2022-05-26 15:01:12 +0100 |
commit | 4c465cdc4b3d2768468b8b18c8de12db760b7606 (patch) | |
tree | bb6523cced4bf03f44fb8621682926d412605196 | |
parent | 8fde444ffc359ed9824cb9ae1ece055d823c77fb (diff) | |
download | libnice-4c465cdc4b3d2768468b8b18c8de12db760b7606.tar.gz |
Fix NICE_CHECK_VERSION in public install
Install a nice-version.h so that the version defines
are available.
https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/232
-rw-r--r-- | meson.build | 9 | ||||
-rw-r--r-- | nice/meson.build | 2 | ||||
-rw-r--r-- | nice/nice.h | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/meson.build b/meson.build index a4a5d3a..609dc47 100644 --- a/meson.build +++ b/meson.build @@ -84,6 +84,15 @@ 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 648ed20..6916781 100644 --- a/nice/meson.build +++ b/nice/meson.build @@ -1,4 +1,4 @@ -nice_gen_sources = [] +nice_gen_sources = [nice_version_h] nice_link_args = [] # libnice.def diff --git a/nice/nice.h b/nice/nice.h index bb63129..4faf784 100644 --- a/nice/nice.h +++ b/nice/nice.h @@ -39,6 +39,8 @@ #ifndef _NICE_H #define _NICE_H +#include "nice-version.h" + #define NICE_CHECK_VERSION(major, minor, micro) \ (NICE_VERSION_MAJOR > (major) || \ (NICE_VERSION_MAJOR == (major) && NICE_VERSION_MINOR > (minor)) || \ |