1diff --git a/libmalcontent/tests/meson.build b/libmalcontent/tests/meson.build
2index a8a815a..0b1d242 100644
3--- a/libmalcontent/tests/meson.build
4+++ b/libmalcontent/tests/meson.build
5@@ -61,9 +61,9 @@ test_programs = [
6 ], deps],
7 ]
8
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)
15
16 foreach program: test_programs
17@@ -94,4 +94,4 @@ foreach program: test_programs
18 env: envs,
19 args: ['--tap'],
20 )
21-endforeach
22\ No newline at end of file
23+endforeach
24diff --git a/meson_options.txt b/meson_options.txt
25index 96a517d..7cb1ee8 100644
26--- a/meson_options.txt
27+++ b/meson_options.txt
28@@ -3,4 +3,5 @@ option(
29 type: 'boolean',
30 value: false,
31 description: 'enable installed tests'
32-)
33\ No newline at end of file
34+)
35+option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')