Merge remote-tracking branch 'lethosor/osx-plug-dylib'

Conflicts:
	NEWS
develop
expwnent 2014-09-08 13:14:28 -04:00
commit f5039b37b8
3 changed files with 11 additions and 3 deletions

@ -1,7 +1,9 @@
DFHack future DFHack future
Fixes: Internals:
hack-wish should work now. - Plugins on OS X now use ".plug.dylib" as an extension instead of ".plug.so"
Fixes:
- hack-wish should work now
DFHack v0.40.10-r1 DFHack v0.40.10-r1

@ -696,7 +696,11 @@ void PluginManager::init(Core * core)
{ {
#ifdef LINUX_BUILD #ifdef LINUX_BUILD
string path = core->getHackPath() + "plugins/"; string path = core->getHackPath() + "plugins/";
#ifdef _DARWIN
const string searchstr = ".plug.dylib";
#else
const string searchstr = ".plug.so"; const string searchstr = ".plug.so";
#endif
#else #else
string path = core->getHackPath() + "plugins\\"; string path = core->getHackPath() + "plugins\\";
const string searchstr = ".plug.dll"; const string searchstr = ".plug.dll";

@ -93,7 +93,9 @@ MACRO(DFHACK_PLUGIN)
TARGET_LINK_LIBRARIES(${PLUGIN_NAME} dfhack ${PLUGIN_LINK_LIBRARIES}) TARGET_LINK_LIBRARIES(${PLUGIN_NAME} dfhack ${PLUGIN_LINK_LIBRARIES})
ENDIF() ENDIF()
IF(UNIX) IF(APPLE)
SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES SUFFIX .plug.dylib PREFIX "")
ELSEIF(UNIX)
SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES SUFFIX .plug.so PREFIX "") SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES SUFFIX .plug.so PREFIX "")
ELSE() ELSE()
SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES SUFFIX .plug.dll) SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES SUFFIX .plug.dll)