Commit 4c465cdc authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

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
parent 8fde444f
......@@ -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())
......
nice_gen_sources = []
nice_gen_sources = [nice_version_h]
nice_link_args = []
# libnice.def
......
......@@ -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)) || \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment