mirror of
https://github.com/facebook/zstd.git
synced 2025-01-25 17:11:30 +08:00
Merge pull request #3327 from eli-schwartz/meson-version-simplify
meson: get version up front
This commit is contained in:
commit
e873335ffe
@ -23,7 +23,9 @@ project('zstd',
|
||||
# so this isn't safe
|
||||
#'werror=true'
|
||||
],
|
||||
version: 'DUMMY',
|
||||
version: run_command(
|
||||
find_program('GetZstdLibraryVersion.py'), '../../lib/zstd.h',
|
||||
check: true).stdout().strip(),
|
||||
meson_version: '>=0.48.0')
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
@ -45,16 +47,6 @@ compiler_msvc = 'msvc'
|
||||
|
||||
zstd_version = meson.project_version()
|
||||
|
||||
zstd_h_file = join_paths(meson.current_source_dir(), '../../lib/zstd.h')
|
||||
GetZstdLibraryVersion_py = find_program('GetZstdLibraryVersion.py', native : true)
|
||||
r = run_command(GetZstdLibraryVersion_py, zstd_h_file)
|
||||
if r.returncode() == 0
|
||||
zstd_version = r.stdout().strip()
|
||||
message('Project version is now: @0@'.format(zstd_version))
|
||||
else
|
||||
error('Cannot find project version in @0@'.format(zstd_h_file))
|
||||
endif
|
||||
|
||||
zstd_libversion = zstd_version
|
||||
|
||||
# =============================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user