Skip to content

Commit

Permalink
capnproto: fix rpath of installed libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxu committed Sep 27, 2021
1 parent 4bac3a7 commit 50bf8a2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion recipes/capnproto/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,17 @@ def _configure_autotools(self):
]
if tools.Version(self.version) >= "0.8.0":
args.append("--with-zlib" if self.options.with_zlib else "--without-zlib")

self._autotools = AutoToolsBuildEnvironment(self)
self._autotools.configure(args=args, configure_dir=os.path.join(self._source_subfolder, "c++"))

# Fix rpath on macOS
configure_dir = os.path.join(self._source_subfolder, "c++")
configure_path = os.path.join(configure_dir, "configure")
if self.settings.os == "Macos":
tools.replace_in_file(configure_path, r"-install_name \$rpath/", "-install_name @rpath/")
self._autotools.link_flags += ["-Wl,-rpath", "-Wl,@loader_path/../lib"]

self._autotools.configure(args=args, configure_dir=configure_dir)
return self._autotools

def build(self):
Expand Down

0 comments on commit 50bf8a2

Please sign in to comment.