Building on windows

redwyre edited this page Oct 9, 2010 · 5 revisions

Download the c10t source code and extract it to a directory. Create a lib folder in the directory as well.

Download the CMake installer from http://www.cmake.org/cmake/resources/software.html and install it

Download lpng source from http://www.libpng.org/pub/png/libpng.html (http://prdownloads.sourceforge.net/libpng/lpng144.zip?download) and extract it to lib\lpng144

Download zlib source from http://www.zlib.net/ (http://prdownloads.sourceforge.net/libpng/zlib125.zip?download) and extract it to lib\zlib-1.2.5

Download boost source from http://www.boost.org/users/download/ (http://sourceforge.net/projects/boost/files/boost/1.44.0/boost_1_44_0.zip/download) and extract it to lib\boost_1_44_0

Download freetype2 developer files from http://gnuwin32.sourceforge.net/packages/freetype.htm (http://sourceforge.net/projects/gnuwin32/files/freetype/2.3.5-1/freetype-2.3.5-1-lib.zip/download) and extract it to lib\freetype-2.3.5 (This isn't the latest version but is MUCH easier than building it yourself)

Building

zlib needs to be build first.

  • Run the CMake Gui, and point it to lib/zlib-1.2.5 and set lib/zlib-1.2.5/build as the build dir.
  • Delete lib\zlib-1.2.5\zconf.h
  • Click configure.
  • Set CMAKE_INSTALL_PREFIX to lib/zlib-1.2.5/build
  • Set EXECUTABLE_OUTPUT_PATH to lib/zlib-1.2.5/build
  • Set LIBRARY_OUTPUT_PATH to lib/zlib-1.2.5/build
  • Click generate.
  • Copy zconf.h from lib/zlib-1.2.5/build into lib/zlib-1.2.5
  • Open the solution in lib/zlib-1.2.5/build and build the ALL_BUILD project in Release.

lpng

  • Run the CMake Gui, and point it to lib/lpng144 and set lib/lpng144/build as the build dir.
  • Click configure, you will get errors.
  • Check "Advanced"
  • Find "ZLIB_INCLUDE_DIR" and set it to lib/zlib-1.2.5
  • Find "ZLIB_LIBRARY" and set it to lib\zlib-1.2.5\build\Release\zlib.lib
  • Click configure again.
  • Click generate.
  • Open the solution in lib\lpng144\build and build the ALL_BUILD project in Release.

boost

  • Run lib\boost_1_44_0\bootstrap.bat
  • Run lib\boost_1_44_0\bjam.exe
  • Wait

c10t

  • Add "/D_CRT_SECURE_NO_WARNINGS" to the end of CMAKE_CXX_FLAGS
  • Set ZLIB_INCLUDE_DIR to lib/zlib-1.2.5
  • Set ZLIB_LIBRARY to lib/zlib-1.2.5/build/Release/zlib.lib
  • Set PNG_LIBRARY to lib/lpng144/build/Release/libpng14_static.lib
  • Set PNG_PNG_INCLUDE_DIR to lib/lpng144
  • Set BOOST_ROOT to lib/boost_1_44_0
  • Set Boost_USE_STATIC_LIBS to true
  • Set FREETYPE_INCLUDE_DIR_freetype2 to lib/freetype-2.3.5/include/freetype2
  • Set FREETYPE_INCLUDE_DIR_ft2build to lib/freetype-2.3.5/include
  • Set FREETYPE_LIBRARY to lib/freetype-2.3.5/lib/freetype.lib
  • Open the solution in build and build the ALL_BUILD project in Release.