You've already forked libmali-rockchip
mirror of
https://github.com/armbian/libmali-rockchip.git
synced 2026-01-06 12:03:41 -08:00
meson: Fix rpath error
Fix the issue where rpath introduces absolute paths when building outside the source directory. Change-Id: I4d5fd66211e0fea5ce0dc8fd0d1bb2e32bd0fc6f Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
@@ -22,7 +22,6 @@ libhook_cflags = [
|
||||
]
|
||||
|
||||
libhook_dep = [
|
||||
mali,
|
||||
dependency('threads'),
|
||||
cc.find_library('dl', required : false),
|
||||
dependency('libdrm', version : '>= 2.4.0'),
|
||||
@@ -65,8 +64,8 @@ libhook = shared_library(
|
||||
c_args : libhook_cflags,
|
||||
include_directories : libhook_inc,
|
||||
dependencies : libhook_dep,
|
||||
link_with : libmali,
|
||||
install : true,
|
||||
install_rpath : '$ORIGIN',
|
||||
version : mali_version)
|
||||
|
||||
libhook_ldflags = ['-L${libdir}', '-lmali-hook']
|
||||
|
||||
23
meson.build
23
meson.build
@@ -189,17 +189,6 @@ map = {
|
||||
'vulkan' : ['vk_icdGetInstanceProcAddr', vk_wrappers, {}, mali_version],
|
||||
}
|
||||
|
||||
libhook = []
|
||||
if build_hook
|
||||
# Build hook library
|
||||
subdir('hook')
|
||||
|
||||
# Recommend to link hook library before libmali
|
||||
mali_ldflags = libhook_ldflags
|
||||
else
|
||||
mali_ldflags = []
|
||||
endif
|
||||
|
||||
# Create dummy source for building dummy libraries
|
||||
dummy_source = join_paths(meson.current_build_dir(), 'dummy.c')
|
||||
run_command('touch', dummy_source, check : false)
|
||||
@@ -211,6 +200,17 @@ libmali = shared_library(
|
||||
install : true,
|
||||
version : mali_version)
|
||||
|
||||
libhook = []
|
||||
if build_hook
|
||||
# Build hook library
|
||||
subdir('hook')
|
||||
|
||||
# Recommend to link hook library before libmali
|
||||
mali_ldflags = libhook_ldflags
|
||||
else
|
||||
mali_ldflags = []
|
||||
endif
|
||||
|
||||
mali_ldflags += ['-L${libdir}', '-lmali']
|
||||
|
||||
pkgconfig.generate(
|
||||
@@ -256,7 +256,6 @@ foreach name, values : map
|
||||
link_with : [libhook, libmali],
|
||||
install : true,
|
||||
install_dir : wrapper_libdir,
|
||||
install_rpath : '$ORIGIN',
|
||||
version : version)
|
||||
endforeach
|
||||
|
||||
|
||||
Reference in New Issue
Block a user