RUNSTATEDIR_INSTALLED = PREFIX / RUNSTATEDIR
TEST_CA_DIR = TOP_SOURCE_DIR / 'src/lib/asiolink/testutils/ca'
+# Meson is annoying with its opinionated alteration of certain paths based on whether prefix is default or not.
+# So we revert what it does.
+# Prepend prefix only if the prefix was explicitly provided.
+if PREFIX == '/usr'
+ SYSCONFDIR_INSTALLED = SYSCONFDIR
+else
+ SYSCONFDIR_INSTALLED = PREFIX / SYSCONFDIR
+endif
+
#### Build Options
crypto_opt = get_option('crypto')
'radius_service.cc',
'radius_utils.cc',
'version.cc',
- cpp_args: [f'-DDICTIONARY="@PREFIX@/@SYSCONFDIR@/kea/radius/dictionary"'],
+ cpp_args: [f'-DDICTIONARY="@SYSCONFDIR_INSTALLED@/kea/radius/dictionary"'],
dependencies: [CRYPTO_DEP],
include_directories: [include_directories('.')] + INCLUDES,
install: true,
'utils_unittests.cc',
cpp_args: [
f'-DTEST_DATA_BUILDDIR="@current_build_dir@"',
- f'-DDICTIONARY="@PREFIX@/@SYSCONFDIR@/kea/radius/dictionary"',
+ f'-DDICTIONARY="@SYSCONFDIR_INSTALLED@/kea/radius/dictionary"',
f'-DTEST_DICTIONARY="@TOP_SOURCE_DIR@/src/hooks/dhcp/radius/data/dictionary"',
],
dependencies: [GTEST_DEP, CRYPTO_DEP],