Skip to content

Commit

Permalink
meson: generate version.h before install_headers (#3612)
Browse files Browse the repository at this point in the history
Otherwise, meson install would not install version.h as a header in a
clean build.
  • Loading branch information
memchr authored Oct 18, 2023
1 parent a0b675e commit d70cc88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ if get_option('buildtype') == 'debug'
add_project_arguments('-DHYPRLAND_DEBUG', language: 'cpp')
endif

version_h = run_command('sh', '-c', 'scripts/generateVersion.sh')

globber = run_command('find', 'src', '-name', '*.h*', check: true)
headers = globber.stdout().strip().split('\n')
foreach file : headers
install_headers(file, subdir: 'hyprland', preserve_path: true)
endforeach

version_h = run_command('sh', '-c', 'scripts/generateVersion.sh')

subdir('protocols')
subdir('src')
subdir('hyprctl')
Expand Down
12 changes: 6 additions & 6 deletions nix/patches/meson-build.patch
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ index 1d2c7f9f..c5ef4e67 100644
add_project_arguments('-DNO_XWAYLAND', language: 'cpp')
endif

@@ -75,8 +62,6 @@ foreach file : headers
install_headers(file, subdir: 'hyprland', preserve_path: true)
endforeach
@@ -69,8 +56,6 @@ if get_option('buildtype') == 'debug'
add_project_arguments('-DHYPRLAND_DEBUG', language: 'cpp')
endif

-version_h = run_command('sh', '-c', 'scripts/generateVersion.sh')
-
subdir('protocols')
subdir('src')
subdir('hyprctl')
globber = run_command('find', 'src', '-name', '*.h*', check: true)
headers = globber.stdout().strip().split('\n')
foreach file : headers
diff --git a/src/meson.build b/src/meson.build
index 0af864b9..38723b8c 100644
--- a/src/meson.build
Expand Down

0 comments on commit d70cc88

Please sign in to comment.