mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2025-12-20 06:30:04 +01:00
lib: add a version header
This commit is contained in:
parent
4879937620
commit
c8b11fad42
5 changed files with 20 additions and 4 deletions
|
|
@ -64,7 +64,7 @@ wp_lib_headers = files(
|
||||||
)
|
)
|
||||||
|
|
||||||
install_headers(wp_lib_headers,
|
install_headers(wp_lib_headers,
|
||||||
subdir : join_paths('wireplumber-' + wireplumber_api_version, 'wp')
|
install_dir : wireplumber_headers_dir
|
||||||
)
|
)
|
||||||
|
|
||||||
enums = gnome.mkenums_simple('wpenums',
|
enums = gnome.mkenums_simple('wpenums',
|
||||||
|
|
@ -72,14 +72,25 @@ enums = gnome.mkenums_simple('wpenums',
|
||||||
header_prefix: '#include "wp/defs.h"',
|
header_prefix: '#include "wp/defs.h"',
|
||||||
decorator: 'WP_API',
|
decorator: 'WP_API',
|
||||||
install_header: true,
|
install_header: true,
|
||||||
install_dir: join_paths(get_option('includedir'), 'wireplumber-' + wireplumber_api_version, 'wp'),
|
install_dir: wireplumber_headers_dir,
|
||||||
)
|
)
|
||||||
wpenums_h = enums[1]
|
wpenums_h = enums[1]
|
||||||
wpenums_c = enums[0]
|
wpenums_c = enums[0]
|
||||||
wp_gen_sources = [wpenums_h]
|
wp_gen_sources = [wpenums_h]
|
||||||
|
|
||||||
|
wpversion_data = configuration_data()
|
||||||
|
wpversion_data.set('version', meson.project_version())
|
||||||
|
wpversion_data.set('api_version', wireplumber_api_version)
|
||||||
|
wpversion = configure_file(
|
||||||
|
input : 'wpversion.h.in',
|
||||||
|
output : 'wpversion.h',
|
||||||
|
configuration : wpversion_data,
|
||||||
|
install_dir: wireplumber_headers_dir
|
||||||
|
)
|
||||||
|
wp_gen_sources += [wpversion]
|
||||||
|
|
||||||
wp_lib = library('wireplumber-' + wireplumber_api_version,
|
wp_lib = library('wireplumber-' + wireplumber_api_version,
|
||||||
wp_lib_sources, wpenums_c, wpenums_h,
|
wp_lib_sources, wpenums_c, wpenums_h, wpversion,
|
||||||
c_args : [
|
c_args : [
|
||||||
'-D_GNU_SOURCE',
|
'-D_GNU_SOURCE',
|
||||||
'-DG_LOG_USE_STRUCTURED',
|
'-DG_LOG_USE_STRUCTURED',
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ wp_init (WpInitFlags flags)
|
||||||
g_log_set_writer_func (wp_log_writer_default, NULL, NULL);
|
g_log_set_writer_func (wp_log_writer_default, NULL, NULL);
|
||||||
|
|
||||||
/* a dummy message, to initialize the logging system */
|
/* a dummy message, to initialize the logging system */
|
||||||
wp_info ("WirePlumber initializing");
|
wp_info ("WirePlumber " WIREPLUMBER_VERSION " initializing");
|
||||||
|
|
||||||
if (flags & WP_INIT_SET_PW_LOG && !g_getenv ("WIREPLUMBER_NO_PW_LOG")) {
|
if (flags & WP_INIT_SET_PW_LOG && !g_getenv ("WIREPLUMBER_NO_PW_LOG")) {
|
||||||
pw_log_level = lvl = wp_spa_log_get_instance ()->level;
|
pw_log_level = lvl = wp_spa_log_get_instance ()->level;
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@
|
||||||
#include "spa-type.h"
|
#include "spa-type.h"
|
||||||
#include "transition.h"
|
#include "transition.h"
|
||||||
#include "wpenums.h"
|
#include "wpenums.h"
|
||||||
|
#include "wpversion.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
|
||||||
2
lib/wp/wpversion.h.in
Normal file
2
lib/wp/wpversion.h.in
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
#define WIREPLUMBER_VERSION "@version@"
|
||||||
|
#define WIREPLUMBER_API_VERSION "@api_version@"
|
||||||
|
|
@ -12,6 +12,8 @@ project('wireplumber', ['c', 'cpp'],
|
||||||
wireplumber_api_version = '0.1'
|
wireplumber_api_version = '0.1'
|
||||||
wireplumber_so_version = '0'
|
wireplumber_so_version = '0'
|
||||||
|
|
||||||
|
wireplumber_headers_dir = join_paths(get_option('includedir'), 'wireplumber-' + wireplumber_api_version, 'wp')
|
||||||
|
|
||||||
if get_option('libdir').startswith('/')
|
if get_option('libdir').startswith('/')
|
||||||
wireplumber_module_dir = join_paths(get_option('libdir'), 'wireplumber-' + wireplumber_api_version)
|
wireplumber_module_dir = join_paths(get_option('libdir'), 'wireplumber-' + wireplumber_api_version)
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue