Skip to content

Commit

Permalink
Merge pull request #1049 from eli-schwartz/meson-warning-run_command
Browse files Browse the repository at this point in the history
meson: simplify version lookup and avoid deprecation warnings
  • Loading branch information
Cyan4973 committed Jan 29, 2022
2 parents 5cc3118 + e7e5dd8 commit b2256c0
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions contrib/meson/meson/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,8 @@ lz4_version = meson.project_version()

lz4_h_file = join_paths(meson.current_source_dir(), '../../../lib/lz4.h')
GetLz4LibraryVersion_py = find_program('GetLz4LibraryVersion.py', native : true)
r = run_command(GetLz4LibraryVersion_py, lz4_h_file)
if r.returncode() == 0
lz4_version = r.stdout().strip()
message('Project version is now: @0@'.format(lz4_version))
else
error('Cannot find project version in @0@'.format(lz4_h_file))
endif
lz4_version = run_command(GetLz4LibraryVersion_py, lz4_h_file, check: true).stdout().strip()
message('Project version is now: @0@'.format(lz4_version))

lz4_libversion = lz4_version

Expand Down

0 comments on commit b2256c0

Please sign in to comment.