[osg-users] freetype build support on Windows

Stuart Mentzer osgforum at tevs.eu
Fri Jun 3 15:32:53 PDT 2016


Hi Robert,

Here's what I found doing release and debug builds from yersterday's git master code with Visual C++ 2015:

freetype even using -DWITH_PNG=OFF will still try to include png.h and for some reason requires ftoption.h (both copies) to be modified (or overridden) to comment out the line:
#define FT_CONFIG_OPTION_USE_PNG
This is unfortunate and actually makes it easier to build freetype with PNG support. With the freetype mods OSG builds including the freetype plugin. Configuring freetype with or without PNG support is up to the builder but it would be good if the CMakeLists.txt could handle both situations without needing changes like I made.

The freetype build headers under include\freetype2\freetype even though freetype doesn't use that freetype2 layer anymore. Not a big deal since OSG doesn't really need to ship with freetype or other 3rd party lib headers.

The debug build is able to build freetype with the same mods but the OSG build doesn't find it:
-- Could NOT find Freetype (missing:  FREETYPE_LIBRARY) (found version "2.6.3")
which I assume is due to not looking for the name freetyped, as I found with my OSG 3.4.0 build. So the OSG build can complete but it won't build the freetype plugin.

The debug build fails at "Installing the project..." because it appears something is wrong with the new pdb installation support:
-- Installing: C:/OSG.VC.xd/bin/osgd.dll
CMake Error at src/osg/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Projects/OSG/VC.xd/OSG/src/osg/PREFIX-NOTFOUNDosgd.pdb".
Call Stack (most recent call first):
  src/cmake_install.cmake:33 (include)
  cmake_install.cmake:100 (include)
The osgd.pdb file is present and next to osgd.dll as expected.

I see that others are reporting success with the Visual C++ 2015 build but I don't know how they are addressing the freetype PNG issues or if they tried the debug build yet. It looks like there are still some issues but maybe they will offer some input here. I'm happy to make another pass if that helps.

Stuart

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67406#67406








More information about the osg-users mailing list