mirror of
https://github.com/opencv/opencv.git
synced 2024-11-26 20:20:20 +08:00
highgui: force loading of imgcodecs module
- required for plugins on Linux (they use imwrite, but there is no link dependency)
This commit is contained in:
parent
76e9da3fe9
commit
3e538355e2
@ -232,8 +232,12 @@ std::vector<FileSystemPath_t> getPluginCandidates(const std::string& baseName)
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NB: require loading of imgcodecs module
|
||||||
|
static void* g_imwrite = (void*)imwrite;
|
||||||
|
|
||||||
void PluginUIBackendFactory::loadPlugin()
|
void PluginUIBackendFactory::loadPlugin()
|
||||||
{
|
{
|
||||||
|
CV_Assert(g_imwrite);
|
||||||
for (const FileSystemPath_t& plugin : getPluginCandidates(baseName_))
|
for (const FileSystemPath_t& plugin : getPluginCandidates(baseName_))
|
||||||
{
|
{
|
||||||
auto lib = std::make_shared<cv::plugin::impl::DynamicLib>(plugin);
|
auto lib = std::make_shared<cv::plugin::impl::DynamicLib>(plugin);
|
||||||
|
Loading…
Reference in New Issue
Block a user