[CImgPlugin, Flexible, image, CImg] Refactor CImg & CImgPlugin #562
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactor CImg & CImgPlugin and fix the code that depend on it.
The general problem is that CImg is header only library thus the
multiple inclusion of the code in multiple dll seems to cause trouble
on the mutexes initialization causing the crash & failure when two plugins compile
with CImg & CImgPlugin are loaded (eg image, flexible).
To avoid this scenario, CImg is moved into the CImgPlugin that
hold the mutex and other code needs to include #include<CImgPlugin/SOFACImg.h>
instead of the raw CImg.
This PR is resulting from the split of #548 (for clearity and to ease reviewing).
This PR:
Reviewers will merge only if all these checks are true.