]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3731] Add rpath for hook libraries
authorAndrei Pavel <andrei@isc.org>
Tue, 18 Mar 2025 09:17:10 +0000 (11:17 +0200)
committerAndrei Pavel <andrei@isc.org>
Tue, 18 Mar 2025 09:17:10 +0000 (11:17 +0200)
meson.build

index 363754d8241c3d556efe96be9caac1869001275d..d5a79bf79a8cac68331ae495285a0febfbffe79e 100644 (file)
@@ -471,15 +471,16 @@ compile_args = []
 link_args = []
 
 # $ORIGIN documented at https://www.man7.org/linux/man-pages/man8/ld.so.8.html
-rpath = '$ORIGIN/../lib'
+rpath1 = '$ORIGIN/../lib'  # rpath for executables
+rpath2 = '$ORIGIN/../..'  # rpath for hook libraries
 if SYSTEM == 'darwin'
     compile_args += ['-D__APPLE_USE_RFC_3542']
     add_project_arguments('-D__APPLE_USE_RFC_3542', language: 'cpp')
-    link_arg = f'-Wl,-rpath,@rpath@'
+    link_arg = f'-Wl,-rpath,@rpath1@,-rpath,@rpath2@'
     link_args += [link_arg]
     add_project_link_arguments(link_arg, language: 'cpp')
 else
-    link_arg = f'-Wl,-rpath=@rpath@'
+    link_arg = f'-Wl,-rpath=@rpath1@,-rpath=@rpath2@'
     link_args += [link_arg]
     add_project_link_arguments(link_arg, language: 'cpp')
 endif