diff --git a/hook/meson.build b/hook/meson.build index 9243ff0..e8f859e 100644 --- a/hook/meson.build +++ b/hook/meson.build @@ -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'] diff --git a/meson.build b/meson.build index 3687791..71f5943 100644 --- a/meson.build +++ b/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