Meson Improvements: Replaces use of add_project_arguments with executable()'s c_args option, providing a list of args that vary depending on the host OS. Also bumps minimum meson version from 0.48 to 0.50, to alleviate warnings about using features introduced in 0.50.
This commit is contained in:
parent
2c8c975075
commit
b850a926ba
14
meson.build
14
meson.build
@ -2,7 +2,7 @@ project(
|
||||
'bzip2',
|
||||
['c'],
|
||||
version : '1.0.7',
|
||||
meson_version : '>= 0.48.0',
|
||||
meson_version : '>= 0.50.0',
|
||||
default_options : ['c_std=c89', 'warning_level=1'],
|
||||
)
|
||||
|
||||
@ -64,13 +64,13 @@ add_project_arguments(cc.get_supported_arguments([
|
||||
|
||||
add_project_arguments('-D_GNU_SOURCE', language : 'c')
|
||||
|
||||
os_defines = []
|
||||
if host_machine.system() == 'windows'
|
||||
add_project_arguments('-D_WIN32', language : 'c')
|
||||
add_project_arguments('-DBZ_LCCWIN32', language : 'c')
|
||||
add_project_arguments('-DBZ_UNIX=0', language : 'c')
|
||||
os_defines += '-DBZ_LCCWIN32=1'
|
||||
os_defines += '-DBZ_UNIX=0'
|
||||
else
|
||||
add_project_arguments('-DBZ_UNIX', language : 'c')
|
||||
add_project_arguments('-DBZ_LCCWIN32=0', language : 'c')
|
||||
os_defines += '-DBZ_LCCWIN32=0'
|
||||
os_defines += '-DBZ_UNIX=1'
|
||||
endif
|
||||
|
||||
c_args = []
|
||||
@ -131,6 +131,7 @@ bzip2 = executable(
|
||||
['bzip2.c'],
|
||||
link_with : [libbzip2],
|
||||
install : true,
|
||||
c_args : os_defines,
|
||||
)
|
||||
|
||||
executable(
|
||||
@ -138,6 +139,7 @@ executable(
|
||||
['bzip2recover.c'],
|
||||
link_with : [libbzip2],
|
||||
install : true,
|
||||
c_args : os_defines,
|
||||
)
|
||||
|
||||
## Install wrapper scripts
|
||||
|
Loading…
Reference in New Issue
Block a user