[osg-users] freetype build support on Windows

Robert Osfield robert.osfield at gmail.com
Wed Jun 1 08:05:17 PDT 2016


Hi Stuart,

I have now checked in my changes to build the OSG using CMake's
FindFreetype.cmake rather than the OSG's native one, I deleted the
later as well as change the src/osgPlugins/freetype/CmakeListst.txt.
I have tested this under Kubuntu 16.04 so far.

After checking the changes in I am now starting to think that using
the standard Windows 3rd party depdencies package and the associated
Find3rdPartyDependencies.cmake might not set up the variables in the
same way as CMake's FindFreetype.cmake so could lead to problems.  In
particular I don't think the FREETYPE_LIBRARIES var usage that I've
introduced will work with the Find3rdPartyDependencies.cmake that will
be just setting the FREETYPE_LIBRARY var.

I think Find3rdPartyDependencies.cmake should be creating a
FREETYPE_LIBRARIES var as well, but am not a CMake guru so will need
to look up the rules for doing this.

Robert.

On 1 June 2016 at 15:23, Robert Osfield <robert.osfield at gmail.com> wrote:
> Hi Stuart,
>
> Thanks for the modified file.  I've just reviewed this, as is it would
> break the build for others as you remove paths from the search list
> rather than just add a new one.  The addition of the debug library is
> desirable but would raise the issue of mixing debug and release libs,
> something that the present ones do in the opposite direction so the
> original script isn't ideal on this either.
>
> I can easily insert your additions into the OSG's FindFreetype.cmake,
> however, I do wonder if it's not best now to just adopt CMake's own
> FindFreetype.cmake.  CMake has come along way since the early days
> when we adopted and it's own list of Find scripts was lacking.
>
> I will have a bash with removing the OSG's FindFreetype.cmake so the
> it utilizes CMake own version, if this works well I'll check it in to
> git master.
>
> On 1 June 2016 at 11:54, Stuart Mentzer <osgforum at tevs.eu> wrote:
>> Hi,
>>
>> [I know this is more of a build issue but I was asked to bring this here to get a wider swath of OSG experts.]
>>
>> I am doing Windows builds with VC++ 2015 and latest build from sources of the 3rd party libraries. A few issues with the current freetype lib cause the build to fail and we want to get the right patches to support different versions of freetype. The 2 issues are:
>>
>> The include path structure doesn't have a freeetype2 directory anymore so the stock FindFreetype.cmake isn't working. In the attached FindFreetype.cmake I just hacked it to work with the new layout but that obviously won't work for the old layout. Does some CMake guru know the right way to do this? Would it work to just drop the OSG custom FindFreetype.cmake and use the CMake one (which seems to have both include/freetype2 and include supported in the latest CMake)?
>>
>> The debug build doesn't find freetyped.lib because freetyped isn't in the NAMES list. I added freetyped to NAMES but if that isn't the right/safe way to do it it would be helpful to hear a better idea.
>>
>> Thank you!
>>
>> Cheers,
>> Stuart[/list]
>>
>> ------------------
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=67315#67315
>>
>>
>>
>>
>> Attachments:
>> http://forum.openscenegraph.org//files/findfreetypecmake_210.txt
>>
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list