endif
+# Add RPATH information when building for a non-standard prefix, or
+# when explicitly requested to do so
+
+if prefix == '/usr' and not get_option('rpath').enabled()
+ libvirt_rpath = ''
+else
+ libvirt_rpath = libdir
+endif
+
+
# figure out libvirt version strings
arr_version = meson.project_version().split('.')
option('expensive_tests', type: 'feature', value: 'auto', description: 'set the default for enabling expensive tests (long timeouts), use VIR_TEST_EXPENSIVE to override')
option('test_coverage', type: 'boolean', value: false, description: 'turn on code coverage instrumentation')
option('git_werror', type: 'feature', value: 'auto', description: 'use -Werror if building from GIT')
+option('rpath', type: 'feature', value: 'auto', description: 'whether to include rpath information in installed binaries and libraries')
# build dependencies options
libvirt_qemu_syms_file,
],
install: true,
- install_rpath: libdir,
+ install_rpath: libvirt_rpath,
version: libvirt_lib_version,
soversion: libvirt_so_version,
)
libvirt_lxc_syms_file,
],
install: true,
- install_rpath: libdir,
+ install_rpath: libvirt_rpath,
version: libvirt_lib_version,
soversion: libvirt_so_version,
)
libvirt_admin_syms_file,
],
install: true,
- install_rpath: libdir,
+ install_rpath: libvirt_rpath,
version: libvirt_lib_version,
soversion: libvirt_so_version,
)
],
install: true,
install_dir: module.get('install_dir', libdir / 'libvirt' / 'connection-driver'),
- install_rpath: libdir,
+ install_rpath: libvirt_rpath,
)
set_variable('@0@_module'.format(module['name'].underscorify()), mod)
endforeach
],
install: true,
install_dir: sbindir,
- install_rpath: libdir,
+ install_rpath: libvirt_rpath,
)
endforeach
],
install: true,
install_dir: helper.get('install_dir', libexecdir),
- install_rpath: libdir,
+ install_rpath: libvirt_rpath,
)
endforeach
],
install: true,
install_dir: bindir,
- install_rpath: libdir,
+ install_rpath: libvirt_rpath,
)
endif
],
install: true,
install_dir: libexecdir,
- install_rpath: libdir,
+ install_rpath: libvirt_rpath,
)
install_data('virt-login-shell.conf', install_dir: sysconfdir / 'libvirt')
],
install: true,
install_dir: bindir,
- install_rpath: libdir,
+ install_rpath: libvirt_rpath,
)
executable(
],
install: true,
install_dir: bindir,
- install_rpath: libdir,
+ install_rpath: libvirt_rpath,
)
tools_conf = configuration_data()