2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-22 09:57:41 +00:00

[#3732] Prepend prefix only if the prefix is explicitly provided

This commit is contained in:
Andrei Pavel 2025-04-01 12:37:58 +03:00
parent 1f75fb2b0d
commit 73ffdd95ee
No known key found for this signature in database
GPG Key ID: D4E804481939CB21
3 changed files with 11 additions and 2 deletions

View File

@ -65,6 +65,15 @@ RUNSTATEDIR = LOCALSTATEDIR / 'run/kea'
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')

View File

@ -25,7 +25,7 @@ dhcp_radius_lib = shared_library(
'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,

View File

@ -27,7 +27,7 @@ dhcp_radius_tests = executable(
'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],