Since it's better late than never, let me share what I found about building a Static version of the library with Visual Studio.
Download the PoDoFo project from GitHub
https://github.com/podofo/podofo
Download the precompiled 3rd party Dependencies from GitHub
https://github.com/podofo/podofo-deps
I personally placed both folders in C:\PoDoFoProj, so if you use another directory, make the required adjustments when building later.
The structure we have so far is
C:\PoDoFoProj\podofo-deps-master
C:\PoDoFoProj\podofo-master
Now there is one little adjustmet that has to be made -
Copy the 4 lib files from
C:\PoDoFoProj\podofo-deps-master\3rdparty\openssl\lib\Win64
to
C:\PoDoFoProj\podofo-deps-master\3rdparty\openssl\lib\
This is a workaround for the problem I have reported here - https://github.com/podofo/podofo/issues/57
Make a "build" dir in the podofo-master dir (the path should be C:\PoDoFoProj\podofo-master\build)
Using the command prompt navigate to that directory, and type:
cmake .. -DZLIB_LIBRARY="C:\PoDoFoProj\podofo-deps-master\3rdparty\zlib\lib\Win64\zlib.lib" -DZLIB_INCLUDE_DIR=C:\PoDoFoProj\podofo-deps-master\3rdparty\zlib\include -DPODOFO_BUILD_STATIC=TRUE -DOPENSSL_ROOT_DIR=C:\PoDoFoProj\podofo-deps-master\3rdparty\openssl -DJPEG_LIBRARY=C:\PoDoFoProj\podofo-deps-master\3rdparty\libjpeg\lib\Win64\jpeg.lib -DJPEG_INCLUDE_DIR="C:\PoDoFoProj\podofo-deps-master\3rdparty\libjpeg\include" -DTIFF_LIBRARY=C:\PoDoFoProj\podofo-deps-master\3rdparty\libtiff\lib\Win64\tiff.lib -DTIFF_INCLUDE_DIR=C:\PoDoFoProj\podofo-deps-master\3rdparty\libtiff\include -DPNG_LIBRARY=C:\PoDoFoProj\podofo-deps-master\3rdparty\libpng\lib\Win64\png.lib -DPNG_PNG_INCLUDE_DIR=C:\PoDoFoProj\podofo-deps-master\3rdparty\libpng\include -DLIBIDN_INCLUDE_DIR=C:\PoDoFoProj\podofo-deps-master\3rdparty\libidn\include -DLIBIDN_LIBRARY=C:\PoDoFoProj\podofo-deps-master\3rdparty\libidn\lib\Win64\idn.lib -DFREETYPE_LIBRARY=C:\PoDoFoProj\podofo-deps-master\3rdparty\freetype\lib\Win64\freetype.lib -DFREETYPE_INCLUDE_DIRS=C:\PoDoFoProj\podofo-deps-master\3rdparty\freetype\include\freetype2 -DFontconfig_LIBRARY=C:\PoDoFoProj\podofo-deps-master\3rdparty\fontconfig\lib\Win64\fontconfig.lib -DFontconfig_INCLUDE_DIR=C:\PoDoFoProj\podofo-deps-master\3rdparty\fontconfig\include -DLIBXML2_LIBRARY=C:\PoDoFoProj\podofo-deps-master\3rdparty\libxml2\lib\Win64\libxml2.lib -DLIBXML2_INCLUDE_DIR=C:\PoDoFoProj\podofo-deps-master\3rdparty\libxml2\include
Then the Visual Studio solution will appear here - C:\PoDoFoProj\podofo-master\build\PoDoFo.sln
Open it to build the HelloWorld example.
(Optionally set the projects 'podofo_private' and 'podofo_static' to use /MP - they are pretty big and multi-processor compilation would speed up the process significantly)
Edit, May 2023
- The CMake argument for Static Build has been changed to -DPODOFO_BUILD_STATIC=TRUE
- When compiling with Visual Studio, "Enable Unity (Jumbo) Build" from the project configuration makes the compilation much faster than just /MP