Skip to content
  • Petri Latvala's avatar
    meson: Set up runpath for installed executables · add8216d
    Petri Latvala authored
    
    
    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: default avatarPetri Latvala <petri.latvala@intel.com>
    Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
    Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
    Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Reviewed-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
    Tested-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
    add8216d