]> granicus.if.org Git - libevent/commit
Fix RPATH for APPLE
authorTrond Norbye <trond.norbye@gmail.com>
Tue, 21 Feb 2017 11:54:02 +0000 (12:54 +0100)
committerAzat Khuzhin <azat@libevent.org>
Sat, 2 Feb 2019 12:13:48 +0000 (15:13 +0300)
commit45b1f379d42441456357f0b22cd6397c716cf094
tree0c78a273f016dd18301a560b5f82ee20c9597dd1
parentd3e1c440c9b27bee6b23f5c85dafd99317f5dc52
Fix RPATH for APPLE

By setting the CMake minimum version to 3.1 CMake automatically
adds the correct magic to make the library relocatable on
the filesystem (instead of burning the location of the library
at link time into the binary).

ex:
otool -L bin/http-connect
bin/http-connect:
@rpath/libevent_extra.2.2.0.dylib (compatibility version 2.2.0, current version 0.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)

Fixes: #468 (cherry-picked)
(cherry picked from commit cc0e04d798643b76ce1874213cb6cc3b2c6b5ac4)
CMakeLists.txt