Compling PodoFo library on MingW using CMake

Nov 20, 2013 at 3:39pm
I am trying to build PoDoFo Library on my Windows Platform (for use as an API). It is done using CMake. The 'ReadMe' file says the following. Unfortunately I am new to CMake and I can't make out much from it.

Building PoDoFo on Windows

CMake 2.6.x is required for Windows. You can download it from
cmake.org .

On Windows, PoDoFo may be built as either a shared or static library.
Building both is not supported. By default only the shared library
will be built. If you want a static library, just disable generation
of the shared library with the extra argument to cmake:
-DPODOFO_BUILD_SHARED=FALSE


Handling library naming on win32

Especially on Windows it is also common for custom built libraries to
have different names to those you might download as pre-built copies.
CMake won't be able to find them if they're called something else
unless you tell it. Use these variables to tell CMake what names to
look for a library under:


1
2
3
4
•FREETYPE_LIBRARY_NAMES_DEBUG, FREETYPE_LIBRARY_NAMES_RELEASE and FREETYPE_LIBRARY_NAMES
•TIFF_LIBRARY_NAMES_DEBUG, TIFF_LIBRARY_NAMES_RELEASE and TIFF_LIBRARY_NAMES 
•LIBJPEG_LIBRARY_NAMES_DEBUG, LIBJPEG_LIBRARY_NAMES_RELEASE and LIBJPEG_LIBRARY_NAMES
•ZLIB_LIBRARY_NAMES_DEBUG, ZLIB_LIBRARY_NAMES_RELEASE,ZLIB_LIBRARY_NAMES


CMake builds on Windows with MinGW

Once MinGW is set up, make sure that the MinGW "bin" directory is on
your PATH, and be sure to set CMAKE_INCLUDE_PATH and
CMAKE_LIBRARY_PATH such that CMake can find the headers and .lib files
for the libraries PoDoFo requires. The GnuWin32 library packages from
http://gnuwin32.sf.net/ are known to work with PoDoFo, so installing
zlib, freetype, and libjpeg from there should do the trick.

To configure and build PoDoFo with a default GnuWin32 install and with
MinGW already on your PATH:


1
2
3
md ..\podofo-debug 
cd ..\podofo-debug
cmake -G "MinGW Makefiles" ..\podofo-src -DCMAKE_INCLUDE_PATH=c:\progra~1\gnuwin32\include -DCMAKE_LIBRARY_PATH=c:\progra~1\gnuwin32\lib -DPODOFO_BUILD_SHARED:BOOL=FALSE mingw32-make


I have installed `CMake` and downloaded the other libraries mentioned like `freetype, zlib, libjpeg`. Their header and binary files are in their respective folders.

Now what should DCMAKE_INCLUDE_PATH and DCMAKE_LIBRARY_PATH be? Also what is "MinGW Makefiles"? Do I have to supply any extra parameters?

I'll be grateful if someone can explain in simple steps how I can go about it.
Topic archived. No new replies allowed.