mosra / corrade

C++11 multiplatform utility library
https://magnum.graphics/corrade/
Other
486 stars 107 forks source link

PluginManager: fix static test build #158

Closed sthalik closed 1 year ago

sthalik commented 1 year ago

This was preventing cmake configuring from finishing.

mosra commented 1 year ago

Huh? CORRADE_TARGET_WINDOWS and CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT are mutually exclusive, there's never a case when both would be set.

sthalik commented 1 year ago

Why not? It's working on my end with no further modifications with clang/lld, gcc/binutils and msvc.

sthalik commented 1 year ago

If there are any edge cases in some of the plugins that I'm not using (only stb and tga importers right now), I might be able to fix them on win32 and send a pull request for that. Then the option doesn't have to remain exclusive with win32.

The goal is to have a monolithic binary.

mosra commented 1 year ago

There's never a case when both would be set. The variable is set for platforms that don't have a (practically usable) concept of a dynamically loadable library, such as Emscripten or Android.

Or are you setting CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT yourself? :scream: You're not supposed to do that. You're supposed to use MAGNUM_BUILD_PLUGINS_STATIC instead.

sthalik commented 1 year ago

I'm using it. The goal is to remove any possible calls to stale plugins that might exist. And also remove the message on stderr about plugin search paths.

mosra commented 1 year ago

That's not a supported use case, sorry. I'm not interested in the extra burden of maintaining that.

Setting the plugin directory to, say, "nonexistent", in the constructor, is the supported way currently. There might eventually be an explicit option to disable static plugins, but so far I'm not planning that.