X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fmeson.build;h=d2b76cbe108ddb4421091033213318c0b32a5ed1;hb=6049b67f1e1cf00da8e0e913b8adc81a7b16bb87;hp=af2410d06d7ebc32e94e8cd8425d3fe64cbbc6be;hpb=6075fb8c185d0461070a9f16288e9d3673708735;p=tinc diff --git a/src/meson.build b/src/meson.build index af2410d0..d2b76cbe 100644 --- a/src/meson.build +++ b/src/meson.build @@ -216,8 +216,10 @@ foreach type : check_types endif endforeach +src_getopt = [] if not cdata.has('HAVE_GETOPT_H') or not cc.has_function('getopt_long', prefix: have_prefix, args: cc_defs) - src_lib_common += ['getopt.c', 'getopt1.c'] + src_getopt = ['getopt.c', 'getopt1.c'] + src_lib_common += src_getopt endif if not opt_miniupnpc.disabled() @@ -403,7 +405,7 @@ exe_tincd = executable( exe_sptps_test = executable( 'sptps_test', - sources: 'sptps_test.c', + sources: [src_getopt, 'sptps_test.c'], dependencies: deps_lib_common, link_with: lib_common, implicit_include_directories: false, @@ -413,7 +415,7 @@ exe_sptps_test = executable( exe_sptps_keypair = executable( 'sptps_keypair', - sources: 'sptps_keypair.c', + sources: [src_getopt, 'sptps_keypair.c'], dependencies: deps_lib_common, link_with: lib_common, implicit_include_directories: false,