#include "PluginException.h"
#include "ConfigException.h"
+#ifdef __APPLE__
+#define STR_EXTENSION_PLUGIN ".dylib"
+#else /* !__APPLE__ */
+#define STR_EXTENSION_PLUGIN ".so"
+#endif /* __APPLE__ */
+
namespace nncc
{
namespace contrib
(std::string(ent->d_name) != "..")) {
std::string f = curPluginsPath + std::string("/") + std::string(ent->d_name);
dirList.push_back(f);
- } else if (strstr(ent->d_name, ".so") != nullptr) {
+ } else if (strstr(ent->d_name, STR_EXTENSION_PLUGIN) != nullptr) {
std::string f = curPluginsPath + std::string("/") + std::string(ent->d_name);
pluginPathList.push_back(f);
}