diff --git a/NEWS b/NEWS index 6c006bfcf..4867b2948 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,9 @@ DFHack future - Fixes: - hack-wish should work now. + Internals: + - 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 diff --git a/library/PluginManager.cpp b/library/PluginManager.cpp index 28d57c76f..ad390d507 100644 --- a/library/PluginManager.cpp +++ b/library/PluginManager.cpp @@ -696,7 +696,11 @@ void PluginManager::init(Core * core) { #ifdef LINUX_BUILD string path = core->getHackPath() + "plugins/"; +#ifdef _DARWIN + const string searchstr = ".plug.dylib"; +#else const string searchstr = ".plug.so"; +#endif #else string path = core->getHackPath() + "plugins\\"; const string searchstr = ".plug.dll"; diff --git a/plugins/Plugins.cmake b/plugins/Plugins.cmake index 832ebebec..e5d0c3bae 100644 --- a/plugins/Plugins.cmake +++ b/plugins/Plugins.cmake @@ -93,7 +93,9 @@ MACRO(DFHACK_PLUGIN) TARGET_LINK_LIBRARIES(${PLUGIN_NAME} dfhack ${PLUGIN_LINK_LIBRARIES}) 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 "") ELSE() SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES SUFFIX .plug.dll)