1 diff --git a/libmalcontent/tests/meson.build b/libmalcontent/tests/meson.build
2 index 610bc35..13e0713 100644
3 --- a/libmalcontent/tests/meson.build
4 +++ b/libmalcontent/tests/meson.build
5 @@ -72,9 +72,9 @@ test_programs = [
9 -installed_tests_metadir = join_paths(datadir, 'installed-tests',
10 +installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests',
11 'libmalcontent-' + libmalcontent_api_version)
12 -installed_tests_execdir = join_paths(libexecdir, 'installed-tests',
13 +installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests',
14 'libmalcontent-' + libmalcontent_api_version)
16 foreach program: test_programs
17 @@ -105,4 +105,4 @@ foreach program: test_programs
22 \ No newline at end of file
24 diff --git a/meson_options.txt b/meson_options.txt
25 index d516c70..583cb94 100644
26 --- a/meson_options.txt
27 +++ b/meson_options.txt
28 @@ -4,6 +4,12 @@ option(
30 description: 'enable installed tests'
33 + 'installed_test_prefix',
36 + description: 'Prefix for installed tests'
41 diff --git a/pam/tests/meson.build b/pam/tests/meson.build
42 index 0560dcb..a74dab2 100644
43 --- a/pam/tests/meson.build
44 +++ b/pam/tests/meson.build
45 @@ -12,9 +12,9 @@ test_programs = [
46 ['pam_malcontent', [], deps],
49 -installed_tests_metadir = join_paths(datadir, 'installed-tests',
50 +installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests',
51 'libmalcontent-' + libmalcontent_api_version)
52 -installed_tests_execdir = join_paths(libexecdir, 'installed-tests',
53 +installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests',
54 'libmalcontent-' + libmalcontent_api_version)
56 foreach program: test_programs