--- /dev/null
+int main() {
+ return 1;
+}
-if FUZZ_OPT != 'enabled'
+if not FUZZ_OPT.enabled()
subdir_done()
endif
f'-DKEA_LFC_SOURCES="@KEA_LFC@"',
f'-DKEA_LFC_INSTALLATION="@PREFIX@/sbin/kea-lfc"',
]
-if FUZZ_OPT == 'clusterfuzzlite'
+if FUZZING_WITH_CLUSTERFUZZLITE
cpp_flags = ['-fsanitize=fuzzer', '-gdwarf-4']
else
fuzz_sources += ['main.cc']
'fuzz_lib',
fuzz_sources,
cpp_args: cpp_flags,
- dependencies: [crypto, gtest],
+ dependencies: [CRYPTO_DEP, GTEST_DEP],
include_directories: includes,
link_with: LIBS_BUILT_SO_FAR,
)
'fuzz_config_kea_dhcp4.cc',
fuzz_sources,
cpp_args: cpp_flags,
- dependencies: [crypto, gtest],
+ dependencies: [CRYPTO_DEP, GTEST_DEP],
include_directories: includes,
link_with: [dhcp4_lib, fuzz_lib] + LIBS_BUILT_SO_FAR,
)
'fuzz_config_kea_dhcp6.cc',
fuzz_sources,
cpp_args: cpp_flags,
- dependencies: [crypto, gtest],
+ dependencies: [CRYPTO_DEP, GTEST_DEP],
include_directories: includes,
link_with: [dhcp6_lib, fuzz_lib] + LIBS_BUILT_SO_FAR,
)
'fuzz_http_endpoint_kea_dhcp4.cc',
fuzz_sources,
cpp_args: cpp_flags,
- dependencies: [crypto, gtest],
+ dependencies: [CRYPTO_DEP, GTEST_DEP],
include_directories: includes,
link_with: [dhcp4_lib, fuzz_lib] + LIBS_BUILT_SO_FAR,
)
'fuzz_http_endpoint_kea_dhcp6.cc',
fuzz_sources,
cpp_args: cpp_flags,
- dependencies: [crypto, gtest],
+ dependencies: [CRYPTO_DEP, GTEST_DEP],
include_directories: includes,
link_with: [dhcp6_lib, fuzz_lib] + LIBS_BUILT_SO_FAR,
)
'fuzz_packets_kea_dhcp4.cc',
fuzz_sources,
cpp_args: cpp_flags,
- dependencies: [crypto, gtest],
+ dependencies: [CRYPTO_DEP, GTEST_DEP],
include_directories: includes,
link_with: [dhcp4_lib, kea_dhcpsrv_lib, fuzz_lib] + LIBS_BUILT_SO_FAR,
)
'fuzz_packets_kea_dhcp6.cc',
fuzz_sources,
cpp_args: cpp_flags,
- dependencies: [crypto, gtest],
+ dependencies: [CRYPTO_DEP, GTEST_DEP],
include_directories: includes,
link_with: [dhcp6_lib, kea_dhcpsrv_lib, fuzz_lib] + LIBS_BUILT_SO_FAR,
)
'fuzz_unix_socket_kea_dhcp4.cc',
fuzz_sources,
cpp_args: cpp_flags,
- dependencies: [crypto, gtest],
+ dependencies: [CRYPTO_DEP, GTEST_DEP],
include_directories: includes,
link_with: [dhcp4_lib, kea_testutils_lib, fuzz_lib] + LIBS_BUILT_SO_FAR,
)
'fuzz_unix_socket_kea_dhcp6.cc',
fuzz_sources,
cpp_args: cpp_flags,
- dependencies: [crypto, gtest],
+ dependencies: [CRYPTO_DEP, GTEST_DEP],
include_directories: includes,
link_with: [dhcp6_lib, kea_testutils_lib, fuzz_lib] + LIBS_BUILT_SO_FAR,
)
#### Build Options
-all_opt = get_option('all')
crypto_opt = get_option('crypto')
-gtest_opt = get_option('gtest')
krb5_opt = get_option('krb5')
mysql_opt = get_option('mysql')
netconf_opt = get_option('netconf')
logger_checks_opt = get_option('logger-checks')
FUZZ_OPT = get_option('fuzz')
-PERFDHCP_OPT = get_option('perfdhcp')
SHELL_OPT = get_option('shell')
+TESTS_OPT = get_option('tests')
#### Configuration Data
{
# 'CONFIG_H_WAS_INCLUDED': true,
# 'ENABLE_DEBUG': false,
- # 'ENABLE_LOGGER_CHECKS': false,
'EXTENDED_VERSION': '"tarball"',
# 'HAS_UNDEFINED_PTHREAD_BEHAVIOR': false,
# 'HAVE_AFL': false,
# 'HAVE_LOG': false,
# 'HAVE_MYSQL_GET_OPTION': false,
# 'HAVE_MYSQL_OPT_RECONNECT': false,
- # 'HAVE_NETCONF': false,
# 'HAVE_OPTRESET': false,
# 'HAVE_PGSQL_SSL': false,
# 'HAVE_PGSQL_TCP_USER_TIMEOUT': false,
#### Dependencies
-boost = dependency('boost', version: '>=1.66')
-threads = dependency('threads')
-add_project_dependencies(boost, threads, language: ['cpp'])
-
-gtest = disabler()
-if gtest_opt == 'enabled'
- gtest = dependency('gtest', required: true)
-endif
+boost_dep = dependency('boost', version: '>=1.66')
+threads_dep = dependency('threads')
+add_project_dependencies(boost_dep, threads_dep, language: ['cpp'])
# Logging
-log4cplus = dependency('log4cplus', required: false)
-# TODO: leave only dependecy() when support for Ubuntu 20.04 gets removed.
-if not log4cplus.found()
- log4cplus = cpp.find_library('log4cplus', required: false)
-endif
-if not log4cplus.found()
- error('Dependency not found: log4cplus.')
-endif
+# TODO: remove fallback when support for Ubuntu 20.04 gets removed.
+LOG4CPLUS_DEP = dependency('log4cplus', fallback: ['log4cplus', 'log4cplus'])
# Cryptography
-crypto = disabler()
+CRYPTO_DEP = disabler()
botan = disabler()
foreach dep : ['botan-2', 'botan']
botan = dependency(dep, required: false)
openssl = dependency('openssl', required: false)
# Kerberos
-krb5 = disabler()
-krb5_config = find_program('krb5-config', required: false)
-if krb5_config.found()
- cflags = run_command([krb5_config, '--cflags', 'gssapi'], check: false)
- libs = run_command([krb5_config, '--libs', 'gssapi'], check: false)
- version = run_command([krb5_config, '--version'], check: false)
- if cflags.returncode() == 0 and libs.returncode() == 0 and version.returncode() == 0
- krb5_version = version.stdout().strip()
- krb5 = declare_dependency(
- compile_args: cflags.stdout().split(),
- link_args: libs.stdout().split(),
- version: krb5_version,
- )
- endif
-endif
-if not krb5.found()
- krb5 = dependency('krb5', required: false)
-endif
+KRB5_DEP = dependency(
+ 'krb5-gssapi',
+ fallback: ['krb5', 'krb5'],
+ required: krb5_opt,
+)
# MySQL
-mysql = dependency('mariadb', required: false)
-if not mysql.found()
- mysql = dependency('mysql', required: false)
-endif
-mysql_config = disabler()
-foreach mysql_config_file : ['mariadb_config', 'mysql_config']
- if mysql.found()
- continue
- endif
- mysql_config = find_program(mysql_config_file, required: false)
- if not mysql_config.found()
- continue
- endif
- cflags = run_command([mysql_config, '--cflags'], check: false)
- libs = run_command([mysql_config, '--libs'], check: false)
- version = run_command([mysql_config, '--version'], check: false)
-
- if cflags.returncode() == 0 and libs.returncode() == 0 and version.returncode() == 0
- mysql_compile_args = cflags.stdout().split()
- mysql_link_args = libs.stdout().split()
- mysql_version = version.stdout().strip()
- mysql = declare_dependency(
- compile_args: mysql_compile_args,
- link_args: mysql_link_args,
- version: mysql_version,
- )
- break
- endif
-endforeach
+MYSQL_DEP = dependency(
+ 'mariadb',
+ fallback: ['mysql', 'mysql'],
+ required: mysql_opt,
+)
# PostgreSQL
-postgresql = dependency('libpq', required: false)
-pg_config = disabler()
-if not postgresql.found()
- pg_config = find_program('pg_config', required: false)
-endif
-if pg_config.found()
- cflags = run_command([pg_config, '--cflags'], check: false)
- libs = run_command([pg_config, '--libs'], check: false)
- version = run_command([pg_config, '--version'], check: false)
- if cflags.returncode() == 0 and libs.returncode() == 0 and version.returncode() == 0
- pgsql_compile_args = cflags.stdout().split()
- pgsql_link_args = libs.stdout().split()
- pgsql_version = version.stdout().strip()
- postgresql = declare_dependency(
- compile_args: pgsql_compile_args,
- link_args: pgsql_link_args,
- version: pgsql_version,
- )
- endif
-endif
+POSTGRESQL_DEP = dependency(
+ 'libpq',
+ fallback: ['postgresql', 'postgresql'],
+ required: postgresql_opt,
+)
# NETCONF
-netconf_deps = {}
-NETCONF_DEPS_ARRAY = []
-NETCONF_DEPS_FOUND = true
-foreach dep : ['yang', 'yang-cpp', 'sysrepo', 'sysrepo-cpp']
- netconf_deps = netconf_deps + {dep: dependency(dep, required: false)}
- if netconf_deps[dep].found()
- continue
- endif
-
- # Try adding lib to it. libyang and libyang-cpp define the wrong pkg-config.
- netconf_deps = netconf_deps + {
- dep: dependency('lib' + dep, required: false),
- }
- if netconf_deps[dep].found()
- continue
- endif
+NETCONF_DEP = dependency(
+ 'yang,yang-cpp,sysrepo,sysrepo-cpp',
+ fallback: ['netconf', 'netconf'],
+ required: netconf_opt,
+)
+if netconf_opt.enabled() and NETCONF_DEP.get_variable('libyang_prefix', default_value: 'unknown') == 'unknown'
+ error('Dependency not found: NETCONF.')
+endif
- # Search in /opt.
- foreach prefix : ['', 'lib']
- path = f'/opt/@prefix@@dep@'
- lib = cpp.find_library(dep, dirs: [f'/@path@/lib'], required: false)
- if lib.found()
- netconf_deps = netconf_deps + {
- dep: declare_dependency(
- dependencies: [lib],
- include_directories: include_directories(f'/@path@/include'),
- variables: {'prefix': f'@path@'},
- ),
- }
- if SYSTEM == 'darwin'
- add_project_link_arguments(
- f'-Wl,-rpath,@path@/lib',
- language: 'cpp',
- )
- else
- add_project_link_arguments(
- f'-Wl,-rpath=@path@/lib',
- language: 'cpp',
- )
- endif
- endif
- endforeach
-endforeach
-foreach dep : ['yang', 'yang-cpp', 'sysrepo', 'sysrepo-cpp']
- if netconf_deps[dep].found()
- NETCONF_DEPS_ARRAY += netconf_deps[dep]
- else
- NETCONF_DEPS_FOUND = false
- endif
-endforeach
+GTEST_DEP = dependency(
+ 'gtest',
+ required: TESTS_OPT.enabled() or FUZZ_OPT.enabled(),
+)
# Kea shell
-if SHELL_OPT == 'enabled' and not PYTHON.found()
+if SHELL_OPT.enabled() and not PYTHON.found()
error('kea-shell requires python. Python not found.')
endif
# Crypto
if crypto_opt == 'botan'
if botan.found()
- crypto = botan
+ CRYPTO_DEP = botan
endif
elif crypto_opt == 'openssl'
if openssl.found()
- crypto = openssl
+ CRYPTO_DEP = openssl
endif
endif
-if crypto.name() == botan.name()
+if CRYPTO_DEP.name() == botan.name()
message('Checking Botan Boost support.')
cpp.has_header('botan/asio_stream.h', dependencies: [botan], required: true)
conf_data.set('WITH_BOTAN', true)
message('Using Botan.')
-elif crypto.name() == openssl.name()
+elif CRYPTO_DEP.name() == openssl.name()
conf_data.set('WITH_OPENSSL', true)
message('Using OpenSSL.')
else
error('Dependency not found: neither Botan nor OpenSSL.')
endif
-# All option.
-if all_opt.enabled()
- if krb5_opt == 'disabled'
- krb5 = disabler()
- elif not krb5.found()
- error('Dependency not found: Kerberos 5 with GSSAPI.')
- endif
- if mysql_opt == 'disabled'
- mysql = disabler()
- elif not mysql.found()
- error('Dependency not found: MySQL.')
- endif
- if netconf_opt == 'disabled'
- NETCONF_DEPS_FOUND = false
- elif not NETCONF_DEPS_FOUND
- error('Dependency not found: NETCONF.')
- endif
- if postgresql_opt == 'disabled'
- postgresql = disabler()
- elif not postgresql.found()
- error('Dependency not found: PostgreSQL.')
- endif
- if FUZZ_OPT != 'disabled'
- FUZZ_OPT = 'enabled'
- endif
- if PERFDHCP_OPT != 'disabled'
- PERFDHCP_OPT = 'enabled'
- endif
- if SHELL_OPT != 'disabled'
- SHELL_OPT = 'enabled'
- endif
-elif all_opt.disabled()
- if krb5_opt != 'enabled'
- krb5 = disabler()
- endif
- if mysql_opt != 'enabled'
- mysql = disabler()
- endif
- if netconf_opt != 'enabled'
- NETCONF_DEPS_FOUND = false
- endif
- if postgresql_opt != 'enabled'
- postgresql = disabler()
- endif
- if FUZZ_OPT != 'enabled'
- FUZZ_OPT = 'disabled'
- endif
- if PERFDHCP_OPT != 'enabled'
- PERFDHCP_OPT = 'disabled'
- endif
- if SHELL_OPT != 'enabled'
- SHELL_OPT = 'disabled'
- endif
-elif all_opt.auto()
- if krb5_opt == 'enabled' and not krb5.found()
- error('Dependency not found: Kerberos 5 with GSSAPI.')
- endif
-
- if mysql_opt == 'enabled' and not mysql.found()
- error('Dependency not found: MySQL.')
- endif
-
- if netconf_opt == 'enabled' and not NETCONF_DEPS_FOUND
- error('Dependency not found: NETCONF.')
- endif
-
- if postgresql_opt == 'enabled' and not postgresql.found()
- error('Dependency not found: PostgreSQL.')
- endif
-else
- error('Unknown value for -Dall')
-endif
-
-if FUZZ_OPT == 'enabled'
- if not gtest.found()
- error('Fuzzing requires gtest. Gtest not found.')
- endif
- conf_data.set('FUZZING', true)
-endif
-
-if mysql.found()
- conf_data.set('HAVE_MYSQL', true)
-endif
-
-if postgresql.found()
- conf_data.set('HAVE_PGSQL', true)
-endif
-
-if logger_checks_opt == 'enabled'
- conf_data.set('ENABLE_LOGGER_CHECKS', true)
-endif
+conf_data.set('ENABLE_LOGGER_CHECKS', logger_checks_opt.enabled())
+conf_data.set('FUZZING', FUZZ_OPT.enabled())
+conf_data.set('HAVE_MYSQL', MYSQL_DEP.found())
+conf_data.set('HAVE_PGSQL', POSTGRESQL_DEP.found())
#### Compiler Checks
result = cpp.run(
fs.read('compiler-checks/chrono-same-duration.cc'),
name: 'CHRONO_SAME_DURATION',
- dependencies: [boost],
)
conf_data.set('CHRONO_SAME_DURATION', result.returncode() == 0)
result = cpp.run(
fs.read('compiler-checks/have-generic-tls-method.cc'),
name: 'HAVE_GENERIC_TLS_METHOD',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
)
conf_data.set('HAVE_GENERIC_TLS_METHOD', result.returncode() == 0)
result = cpp.run(
fs.read('compiler-checks/log4cplus-initializer.cc'),
name: 'LOG4CPLUS_INITIALIZER_H',
- dependencies: [log4cplus],
+ dependencies: [LOG4CPLUS_DEP],
)
conf_data.set('LOG4CPLUS_INITIALIZER_H', result.returncode() == 0)
-if mysql.found()
+if MYSQL_DEP.found()
result = cpp.run(
fs.read('compiler-checks/mysql-my-bool.cc'),
- name: 'HAVE_MYSQL_MY_BOOL',
- dependencies: [mysql],
+ name: 'MYSQL_MY_BOOL',
+ dependencies: [MYSQL_DEP],
)
conf_data.set('HAVE_MYSQL_MY_BOOL', result.returncode() == 0)
endif
result = cpp.run(
fs.read('compiler-checks/stream-truncated-error.cc'),
name: 'HAVE_STREAM_TRUNCATED_ERROR',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
)
conf_data.set('HAVE_STREAM_TRUNCATED_ERROR', result.returncode() == 0)
+# TODO: implement when integrating with CI
+result = cpp.run(
+ fs.read('compiler-checks/fuzzing-with-clusterfuzzlite.cc'),
+ name: 'FUZZING_WITH_CLUSTERFUZZLITE',
+)
+FUZZING_WITH_CLUSTERFUZZLITE = result.returncode() == 0
+
#### System-specific Compiler Flags
compile_args = []
result = cpp.run(
fs.read('compiler-checks/get-boost-version.cc'),
name: 'Get Boost version',
- dependencies: [boost],
)
if result.returncode() == 0
report_conf_data.set('BOOST_VERSION', result.stdout().strip())
endif
report_conf_data.set(
'BOOST_INCLUDE',
- boost.get_variable('includedir', default_value: 'unknown'),
+ boost_dep.get_variable('includedir', default_value: 'unknown'),
)
report_conf_data.set(
'BOOST_LIBDIR',
- boost.get_variable('libdir', default_value: 'unknown'),
+ boost_dep.get_variable('libdir', default_value: 'unknown'),
)
report_conf_data.set(
'CRYPTO_INCLUDE',
- crypto.get_variable('includedir', default_value: 'unknown'),
+ CRYPTO_DEP.get_variable('includedir', default_value: 'unknown'),
)
report_conf_data.set(
'CRYPTO_LIBDIR',
- crypto.get_variable('libdir', default_value: 'unknown'),
+ CRYPTO_DEP.get_variable('libdir', default_value: 'unknown'),
)
-if crypto.name() == botan.name()
+if CRYPTO_DEP.name() == botan.name()
report_conf_data.set('CRYPTO_NAME', 'Botan')
result = cpp.run(
fs.read('compiler-checks/get-botan-version.cc'),
name: 'Get Botan version',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
)
if result.returncode() == 0
report_conf_data.set('CRYPTO_VERSION', result.stdout().strip())
else
report_conf_data.set('CRYPTO_VERSION', botan.version())
endif
-elif crypto.name() == openssl.name()
+elif CRYPTO_DEP.name() == openssl.name()
report_conf_data.set('CRYPTO_NAME', 'OpenSSL')
result = cpp.run(
fs.read('compiler-checks/get-openssl-version.cc'),
name: 'Get OpenSSL version',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
)
if result.returncode() == 0
report_conf_data.set('CRYPTO_VERSION', result.stdout().strip())
endif
endif
# TODO: remove if-condition when support for Ubuntu 20.04 gets removed.
-if log4cplus.type_name() == 'pkgconfig'
+if LOG4CPLUS_DEP.type_name() == 'pkgconfig'
report_conf_data.set(
'LOG4CPLUS_INCLUDE',
- log4cplus.get_variable('includedir', default_value: 'unknown'),
+ LOG4CPLUS_DEP.get_variable('includedir', default_value: 'unknown'),
)
report_conf_data.set(
'LOG4CPLUS_LIBDIR',
- log4cplus.get_variable('libdir', default_value: 'unknown'),
+ LOG4CPLUS_DEP.get_variable('libdir', default_value: 'unknown'),
)
+else
+ report_conf_data.set('LOG4CPLUS_INCLUDE', 'unknown')
+ report_conf_data.set('LOG4CPLUS_LIBDIR', 'unknown')
endif
result = cpp.run(
fs.read('compiler-checks/get-log4cplus-version.cc'),
name: 'Get Log4cplus version',
- dependencies: [log4cplus],
+ dependencies: [LOG4CPLUS_DEP],
)
if result.returncode() == 0
report_conf_data.set('LOG4CPLUS_VERSION', result.stdout().strip())
else
report_conf_data.set('BISON', 'unknown')
endif
-if mysql.found()
- if not mysql_config.found()
- report_conf_data.set('MYSQL_VERSION', mysql.version())
- report_conf_data.set(
- 'MYSQL_INCLUDE',
- mysql.get_variable('includedir', default_value: 'unknown'),
- )
- report_conf_data.set(
- 'MYSQL_LIBDIR',
- mysql.get_variable('libdir', default_value: 'unknown'),
- )
- else
- report_conf_data.set('MYSQL_VERSION', mysql_version)
- report_conf_data.set('MYSQL_INCLUDE', ' '.join(mysql_compile_args))
- report_conf_data.set('MYSQL_LIBDIR', ' '.join(mysql_link_args))
- endif
+if MYSQL_DEP.found()
+ report_conf_data.set('MYSQL_VERSION', MYSQL_DEP.version())
+ report_conf_data.set(
+ 'MYSQL_INCLUDE',
+ MYSQL_DEP.get_variable('includedir', default_value: 'unknown'),
+ )
+ report_conf_data.set(
+ 'MYSQL_LIBDIR',
+ MYSQL_DEP.get_variable('libdir', default_value: 'unknown'),
+ )
else
report_conf_data.set('HAVE_MYSQL', 'no')
report_conf_data.set('MYSQL_VERSION', 'unknown')
report_conf_data.set('MYSQL_INCLUDE', 'unknown')
report_conf_data.set('MYSQL_LIBDIR', 'unknown')
endif
-if postgresql.found()
+if POSTGRESQL_DEP.found()
report_conf_data.set('HAVE_PGSQL', 'yes')
- if not pg_config.found()
- report_conf_data.set('PGSQL_VERSION', postgresql.version())
- report_conf_data.set(
- 'PGSQL_INCLUDE',
- postgresql.get_variable('includedir', default_value: 'unknown'),
- )
- report_conf_data.set(
- 'PGSQL_LIBDIR',
- postgresql.get_variable('libdir', default_value: 'unknown'),
- )
- else
- report_conf_data.set('PGSQL_VERSION', pgsql_version)
- report_conf_data.set('PGSQL_INCLUDE', ' '.join(pgsql_compile_args))
- report_conf_data.set('PGSQL_LIBDIR', ' '.join(pgsql_link_args))
- endif
+ report_conf_data.set('PGSQL_VERSION', POSTGRESQL_DEP.version())
+ report_conf_data.set(
+ 'PGSQL_INCLUDE',
+ POSTGRESQL_DEP.get_variable('includedir', default_value: 'unknown'),
+ )
+ report_conf_data.set(
+ 'PGSQL_LIBDIR',
+ POSTGRESQL_DEP.get_variable('libdir', default_value: 'unknown'),
+ )
else
report_conf_data.set('HAVE_PGSQL', 'no')
report_conf_data.set('PGSQL_VERSION', 'unknown')
report_conf_data.set('PGSQL_INCLUDE', 'unknown')
report_conf_data.set('PGSQL_LIBDIR', 'unknown')
endif
-report_conf_data.set('HAVE_NETCONF', 'no')
-if gtest.found()
+if NETCONF_DEP.found()
+ report_conf_data.set('HAVE_NETCONF', 'yes')
+else
+ report_conf_data.set('HAVE_NETCONF', 'no')
+endif
+if FUZZ_OPT.enabled() or TESTS_OPT.enabled()
report_conf_data.set('HAVE_GTEST', 'yes')
report_conf_data.set(
'GTEST_INCLUDE',
- gtest.get_variable('includedir', default_value: 'unknown'),
+ GTEST_DEP.get_variable('includedir', default_value: 'unknown'),
)
report_conf_data.set(
'GTEST_LIBDIR',
- gtest.get_variable('libdir', default_value: 'unknown'),
+ GTEST_DEP.get_variable('libdir', default_value: 'unknown'),
)
- report_conf_data.set('GTEST_VERSION', gtest.version())
+ report_conf_data.set('GTEST_VERSION', GTEST_DEP.version())
else
report_conf_data.set('HAVE_GTEST', 'no')
report_conf_data.set('GTEST_VERSION', 'unknown')
subdir('fuzz')
subdir('doc')
subdir('premium', if_found: premium)
-subdir('contrib', if_found: contrib)
+subproject('contrib', required: false)
#### More Custom Targets
-# all
+# Dependency-related options
+option(
+ 'crypto',
+ type: 'combo',
+ choices: ['botan', 'openssl'],
+ value: 'openssl',
+ description: 'Backend for cryptographical operations. Mandatory.',
+)
option(
- 'all',
+ 'krb5',
type: 'feature',
- value: 'disabled',
- description: 'Requires that all C++ dependencies be enabled: crypto (either botan or openssl), krb5 with gssapi, mysql, netconf, postgresql. Also enables generation of docs and parser which requires bison, flex, and sphinx. Also enables all parts of code: debug, fuzzing, logger-checks, perfdhcp, shell. Overrides the other options.',
+ description: 'Support for GSS-TSIG. Requires krb5 with gssapi.',
+)
+option('mysql', type: 'feature', description: 'Support for MySQL backends.')
+option('netconf', type: 'feature', description: 'Support for kea-netconf.')
+option(
+ 'postgresql',
+ type: 'feature',
+ description: 'Support for PostgreSQL backends.',
)
-
-# Dependency-related options
-option('crypto', type: 'combo', choices: ['botan', 'openssl'], value: 'openssl', description: 'Backend for cryptographical operations. Mandatory.')
-option('krb5', type: 'combo', choices: ['', 'auto', 'enabled', 'disabled'], value: '', description: 'Support for GSS-TSIG. Requires krb5 with gssapi.')
-option('mysql', type: 'combo', choices: ['', 'auto', 'enabled', 'disabled'], value: '', description: 'Support for MySQL backends.')
-option('netconf', type: 'combo', choices: ['', 'auto', 'enabled', 'disabled'], value: '', description: 'Support for kea-netconf.')
-option('postgresql', type: 'combo', choices: ['', 'auto', 'enabled', 'disabled'], value: '', description: 'Support for PostgreSQL backends.')
-
-# Used for development.
-# option('docs', type: 'feature', choices: ['', 'auto', 'enabled', 'disabled'], value: '', description: 'Support for doc generation.')
-# option('parser', type: 'feature', choices: ['', 'auto', 'enabled', 'disabled'], value: '', description: 'Support for parser generation.')
# Options for enabling various parts of code.
-# not only unit tests...
-option('gtest', type: 'combo', choices: ['enabled', 'disabled'], value: 'disabled', description: 'Support for tests.')
-# debug?
-# logger-checks (uses assert so only for development).
-option('logger-checks', type: 'combo', choices: ['enabled', 'disabled'], value: 'disabled', description: 'Check logger messages.')
-option('fuzz', type: 'combo', choices: ['', 'auto', 'clusterfuzzlite', 'disabled', 'enabled'], value: '', description: 'Support for fuzz testing.')
-option('perfdhcp', type: 'combo', choices: ['', 'auto', 'disabled', 'enabled'], value: '', description: 'Builds perfdhcp.')
-option('shell', type: 'combo', choices: ['', 'auto', 'disabled', 'enabled'], value: '', description: 'Builds kea-shell.')
+option('fuzz', type: 'feature', description: 'Support for fuzz testing.')
+option(
+ 'logger-checks',
+ type: 'feature',
+ value: 'disabled',
+ description: 'Check logger messages.',
+)
+option('shell', type: 'feature', description: 'Builds kea-shell.')
+option('tests', type: 'feature', description: 'Support for tests.')
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
output: 'mysql_tests.sh',
configuration: kea_admin_tests_conf_data,
)
-if mysql.found()
+if MYSQL_DEP.found()
test(
'kea_admin_mysql_tests.sh',
mysql_tests,
output: 'pgsql_tests.sh',
configuration: kea_admin_tests_conf_data,
)
-if postgresql.found()
+if POSTGRESQL_DEP.found()
test(
'kea_admin_pgsql_tests.sh',
pgsql_tests,
'ca_response_creator.cc',
'parser_context.cc',
'simple_parser.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
)
executable(
'kea-ctrl-agent',
'main.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'sbin',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
f'-DSYNTAX_FILE="@current_source_dir@/../agent_parser.yy"',
f'-DTEST_CA_DIR="@TEST_CA_DIR@"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [agent_lib] + kea_agent_tests_libs + LIBS_BUILT_SO_FAR,
)
'simple_add_without_dhcid.cc',
'simple_remove.cc',
'simple_remove_without_dhcid.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
)
executable(
'kea-dhcp-ddns',
'main.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'sbin',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
f'-DSYNTAX_FILE="@current_source_dir@/../d2_parser.yy"',
f'-DTEST_CA_DIR="@TEST_CA_DIR@"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [d2_lib] + kea_d2_tests_libs + LIBS_BUILT_SO_FAR,
)
'dhcp4_srv.cc',
'json_config_parser.cc',
'parser_context.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
)
kea_dhcp4 = executable(
'kea-dhcp4',
'main.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'sbin',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
current_build_dir = meson.current_build_dir()
current_source_dir = meson.current_source_dir()
-dhcp4_tests_deps = [crypto, gtest]
+dhcp4_tests_deps = [CRYPTO_DEP, GTEST_DEP]
dhcp4_tests_libs = [
kea_dhcpsrv_testutils_lib,
kea_dhcp_testutils_lib,
kea_util_unittests_lib,
kea_asiolink_testutils_lib,
]
-if mysql.found()
- dhcp4_tests_deps += [mysql]
+if MYSQL_DEP.found()
+ dhcp4_tests_deps += [MYSQL_DEP]
dhcp4_tests_libs += [
dhcp_mysql_archive,
kea_mysql_testutils_lib,
kea_mysql_lib,
]
endif
-if postgresql.found()
- dhcp4_tests_deps += [postgresql]
+if POSTGRESQL_DEP.found()
+ dhcp4_tests_deps += [POSTGRESQL_DEP]
dhcp4_tests_libs += [
dhcp_pgsql_archive,
kea_pgsql_testutils_lib,
'json_config_parser.cc',
'main.cc',
'parser_context.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
)
kea_dhcp6 = executable(
'kea-dhcp6',
'main.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'sbin',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
current_build_dir = meson.current_build_dir()
current_source_dir = meson.current_source_dir()
-dhcp6_tests_deps = [crypto, gtest]
+dhcp6_tests_deps = [CRYPTO_DEP, GTEST_DEP]
dhcp6_tests_libs = [
kea_dhcpsrv_testutils_lib,
kea_dhcp_testutils_lib,
kea_util_unittests_lib,
kea_asiolink_testutils_lib,
]
-if mysql.found()
- dhcp6_tests_deps += [mysql]
+if MYSQL_DEP.found()
+ dhcp6_tests_deps += [MYSQL_DEP]
dhcp6_tests_libs += [
dhcp_mysql_archive,
kea_mysql_testutils_lib,
kea_mysql_lib,
]
endif
-if postgresql.found()
- dhcp6_tests_deps += [postgresql]
+if POSTGRESQL_DEP.found()
+ dhcp6_tests_deps += [POSTGRESQL_DEP]
dhcp6_tests_libs += [
dhcp_pgsql_archive,
kea_pgsql_testutils_lib,
keactrl_conf_data.set('PACKAGE', 'kea')
keactrl_conf_data.set('exec_prefix', '${prefix}')
keactrl_conf_data.set('sbindir', '${prefix}/' + get_option('sbindir'))
-if NETCONF_DEPS_FOUND
+if NETCONF_DEP.found()
keactrl_conf_data.set('HAVE_NETCONF', 'yes')
else
keactrl_conf_data.set('HAVE_NETCONF', 'no')
input: 'kea-netconf.conf.pre',
output: 'kea-netconf.conf',
command: [path_replacer, '@INPUT@', '@OUTPUT@'],
- install: NETCONF_DEPS_FOUND,
+ install: NETCONF_DEP.found(),
install_dir: kea_configfiles_destdir,
)
subdir('tests')
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
keactrl_tests_conf_data = configuration_data()
keactrl_tests_conf_data.set('abs_top_builddir', TOP_BUILD_DIR)
-if NETCONF_DEPS_FOUND
+if NETCONF_DEP.found()
keactrl_tests_conf_data.set('HAVE_NETCONF', 'yes')
else
keactrl_tests_conf_data.set('HAVE_NETCONF', 'no')
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'lfc_controller_unittests.cc',
'lfc_unittests.cc',
cpp_args: [f'-DTEST_DATA_BUILDDIR="@current_build_dir@"'],
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [lfc_lib] + LIBS_BUILT_SO_FAR,
)
-if not NETCONF_DEPS_FOUND
+if not NETCONF_DEP.found()
subdir_done()
endif
'simple_parser.cc',
'stdout_control_socket.cc',
'unix_control_socket.cc',
- dependencies: NETCONF_DEPS_ARRAY + [crypto],
+ dependencies: [NETCONF_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
- link_with: [kea_yang_testutils_lib, kea_process_testutils_lib] + LIBS_BUILT_SO_FAR,
+ link_with: LIBS_BUILT_SO_FAR,
override_options: ['cpp_std=c++20'],
)
executable(
'kea-netconf',
'main.cc',
- dependencies: NETCONF_DEPS_ARRAY + [crypto],
+ dependencies: [NETCONF_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'sbin',
-if not gtest.found() or not NETCONF_DEPS_FOUND
+if not TESTS_OPT.enabled() or not NETCONF_DEP.found()
subdir_done()
endif
f'-DTEST_DATA_SOURCEDIR="@current_source_dir@"',
f'-DTEST_DATA_BUILDDIR="@current_build_dir@"',
],
- dependencies: NETCONF_DEPS_ARRAY + [gtest, crypto],
+ dependencies: [NETCONF_DEP, GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [
netconf_lib,
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
-if PERFDHCP_OPT != 'enabled'
- subdir_done()
-endif
-
perfdhcp_lib = static_library(
'perfdhcp',
'avalanche_scen.cc',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'stats_mgr_unittest.cc',
'test_control_unittest.cc',
cpp_args: [f'-DTEST_DATA_DIR="@current_source_dir@/testdata"'],
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [perfdhcp_lib, kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
)
-if SHELL_OPT != 'enabled'
+if not SHELL_OPT.enabled()
subdir_done()
endif
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
-
shell_tests_conf_data = configuration_data()
shell_tests_conf_data.set('PYTHON', PYTHON.full_path())
shell_tests_conf_data.set('abs_top_builddir', TOP_BUILD_DIR)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
f'-DTEST_DATA_BUILDDIR="@current_source_dir@"',
f'-DLIBDHCP_GSS_TSIG_SO="@TOP_BUILD_DIR@/src/hooks/d2/gss_tsig/libddns_gss_tsig.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
-if not krb5.found()
+if not KRB5_DEP.found()
subdir_done()
endif
'managed_key.cc',
'tkey_exchange.cc',
'version.cc',
- dependencies: [krb5, crypto],
+ dependencies: [KRB5_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found() or not krb5.found()
+if not TESTS_OPT.enabled() or not KRB5_DEP.found()
subdir_done()
endif
'tkey_exchange_unittests.cc',
'tkey_unittests.cc',
cpp_args: [f'-DTEST_DATA_DIR="@current_source_dir@"'],
- dependencies: [krb5, gtest, crypto],
+ dependencies: [KRB5_DEP, GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [ddns_gss_tsig_tests_libs] + LIBS_BUILT_SO_FAR,
)
'nsupdate',
'nsupdate.cc',
cpp_args: [f'-DTEST_DATA_DIR="@current_source_dir@"'],
- dependencies: [krb5],
+ dependencies: [KRB5_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [ddns_gss_tsig_archive] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'ddns-gss-tsig-testutils',
'gss_tsig_dns_server.cc',
cpp_args: [f'-DTEST_DATA_DIR="@current_source_dir@"'],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DLIBDHCP_BOOTP_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/bootp/libdhcp_bootp.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DBOOTP_LIB_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/bootp/libdhcp_bootp.so"',
],
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_bootp_archive] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DLIBDHCP_CLASS_CMDS_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/class_cmds/libdhcp_class_cmds.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
'class_cmds_log.cc',
'class_cmds_messages.cc',
'version.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'dhcp-class-cmds-tests',
'class_cmds_unittest.cc',
'run_unittests.cc',
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_class_cmds_archive] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DDDNS_TUNING_LIB_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/ddns_tuning/libdhcp_ddns_tuning.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
'ddns_tuning_messages.cc',
'expression_cache.cc',
'version.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'ddns_tuning_unittests.cc',
'expression_cache_unittests.cc',
'run_unittests.cc',
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_ddns_tuning_archive] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
f'-DTEST_DATA_BUILDDIR="@current_build_dir@"',
f'-DLIB_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/flex_id/libdhcp_flex_id.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
'flex_id_messages.cc',
'load_unload.cc',
'version.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'callout_unittests.cc',
'run_unittests.cc',
cpp_args: [f'-DTEST_DATA_BUILDDIR="@current_build_dir@"'],
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_flex_id_archive] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DFLEX_OPTION_LIB_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/flex_option/libdhcp_flex_option.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
'flex_option_log.cc',
'flex_option_messages.cc',
'version.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DFLEX_OPTION_LIB_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/flex_option/libdhcp_flex_option.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_flex_option_archive] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
current_build_dir = meson.current_build_dir()
link_with = [kea_database_testutils_lib]
-dependencies = [gtest, crypto]
+dependencies = [GTEST_DEP, CRYPTO_DEP]
-if mysql.found()
- dependencies += [mysql]
+if MYSQL_DEP.found()
+ dependencies += [MYSQL_DEP]
link_with += [dhcp_mysql_lib, kea_mysql_testutils_lib]
endif
-if postgresql.found()
- dependencies += [postgresql]
+if POSTGRESQL_DEP.found()
+ dependencies += [POSTGRESQL_DEP]
link_with += [dhcp_pgsql_lib, kea_pgsql_testutils_lib]
endif
f'-DLEGAL_LOG_LIB_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/forensic_log/libdhcp_legal_log.so"',
],
dependencies: dependencies,
- include_directories: [include_directories('.'), include_directories('..'), include_directories('../..')] + INCLUDES,
+ include_directories: [
+ include_directories('.'),
+ include_directories('..'),
+ include_directories('../..'),
+ ] + INCLUDES,
link_with: [link_with] + LIBS_BUILT_SO_FAR,
)
'rotating_file.cc',
'version.cc',
cpp_args: [f'-DLEGAL_LOG_DIR="@LEGAL_LOG_DIR@"'],
- dependencies: [crypto, mysql, postgresql],
+ dependencies: [CRYPTO_DEP, MYSQL_DEP, POSTGRESQL_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
current_build_dir = meson.current_build_dir()
-dependencies = [gtest, crypto]
+dependencies = [GTEST_DEP, CRYPTO_DEP]
dhcp_forensic_log_tests_libs = [
dhcp_forensic_log_archive,
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DLIBDHCP_HA_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/high_availability/libdhcp_ha.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
'lease_update_backlog.cc',
'query_filter.cc',
'version.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
f'-DTEST_CA_DIR="@TEST_CA_DIR@"',
f'-DTEST_HTTP_DIR="@TOP_SOURCE_DIR@/src/lib/http/tests/testdata"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_ha_archive, [kea_testutils_lib]] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
f'-DTEST_DATA_BUILDDIR="@current_build_dir@"',
f'-DLIB_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/host_cache/libdhcp_host_cache.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
'host_cache_messages.cc',
'host_cache_parsers.cc',
'version.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'host_data_source_unittests.cc',
'run_unittests.cc',
cpp_args: [f'-DTEST_DATA_BUILDDIR="@current_build_dir@"'],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_host_cache_tests_libs] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DLIBDHCP_HOST_CMDS_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/host_cmds/libdhcp_host_cmds.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
'host_cmds_log.cc',
'host_cmds_messages.cc',
'version.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'host_cmds_unittest.cc',
'host_data_parser_unittest.cc',
'run_unittests.cc',
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_host_cmds_tests_libs] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DLIBDHCP_LEASE_CMDS_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/lease_cmds/libdhcp_lease_cmds.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
'lease_cmds_messages.cc',
'lease_parser.cc',
'version.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'lease_cmds_func4_unittest.cc',
'lease_cmds_func6_unittest.cc',
'run_unittests.cc',
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_lease_cmds_archive] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
f'-DTEST_DATA_BUILDDIR="@current_build_dir@"',
f'-DLIBDHCP_LEASE_QUERY_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/lease_query/libdhcp_lease_query.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
'lease_query_messages.cc',
'mt_lease_query_mgr.cc',
'version.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
current_build_dir = meson.current_build_dir()
-dhcp_lease_query_tests_dependencies = [gtest, crypto]
+dhcp_lease_query_tests_dependencies = [GTEST_DEP, CRYPTO_DEP]
dhcp_lease_query_tests_libs = [dhcp_lease_query_archive]
-if mysql.found()
+if MYSQL_DEP.found()
dhcp_lease_query_tests_libs += [dhcp_mysql_archive, kea_mysql_testutils_lib]
- dhcp_lease_query_tests_dependencies += [mysql]
+ dhcp_lease_query_tests_dependencies += [MYSQL_DEP]
endif
-if postgresql.found()
+if POSTGRESQL_DEP.found()
dhcp_lease_query_tests_libs += [dhcp_pgsql_archive, kea_pgsql_testutils_lib]
- dhcp_lease_query_tests_dependencies += [postgresql]
+ dhcp_lease_query_tests_dependencies += [POSTGRESQL_DEP]
endif
dhcp_lease_query_tests_libs += [
kea_dhcp_testutils_lib,
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DLIBDHCP_LIMITS_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/limits/libdhcp_limits.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
'limit_manager.cc',
'load_unload.cc',
'version.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'limits_unit_tests_limit_manager.cc',
'limits_unit_tests_main.cc',
'limits_unit_tests_rate_limiting.cc',
- dependencies: [crypto, gtest],
+ dependencies: [CRYPTO_DEP, GTEST_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_limits_archive, kea_testutils_lib] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DLIBDHCP_MYSQL_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/mysql/libdhcp_mysql.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
-if not mysql.found()
+if not MYSQL_DEP.found()
subdir_done()
endif
'mysql_lease_mgr.cc',
'mysql_legal_log.cc',
'version.cc',
- dependencies: [crypto, mysql],
+ dependencies: [CRYPTO_DEP, MYSQL_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found() or not mysql.found()
+if not TESTS_OPT.enabled() or not MYSQL_DEP.found()
subdir_done()
endif
'mysql_lease_extended_info_unittest.cc',
'mysql_lease_mgr_unittest.cc',
'run_unittests.cc',
- cpp_args: [
- f'-DTEST_CA_DIR="@TEST_CA_DIR@"',
- ],
- dependencies: [gtest, crypto, mysql],
+ cpp_args: [f'-DTEST_CA_DIR="@TEST_CA_DIR@"'],
+ dependencies: [GTEST_DEP, CRYPTO_DEP, MYSQL_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_mysql_archive, libs_testutils, kea_testutils_lib] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DLIBDHCP_PERFMON_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/perfmon/libdhcp_perfmon.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
'perfmon_messages.cc',
'perfmon_mgr.cc',
'version.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DPERFMON_LIB_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/perfmon/libdhcp_perfmon.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_perfmon_archive, [kea_testutils_lib]] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DLIBDHCP_PGSQL_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/pgsql/libdhcp_pgsql.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
-if not postgresql.found()
+if not POSTGRESQL_DEP.found()
subdir_done()
endif
'pgsql_lease_mgr.cc',
'pgsql_legal_log.cc',
'version.cc',
- dependencies: [crypto, postgresql],
+ dependencies: [CRYPTO_DEP, POSTGRESQL_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found() or not postgresql.found()
+if not TESTS_OPT.enabled() or not POSTGRESQL_DEP.found()
subdir_done()
endif
'pgsql_lease_extended_info_unittest.cc',
'pgsql_lease_mgr_unittest.cc',
'run_unittests.cc',
- dependencies: [gtest, crypto, postgresql],
+ dependencies: [GTEST_DEP, CRYPTO_DEP, POSTGRESQL_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_pgsql_archive, libs_testutils, kea_testutils_lib] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DPING_CHECK_LIB_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/ping_check/libdhcp_ping_check.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
'ping_context.cc',
'ping_context_store.cc',
'version.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'ping_context_store_unittests.cc',
'ping_context_unittests.cc',
'run_unittests.cc',
- dependencies: [crypto, gtest],
+ dependencies: [CRYPTO_DEP, GTEST_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_ping_check_archive] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
f'-DLIB_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/radius/libdhcp_radius.so"',
f'-DTEST_DICTIONARY="@TOP_SOURCE_DIR@/src/hooks/dhcp/radius/data/dictionary"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
'radius_utils.cc',
'version.cc',
cpp_args: [f'-DDICTIONARY="@PREFIX@/@SYSCONFDIR@/kea/radius/dictionary"'],
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
f'-DDICTIONARY="@PREFIX@/@SYSCONFDIR@/kea/radius/dictionary"',
f'-DTEST_DICTIONARY="@TOP_SOURCE_DIR@/src/hooks/dhcp/radius/data/dictionary"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_radius_tests_libs] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
hook_includes = [include_directories('..')]
f'-DLIBRUN_SCRIPT_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/run_script/libdhcp_run_script.so"',
f'-DRUN_SCRIPT_TEST_SH="@TOP_BUILD_DIR@/src/hooks/dhcp/run_script/tests/run_script_test.sh"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
'run_script_log.cc',
'run_script_messages.cc',
'version.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
f'-DTEST_LOG_FILE="@current_build_dir@/test.log"',
f'-DRUN_SCRIPT_TEST_SH="@current_build_dir@/run_script_test.sh"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_run_script_archive] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DLIBDHCP_STAT_CMDS_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/stat_cmds/libdhcp_stat_cmds.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
'stat_cmds_log.cc',
'stat_cmds_messages.cc',
'version.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DSTAT_CMDS_LIB_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/stat_cmds/libdhcp_stat_cmds.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_stat_cmds_archive] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DLIBDHCP_SUBNET_CMDS_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/subnet_cmds/libdhcp_subnet_cmds.so"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
'subnet_cmds_log.cc',
'subnet_cmds_messages.cc',
'version.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib/kea/hooks',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
cpp_args: [
f'-DLIB_SO="@TOP_BUILD_DIR@/src/hooks/dhcp/subnet_cmds/libdhcp_subnet_cmds.so"',
],
- dependencies: [crypto, gtest],
+ dependencies: [CRYPTO_DEP, GTEST_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_subnet_cmds_tests_libs] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'user_unittests.cc',
'userid_unittests.cc',
cpp_args: [f'-DTEST_DATA_BUILDDIR="@current_build_dir@"'],
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.'), include_directories('..')] + INCLUDES,
link_with: [dhcp_user_chk_archive] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'kea-asiodns-tests',
'io_fetch_unittest.cc',
'run_unittests.cc',
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_testutils_lib, kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
)
'openssl_tls.cc',
'process_spawn.cc',
'unix_domain_socket.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
f'-DINVALID_TEST_SCRIPT_SH="@TOP_SOURCE_DIR@/README"',
f'-DTEST_CA_DIR="@TEST_CA_DIR@"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_asiolink_testutils_lib, kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'test_server_unix_socket.cc',
'timed_signal.cc',
cpp_args: [f'-DTEST_CA_DIR="@TEST_CA_DIR@"'],
- dependencies: [crypto, gtest],
+ dependencies: [CRYPTO_DEP, GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
)
-if crypto.name() == openssl.name()
+if CRYPTO_DEP.name() == openssl.name()
executable(
'openssl_sample_client',
'openssl_sample_client.cc',
cpp_args: [f'-DTEST_CA_DIR="@TEST_CA_DIR@"'],
- dependencies: [gtest, openssl],
+ dependencies: [GTEST_DEP, openssl],
include_directories: [include_directories('.')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
'openssl_sample_server',
'openssl_sample_server.cc',
cpp_args: [f'-DTEST_CA_DIR="@TEST_CA_DIR@"'],
- dependencies: [gtest, openssl],
+ dependencies: [GTEST_DEP, openssl],
include_directories: [include_directories('.')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
-elif crypto.name() == botan.name()
+elif CRYPTO_DEP.name() == botan.name()
executable(
'botan_sample_client',
'botan_sample_client.cc',
cpp_args: [f'-DTEST_CA_DIR="@TEST_CA_DIR@"'],
- dependencies: [gtest, botan],
+ dependencies: [GTEST_DEP, botan],
include_directories: [include_directories('.')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
'botan_sample_server',
'botan_sample_server.cc',
cpp_args: [f'-DTEST_CA_DIR="@TEST_CA_DIR@"'],
- dependencies: [gtest, botan],
+ dependencies: [GTEST_DEP, botan],
include_directories: [include_directories('.')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
kea_cc_lib_cpp_args = []
-if gtest.found()
+if TESTS_OPT.enabled()
kea_cc_lib_cpp_args = ['-DALLOW_KEATEST']
endif
kea_cc_lib = shared_library(
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'stamped_element_unittest.cc',
'stamped_value_unittest.cc',
'user_context_unittests.cc',
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
)
'http_command_response_creator.cc',
'unix_command_config.cc',
'unix_command_mgr.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'run_unittests.cc',
'unix_command_config_unittests.cc',
'unix_command_mgr_unittests.cc',
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
cpp_args: [
f'-DTEST_DATA_BUILDDIR="@current_build_dir@"',
f'-DTEST_CA_DIR="@TEST_CA_DIR@"',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'kea-config_backend-tests',
'config_backend_mgr_unittest.cc',
'run_unittests.cc',
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_testutils_lib, kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
)
sources = []
-if crypto.name() == botan.name()
+if CRYPTO_DEP.name() == botan.name()
sources += ['botan_hash.cc', 'botan_hmac.cc', 'botan_link.cc']
-elif crypto.name() == openssl.name()
+elif CRYPTO_DEP.name() == openssl.name()
sources += ['openssl_hash.cc', 'openssl_hmac.cc', 'openssl_link.cc']
endif
'crypto_hmac.cc',
'crypto_rng.cc',
sources,
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'hash_unittests.cc',
'hmac_unittests.cc',
'run_unittests.cc',
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
)
'd2_zone.cc',
'dns_client.cc',
'nc_trans.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'd2_zone_unittests.cc',
'dns_client_unittests.cc',
'nc_trans_unittests.cc',
- dependencies: [crypto, gtest],
+ dependencies: [CRYPTO_DEP, GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_util_unittests_lib, libs_testutils] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'kea-d2srv-testutils',
'nc_test_utils.cc',
'stats_test_utils.cc',
- dependencies: [crypto, gtest],
+ dependencies: [CRYPTO_DEP, GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'run_unittests.cc',
'server_selector_unittest.cc',
'server_unittest.cc',
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_testutils_lib, kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'kea-database-testutils',
'schema.cc',
cpp_args: [f'-DTEST_CA_DIR="@TEST_CA_DIR@"'],
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'protocol_util_unittest.cc',
'run_unittests.cc',
pkt_filter_xpf_unittest_cc,
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
cpp_args: [f'-DTEST_DATA_BUILDDIR="@current_build_dir@"'],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_util_unittests_lib, libs_testutils] + LIBS_BUILT_SO_FAR,
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'pkt_captures6.cc',
'pkt_filter6_test_stub.cc',
'pkt_filter_test_stub.cc',
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'ncr_unittests.cc',
'run_unittests.cc',
'test_utils.cc',
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_testutils_lib, kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
)
f'-DDHCP_DATA_DIR="@DHCP_DATA_DIR@"',
f'-DKEA_LFC_EXECUTABLE="@KEA_LFC@"',
],
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
f'-DKEA_LFC_BUILD_DIR="@TOP_BUILD_DIR@/src/bin/lfc"',
f'-DDEFAULT_HOOKS_PATH="@DEFAULT_HOOKS_PATH@"',
],
- dependencies: [crypto, gtest],
+ dependencies: [CRYPTO_DEP, GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_util_unittests_lib, libs_testutils] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'test_config_backend_dhcp6.cc',
'test_utils.cc',
]
-dependencies = [crypto, gtest]
-if mysql.found()
+dependencies = [CRYPTO_DEP, GTEST_DEP]
+if MYSQL_DEP.found()
sources += ['mysql_generic_backend_unittest.cc']
- dependencies += [mysql]
+ dependencies += [MYSQL_DEP]
endif
-if postgresql.found()
+if POSTGRESQL_DEP.found()
sources += ['pgsql_generic_backend_unittest.cc']
- dependencies += [postgresql]
+ dependencies += [POSTGRESQL_DEP]
endif
kea_dhcpsrv_testutils_lib = static_library(
'kea-dhcpsrv-testutils',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
f'-DTEST_DATA_BUILDDIR="@TOP_BUILD_DIR@/src/lib/dns/tests/testdata"',
f'-DTEST_DATA_SRCDIR="@TOP_SOURCE_DIR@/src/lib/dns/tests/testdata"',
],
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'evaluate_unittest.cc',
'run_unittests.cc',
'token_unittest.cc',
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_testutils_lib, kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'kea-exceptions-tests',
'exceptions_unittest.cc',
'run_unittests.cc',
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'parking_lots_unittest.cc',
'run_unittests.cc',
'server_hooks_unittest.cc',
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
)
'response_json.cc',
'response_parser.cc',
'url.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
f'-DTEST_CA_DIR="@TEST_CA_DIR@"',
f'-DDATA_DIR="@current_source_dir@/testdata"',
],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_util_unittests_lib, libs_testutils] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'interprocess_sync_null_unittest.cc',
'run_unittests.cc',
cpp_args: [f'-DTEST_DATA_TOPBUILDDIR="@TOP_BUILD_DIR@"'],
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
)
'message_reader.cc',
'output_option.cc',
cpp_args: [f'-DTOP_BUILDDIR="@TOP_BUILD_DIR@"'],
- dependencies: [log4cplus],
+ dependencies: [LOG4CPLUS_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'output_option_unittest.cc',
'run_unittests.cc',
cpp_args: [f'-DTEMP_DIR="@TOP_BUILD_DIR@"'],
- dependencies: [gtest, log4cplus],
+ dependencies: [GTEST_DEP, LOG4CPLUS_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
)
'run_initializer_unittests.cc',
'message_initializer_1_unittest.cc',
'message_initializer_1a_unittest.cc',
- dependencies: [gtest, log4cplus],
+ dependencies: [GTEST_DEP, LOG4CPLUS_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
)
-if not mysql.found()
+if not MYSQL_DEP.found()
subdir_done()
endif
'mysql_binding.cc',
'mysql_connection.cc',
cpp_args: [f'-DKEA_ADMIN="@KEA_ADMIN@"'],
- dependencies: [mysql],
+ dependencies: [MYSQL_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib',
-if not gtest.found() or not mysql.found()
+if not TESTS_OPT.enabled() or not MYSQL_DEP.found()
subdir_done()
endif
'mysql_connection_unittest.cc',
'run_unittests.cc',
cpp_args: [f'-DTEST_CA_DIR="@TEST_CA_DIR@"', f'-DKEA_ADMIN="@KEA_ADMIN@"'],
- dependencies: [gtest, mysql],
+ dependencies: [GTEST_DEP, MYSQL_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_util_unittests_lib, libs_testutils] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found() or not mysql.found()
+if not TESTS_OPT.enabled() or not MYSQL_DEP.found()
subdir_done()
endif
f'-DDATABASE_SCRIPTS_DIR="@DATABASE_SCRIPTS_DIR@"',
f'-DDATABASE_WIPE_DIR="@DATABASE_SCRIPTS_DIR@"',
],
- dependencies: [gtest, mysql],
+ dependencies: [GTEST_DEP, MYSQL_DEP],
include_directories: [include_directories('.')] + INCLUDES,
)
-if not postgresql.found()
+if not POSTGRESQL_DEP.found()
subdir_done()
endif
'pgsql_connection.cc',
'pgsql_exchange.cc',
cpp_args: [f'-DKEA_ADMIN="@KEA_ADMIN@"'],
- dependencies: [postgresql],
+ dependencies: [POSTGRESQL_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib',
-if not gtest.found() or not postgresql.found()
+if not TESTS_OPT.enabled() or not POSTGRESQL_DEP.found()
subdir_done()
endif
'pgsql_exchange_unittest.cc',
'run_unittests.cc',
cpp_args: [f'-DTEST_CA_DIR="@TEST_CA_DIR@"', f'-DKEA_ADMIN="@KEA_ADMIN@"'],
- dependencies: [gtest, postgresql],
+ dependencies: [GTEST_DEP, POSTGRESQL_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_util_unittests_lib, libs_testutils] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found() or not postgresql.found()
+if not TESTS_OPT.enabled() or not POSTGRESQL_DEP.found()
subdir_done()
endif
f'-DDATABASE_SCRIPTS_DIR="@DATABASE_SCRIPTS_DIR@"',
f'-DDATABASE_WIPE_DIR="@DATABASE_SCRIPTS_DIR@"',
],
- dependencies: [gtest, postgresql],
+ dependencies: [GTEST_DEP, POSTGRESQL_DEP],
include_directories: [include_directories('.')] + INCLUDES,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'kea-process-cfgrpt-tests',
'config_report_unittests.cc',
'run_unittests.cc',
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
)
'process_messages.cc',
'redact_config.cc',
cpp_args: [f'-DDATA_DIR="@DHCP_DATA_DIR@"'],
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'log_parser_unittests.cc',
'logging_info_unittests.cc',
'run_unittests.cc',
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
cpp_args: [
f'-DTEST_DATA_BUILDDIR="@current_build_dir@"',
f'-DTEST_SCRIPT_SH="@current_build_dir@/process_test.sh"',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'kea-process-testutils',
'd_test_stubs.cc',
cpp_args: [f'-DDATABASE_SCRIPTS_DIR="@DATABASE_SCRIPTS_DIR@"'],
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'observation_unittest.cc',
'run_unittests.cc',
'stats_mgr_unittest.cc',
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_testutils_lib, kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
)
'tcp_log.cc',
'tcp_messages.cc',
'tcp_stream_msg.cc',
- dependencies: [crypto],
+ dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib',
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'run_unittests.cc',
'tcp_listener_unittests.cc',
cpp_args: [f'-DTEST_CA_DIR="@TEST_CA_DIR@"'],
- dependencies: [gtest, crypto],
+ dependencies: [GTEST_DEP, CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_util_unittests_lib, kea_asiolink_testutils_lib] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not FUZZ_OPT.enabled() and not TESTS_OPT.enabled()
subdir_done()
endif
'threaded_test.cc',
'unix_control_client.cc',
'user_context_utils.cc',
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
f'-DABS_SRCDIR="@TOP_SOURCE_DIR@/src/lib/util/tests"',
f'-DTEST_DATA_BUILDDIR="@TOP_BUILD_DIR@/src/lib/util/tests"',
],
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
)
-if not gtest.found()
+if not TESTS_OPT.enabled()
subdir_done()
endif
'run_all.cc',
'testdata.cc',
'wiredata.cc',
- dependencies: [gtest],
+ dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
)
-if not NETCONF_DEPS_FOUND
+if not NETCONF_DEP.found()
subdir_done()
endif
'translator_pool.cc',
'translator_shared_network.cc',
'translator_subnet.cc',
- dependencies: NETCONF_DEPS_ARRAY,
+ dependencies: NETCONF_DEP,
include_directories: [include_directories('.')] + INCLUDES,
install: true,
install_dir: 'lib',
-if not gtest.found() or not NETCONF_DEPS_FOUND
+if not TESTS_OPT.enabled() or not NETCONF_DEP.found()
subdir_done()
endif
sysrepo_setup_tests = executable(
'kea-sysrepo-setup-tests',
'sysrepo_setup_tests.cc',
- dependencies: NETCONF_DEPS_ARRAY + [gtest],
+ dependencies: [NETCONF_DEP, GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
override_options: ['cpp_std=c++20'],
)
-if not gtest.found() or not NETCONF_DEPS_FOUND
+if not TESTS_OPT.enabled() or not NETCONF_DEP.found()
subdir_done()
endif
'translator_unittests.cc',
'translator_utils_unittests.cc',
cpp_args: [f'-DCFG_EXAMPLES="@TOP_SOURCE_DIR@/doc/examples"'],
- dependencies: NETCONF_DEPS_ARRAY + [gtest],
+ dependencies: [NETCONF_DEP, GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_yang_tests_libs] + LIBS_BUILT_SO_FAR,
override_options: ['cpp_std=c++20'],
-if not gtest.found() or not NETCONF_DEPS_FOUND
+if not TESTS_OPT.enabled() or not NETCONF_DEP.found()
subdir_done()
endif
kea_yang_testutils_lib = static_library(
'kea-yang-testutils',
'translator_test.cc',
- dependencies: NETCONF_DEPS_ARRAY + [gtest],
+ dependencies: [NETCONF_DEP, GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES,
override_options: ['cpp_std=c++20'],
)
-if not NETCONF_DEPS_FOUND
+if not NETCONF_DEP.found()
subdir_done()
endif
yang_utils_conf_data.set('prefix', PREFIX)
yang_utils_conf_data.set(
'LIBYANG_PREFIX',
- netconf_deps['yang'].get_variable('prefix'),
+ NETCONF_DEP.get_variable('libyang_prefix'),
)
yang_utils_conf_data.set(
'SYSREPO_PREFIX',
- netconf_deps['sysrepo'].get_variable('prefix'),
+ NETCONF_DEP.get_variable('sysrepo_prefix'),
)
configure_file(
--- /dev/null
+project('krb5')
+krb5 = disabler()
+krb5_config = find_program('krb5-config', required: false)
+if krb5_config.found()
+ cflags = run_command([krb5_config, '--cflags', 'gssapi'], check: false)
+ libs = run_command([krb5_config, '--libs', 'gssapi'], check: false)
+ version = run_command([krb5_config, '--version'], check: false)
+ if cflags.returncode() == 0 and libs.returncode() == 0 and version.returncode() == 0
+ krb5_version = version.stdout().strip()
+ krb5 = declare_dependency(
+ compile_args: cflags.stdout().split(),
+ link_args: libs.stdout().split(),
+ version: krb5_version,
+ )
+ endif
+endif
--- /dev/null
+project('log4cplus')
+log4cplus = cpp.find_library('log4cplus', required: false)
--- /dev/null
+project('mysql')
+mysql = disabler()
+if not MYSQL_DEP.found()
+ mysql = dependency('mysql', required: false)
+endif
+foreach mysql_config_file : ['mariadb_config', 'mysql_config']
+ if MYSQL_DEP.found()
+ continue
+ endif
+ mysql_config = find_program(mysql_config_file, required: false)
+ if not mysql_config.found()
+ continue
+ endif
+ cflags = run_command([mysql_config, '--cflags'], check: false)
+ libs = run_command([mysql_config, '--libs'], check: false)
+ version = run_command([mysql_config, '--version'], check: false)
+
+ if cflags.returncode() == 0 and libs.returncode() == 0 and version.returncode() == 0
+ mysql_compile_args = cflags.stdout().split()
+ mysql_link_args = libs.stdout().split()
+ mysql_version = version.stdout().strip()
+ mysql = declare_dependency(
+ compile_args: mysql_compile_args,
+ link_args: mysql_link_args,
+ version: mysql_version,
+ )
+ break
+ endif
+endforeach
+
--- /dev/null
+project('netconf')
+cpp = meson.get_compiler('cpp')
+SYSTEM = build_machine.system()
+
+netconf_deps = {}
+
+foreach dep : ['yang', 'yang-cpp', 'sysrepo', 'sysrepo-cpp']
+ netconf_deps = netconf_deps + {dep: dependency(dep, required: false)}
+ if netconf_deps[dep].found()
+ continue
+ endif
+
+ # Try adding lib to it. libyang and libyang-cpp define the wrong pkg-config.
+ netconf_deps = netconf_deps + {
+ dep: dependency('lib' + dep, required: false),
+ }
+ if netconf_deps[dep].found()
+ continue
+ endif
+
+ # Search in /opt.
+ foreach prefix : ['', 'lib']
+ path = f'/opt/@prefix@@dep@'
+ lib = cpp.find_library(dep, dirs: [f'/@path@/lib'], required: false)
+ if lib.found()
+ netconf_deps = netconf_deps + {
+ dep: declare_dependency(
+ dependencies: [lib],
+ include_directories: include_directories(f'/@path@/include'),
+ variables: {'prefix': f'@path@'},
+ ),
+ }
+ if SYSTEM == 'darwin'
+ add_project_link_arguments(
+ f'-Wl,-rpath,@path@/lib',
+ language: 'cpp',
+ )
+ else
+ add_project_link_arguments(
+ f'-Wl,-rpath=@path@/lib',
+ language: 'cpp',
+ )
+ endif
+ endif
+ endforeach
+endforeach
+
+all_deps_found = true
+foreach dep : ['yang', 'yang-cpp', 'sysrepo', 'sysrepo-cpp']
+ if not netconf_deps[dep].found()
+ all_deps_found = false
+ break
+ endif
+endforeach
+
+if all_deps_found
+ netconf = declare_dependency(
+ dependencies: [
+ netconf_deps['yang'],
+ netconf_deps['yang-cpp'],
+ netconf_deps['sysrepo'],
+ netconf_deps['sysrepo-cpp'],
+ ],
+ variables: {
+ 'libyang_prefix': netconf_deps['yang'].found() ? netconf_deps['yang'].get_variable('prefix') : 'unknown',
+ 'sysrepo_prefix': netconf_deps['sysrepo'].found() ? netconf_deps['sysrepo'].get_variable('prefix') : 'unknown',
+ },
+ )
+else
+ netconf = disabler()
+endif
+
--- /dev/null
+project('postgresql')
+postgresql = disabler()
+pg_config = find_program('pg_config', required: false)
+if pg_config.found()
+ cflags = run_command([pg_config, '--cflags'], check: false)
+ libs = run_command([pg_config, '--libs'], check: false)
+ version = run_command([pg_config, '--version'], check: false)
+ if cflags.returncode() == 0 and libs.returncode() == 0 and version.returncode() == 0
+ pgsql_compile_args = cflags.stdout().split()
+ pgsql_link_args = libs.stdout().split()
+ pgsql_version = version.stdout().strip()
+ postgresql = declare_dependency(
+ compile_args: pgsql_compile_args,
+ link_args: pgsql_link_args,
+ version: pgsql_version,
+ )
+ endif
+endif