Make plugins use ".plug.dylib" extension on OS X

develop
lethosor 2014-08-30 09:21:19 -04:00
parent 948fbb48f6
commit 9aee476c6e
2 changed files with 7 additions and 1 deletions

@ -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";

@ -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)