meson: generate version.h before install_headers (#3612)

Otherwise, meson install would not install version.h as a header in a
clean build.
This commit is contained in:
memchr 2023-10-18 23:09:06 +00:00 committed by GitHub
parent a0b675ec9e
commit d70cc88dab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View file

@ -69,14 +69,14 @@ if get_option('buildtype') == 'debug'
add_project_arguments('-DHYPRLAND_DEBUG', language: 'cpp') add_project_arguments('-DHYPRLAND_DEBUG', language: 'cpp')
endif endif
version_h = run_command('sh', '-c', 'scripts/generateVersion.sh')
globber = run_command('find', 'src', '-name', '*.h*', check: true) globber = run_command('find', 'src', '-name', '*.h*', check: true)
headers = globber.stdout().strip().split('\n') headers = globber.stdout().strip().split('\n')
foreach file : headers foreach file : headers
install_headers(file, subdir: 'hyprland', preserve_path: true) install_headers(file, subdir: 'hyprland', preserve_path: true)
endforeach endforeach
version_h = run_command('sh', '-c', 'scripts/generateVersion.sh')
subdir('protocols') subdir('protocols')
subdir('src') subdir('src')
subdir('hyprctl') subdir('hyprctl')

View file

@ -24,15 +24,15 @@ index 1d2c7f9f..c5ef4e67 100644
add_project_arguments('-DNO_XWAYLAND', language: 'cpp') add_project_arguments('-DNO_XWAYLAND', language: 'cpp')
endif endif
@@ -75,8 +62,6 @@ foreach file : headers @@ -69,8 +56,6 @@ if get_option('buildtype') == 'debug'
install_headers(file, subdir: 'hyprland', preserve_path: true) add_project_arguments('-DHYPRLAND_DEBUG', language: 'cpp')
endforeach endif
-version_h = run_command('sh', '-c', 'scripts/generateVersion.sh') -version_h = run_command('sh', '-c', 'scripts/generateVersion.sh')
- -
subdir('protocols') globber = run_command('find', 'src', '-name', '*.h*', check: true)
subdir('src') headers = globber.stdout().strip().split('\n')
subdir('hyprctl') foreach file : headers
diff --git a/src/meson.build b/src/meson.build diff --git a/src/meson.build b/src/meson.build
index 0af864b9..38723b8c 100644 index 0af864b9..38723b8c 100644
--- a/src/meson.build --- a/src/meson.build