X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=meson.build;h=155421986f3e08fbf616e9b9e28db1d22f840f63;hb=refs%2Fheads%2F1.1;hp=43ae9744ce599fa5604f4413aaac04ec1469c007;hpb=a0fbaf0889fda3788943baec80671ecc870a2925;p=tinc diff --git a/meson.build b/meson.build index 43ae9744..15542198 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('tinc', 'c', - version: run_command([find_program('python3'), 'version.py', 'short'], check: true).stdout(), + version: '1.1pre18', license: 'GPL-2.0-or-later', meson_version: '>=0.51', default_options: [ @@ -20,6 +20,7 @@ opt_lz4 = get_option('lz4') opt_lzo = get_option('lzo') opt_miniupnpc = get_option('miniupnpc') opt_readline = get_option('readline') +opt_sandbox = get_option('sandbox') opt_static = get_option('static') opt_systemd = get_option('systemd') opt_tests = get_option('tests') @@ -35,11 +36,15 @@ os_name = host_machine.system() cpu_family = host_machine.cpu_family() cc_name = cc.get_id() -python = find_program('python3') -if meson_version.version_compare('>=0.55') - python_path = python.full_path() +python = find_program('python3', required: false) +if python.found() + if meson_version.version_compare('>=0.55') + python_path = python.full_path() + else + python_path = python.path() + endif else - python_path = python.path() + python_path = '' endif cc_defs = ['-D_GNU_SOURCE'] @@ -52,7 +57,6 @@ ld_flags = [] if cc_name != 'msvc' cc_flags += [ - '-Qunused-arguments', '-Wbad-function-cast', '-Wduplicated-branches', '-Wduplicated-cond', @@ -155,13 +159,23 @@ if os_name == 'linux' and not opt_systemd.disabled() subdir('systemd') endif -run_target('reformat', command: [ - python, - '@SOURCE_ROOT@/lint.py', - '--fix', -]) +if python.found() + run_target('reformat', command: [ + python, + '@SOURCE_ROOT@/lint.py', + '--fix', + ]) + + run_target('lint', command: [ + python, + '@SOURCE_ROOT@/lint.py', + ]) +endif -run_target('lint', command: [ - python, - '@SOURCE_ROOT@/lint.py', -]) +if meson_version.version_compare('>=0.53') + summary({ + 'prefix': prefix, + 'sandbox': cdata.has('HAVE_SANDBOX'), + 'watchdog': cdata.has('HAVE_WATCHDOG'), + }, bool_yn: true, section: 'System') +endif