From: Fred Morcos Date: Mon, 27 Nov 2023 12:34:05 +0000 (+0100) Subject: Meson: Minor refactor of platform detection X-Git-Tag: rec-5.1.0-alpha1~80^2~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20e0cda83701a2e5b77dda0ef8506ee5ca73a319;p=thirdparty%2Fpdns.git Meson: Minor refactor of platform detection --- diff --git a/meson/platform/meson.build b/meson/platform/meson.build index f972ea8461..ea2a123bc1 100644 --- a/meson/platform/meson.build +++ b/meson/platform/meson.build @@ -32,13 +32,13 @@ platform_deps = [] foreach platform: platforms name = platform['name'] + set_variable('have_' + name, system == name) + config_defines = 'config-defines' in platform ? platform['config-defines'] : [] cmdline_defines = 'cmdline-defines' in platform ? platform['cmdline-defines'] : [] libraries = 'libraries' in platform ? platform['libraries'] : [] if system == name - set_variable('have_' + name, true) - platform_defines = [] foreach define: config_defines define_name = define['name'] @@ -56,8 +56,6 @@ foreach platform: platforms endforeach summary('Platform Defines', platform_defines, section: 'System') - - break endif endforeach diff --git a/pdns/meson.build b/pdns/meson.build index 54146e2278..dd62220c1a 100644 --- a/pdns/meson.build +++ b/pdns/meson.build @@ -142,15 +142,15 @@ libpdns_bind_dnssec_schema = declare_dependency(sources: libpdns_bind_dnssec_sch conditional_sources = { 'sunos-devpollmplexer': { 'sources': ['devpollmplexer.cc', 'portsmplexer.cc'], - 'condition': get_variable('have_sunos', false), + 'condition': have_sunos, }, 'linux-epollmplexer': { 'sources': ['epollmplexer.cc'], - 'condition': get_variable('have_linux', false), + 'condition': have_linux, }, 'bsd-kqueuemplexer': { 'sources': ['kqueuemplexer.cc'], - 'condition': get_variable('have_openbsd', false) or get_variable('have_freebsd', false), + 'condition': have_openbsd or have_freebsd, }, 'ssqlite3': { 'sources': ['ssqlite3.cc'],