Minor fix for meson build

Use files function instead of constructing path with meson.current_source_dir()
dev
Lzu Tao 2018-11-28 02:47:04 +07:00
parent 386c9ab58a
commit f727808731
4 changed files with 10 additions and 6 deletions

View File

@ -16,7 +16,7 @@ contrib_gen_html_dir = join_paths(zstd_source_dir, 'contrib', 'gen_html')
gen_html_includes = include_directories(programs_dir,
library_dir,
library_common_dir,
contrib_gen_html_dir )
contrib_gen_html_dir)
gen_html = executable('gen_html',
join_paths(contrib_gen_html_dir, 'gen_html.cpp'),

View File

@ -52,10 +52,17 @@ enable_zlib = get_option('zlib_support')
enable_lzma = get_option('lzma_support')
# =============================================================================
# Getting project version from zstd.h
# Helper scripts for Meson
# =============================================================================
GetZstdLibraryVersion_py = files('GetZstdLibraryVersion.py')
CreateSymlink_py = files('CreateSymlink.py')
CopyFile_py = files('CopyFile.py')
# =============================================================================
# Getting project version from zstd.h
# =============================================================================
zstd_h_file = join_paths(library_dir, 'zstd.h')
r = run_command(python3, GetZstdLibraryVersion_py, zstd_h_file)
if r.returncode() == 0

View File

@ -9,7 +9,7 @@
# #############################################################################
option('multithread_support', type: 'boolean', value: true,
description: 'Enable multithreading when pthread is detected')
description: 'Enable multi-threading when pthread is detected')
option('legacy_support', type: 'string', value: '4',
description: 'Support any legacy format: true or false, or 7 to 1 for v0.7+ to v0.1+')
option('build_programs', type: 'boolean', value: true,

View File

@ -61,8 +61,6 @@ executable('zstd-frugal',
# Program symlinks
# =============================================================================
CreateSymlink_py = join_paths(meson.current_source_dir(), '..', 'CreateSymlink.py')
foreach f : [ 'zstdcat', 'unzstd' ]
custom_target(f,
output : f,
@ -89,7 +87,6 @@ endif
zstd_man1_dir = join_paths(zstd_mandir, 'man1')
zstd_1_file = join_paths(programs_dir, 'zstd.1')
CopyFile_py = join_paths(meson.current_source_dir(), '..', 'CopyFile.py')
custom_target('zstd.1',
output : 'zstd.1',