From add8216df607db8152a38773b201dcb7e6656086 Mon Sep 17 00:00:00 2001 From: Petri Latvala Date: Fri, 19 Jan 2018 13:44:07 +0200 Subject: meson: Set up runpath for installed executables Meson builds libigt as a shared library, and executables naturally have to find it at runtime. Using default options puts the library to a normal search paths, but any modifications to the directory options or a non-conventional prefix setting makes using LD_LIBRARY_PATH or other library search means mandatory. Add a build option 'use_rpath' (default: false) that makes meson set up DT_RUNPATH at install time, pointing to the library with a path relative to the executable, using $ORIGIN. That way the installed executables find the library even when not installed to exactly the build-time configured prefix path, a setup CI occasionally uses. Signed-off-by: Petri Latvala Cc: Tomi Sarvela Cc: Arkadiusz Hiler Acked-by: Daniel Vetter Reviewed-by: Arkadiusz Hiler Tested-by: Arkadiusz Hiler --- meson_options.txt | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 meson_options.txt (limited to 'meson_options.txt') diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 00000000..41be35e0 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,4 @@ +option('use_rpath', + type : 'boolean', + value : false, + description : 'Set runpath on installed executables for libigt.so') -- cgit v1.2.3