build: separate version from the rest of the configuration data

This should make sure that we always have 'config.h' available and
should fix issues with flatpak build as seen in #257:

`fatal error: config.h: No such file or directory`
This commit is contained in:
Evangelos Ribeiro Tzaras
2021-04-16 18:15:59 +02:00
parent d7df1a4931
commit 70f1df7e0e
4 changed files with 10 additions and 6 deletions

View File

@@ -109,20 +109,21 @@ calls_sources = files(['calls-message-source.c', 'calls-message-source.h',
]) + wayland_sources + calls_generated_sources
calls_config_data = config_data
calls_config_data.set_quoted('VCS_TAG', '@VCS_TAG@')
calls_config_data.set10('WL_SCANNER_FOUND', wl_scanner.found())
config_h_in = configure_file(
output: 'config.h.in',
config_h = configure_file(
output: 'config.h',
configuration: calls_config_data
)
config_h = vcs_tag(
version_h = vcs_tag(
fallback: '',
input: config_h_in,
output: 'config.h',
input: 'version.h.in',
output: 'version.h',
)
calls_sources += [ version_h ]
executable (
'gnome-calls',
calls_sources, 'main.c',