From: 이성재/동작제어Lab(SR)/Principal Engineer/삼성전자 Date: Fri, 20 Jul 2018 07:49:01 +0000 (+0900) Subject: Apply shared library extension name according to OS (#696) X-Git-Tag: nncc_backup~2362 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d5aa3b13e1222e55af17363f44ec107eff5379f;p=platform%2Fcore%2Fml%2Fnnfw.git Apply shared library extension name according to OS (#696) * apply dll extension name according to OS in PR test. Signed-off-by: Sung-Jae Lee --- diff --git a/contrib/nnc/src/module/plugin/PluginManager.cpp b/contrib/nnc/src/module/plugin/PluginManager.cpp index 18184c8..66cfc34 100644 --- a/contrib/nnc/src/module/plugin/PluginManager.cpp +++ b/contrib/nnc/src/module/plugin/PluginManager.cpp @@ -10,6 +10,12 @@ #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 @@ -43,7 +49,7 @@ std::vector PluginManager::getPluginPathList() { (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); }