Set MACOSX_RPATH to 1

This allows plugins with vmethod hooks to be reloaded on OS X by making paths
embedded in shared libraries use @rpath instead of embedding the build 
directory, which avoids the need to change them them later. Modifying paths in
libdfhack.dylib caused it to be reloaded, which prevented hooks from working.
develop
Lethosor 2015-04-18 11:40:20 -04:00
parent 3ca00f85d0
commit 6c72a0850d
1 changed files with 1 additions and 0 deletions

@ -118,6 +118,7 @@ ADD_DEFINITIONS(-DLUA_BUILD_AS_DLL)
if(APPLE)
add_definitions(-D_DARWIN)
set(CMAKE_MACOSX_RPATH 1)
elseif(UNIX)
add_definitions(-D_LINUX)
elseif(WIN32)