diff --git a/compositor/main.c b/compositor/main.c index ea35b276..4855cdbb 100644 --- a/compositor/main.c +++ b/compositor/main.c @@ -52,7 +52,7 @@ #include "../shared/helpers.h" #include "../shared/string-helpers.h" #include "git-version.h" -#include "version.h" +#include #include "weston.h" #include diff --git a/include/libweston/meson.build b/include/libweston/meson.build index 340cd255..8e8f8160 100644 --- a/include/libweston/meson.build +++ b/include/libweston/meson.build @@ -17,3 +17,15 @@ backend_wayland_h = files('backend-wayland.h') backend_x11_h = files('backend-x11.h') xwayland_api_h = files('xwayland-api.h') + +libweston_version_h = configuration_data() +libweston_version_h.set('WESTON_VERSION_MAJOR', version_weston_arr[0]) +libweston_version_h.set('WESTON_VERSION_MINOR', version_weston_arr[1]) +libweston_version_h.set('WESTON_VERSION_MICRO', version_weston_arr[2]) +libweston_version_h.set('WESTON_VERSION', version_weston) +version_h = configure_file( + input: 'version.h.in', + output: 'version.h', + configuration: libweston_version_h +) +install_headers(version_h, subdir: dir_include_libweston_install) diff --git a/libweston/version.h.in b/include/libweston/version.h.in similarity index 100% rename from libweston/version.h.in rename to include/libweston/version.h.in diff --git a/libweston/compositor.c b/libweston/compositor.c index faaf5b2a..6a7c4ced 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -68,7 +68,7 @@ #include "shared/string-helpers.h" #include "shared/timespec-util.h" #include "git-version.h" -#include "version.h" +#include #include #include "pixel-formats.h" diff --git a/meson.build b/meson.build index 7e4fc236..55190028 100644 --- a/meson.build +++ b/meson.build @@ -45,17 +45,6 @@ public_inc = include_directories('include') pkgconfig = import('pkgconfig') -libweston_version_h = configuration_data() -libweston_version_h.set('WESTON_VERSION_MAJOR', version_weston_arr[0]) -libweston_version_h.set('WESTON_VERSION_MINOR', version_weston_arr[1]) -libweston_version_h.set('WESTON_VERSION_MICRO', version_weston_arr[2]) -libweston_version_h.set('WESTON_VERSION', version_weston) -version_h = configure_file( - input: 'libweston/version.h.in', - output: 'version.h', - configuration: libweston_version_h -) -install_headers(version_h, subdir: dir_include_libweston) git_version_h = vcs_tag( input: 'libweston/git-version.h.meson', output: 'git-version.h',