Draft: Allow poppler dll on Windows by creating export headers
I noticed that on MSVC the poppler library cannot be built as a dll.
Also, poppler-cpp, poppler-qt5 and poppler-qt6 are always tagged with
__declspec(dllimport) when built as a static library on Windows.
I used CMake's GenerateExportHeader to generate an export header.
This requires to tag every symbol with
POPPLER_EXPORT to export it or not.
By using this, it also enables to hide or deprecate symbols using
This will make the build behave the same on all platforms.
- I renamed
PROJECT_SOURCE_DIR/PROJECT_BINARY_DIRto enable building poppler as a subproject.
- Optionally build the tests. They are still built by default.
- Include directories of iconv. When using conan, libiconv is located in a non-standard location. This means that its include directories must be included.
I tested this using MSVC2017 and gcc9 (on Linux)