[cmake-developers] FindFreetype Patches

Greg Jung gvjung at gmail.com
Wed May 28 22:24:01 EDT 2014


I found on Linux, FindFreetype is not found because it is invoked the
lower-case "f'.
Propose to change the name to Findfreetype.

For three mingw/msys installations on drives C:, D:, and E:, I
found that installation of freetype occured in different fashions,
as follows:
freetype2.h:
 C:/mingw/msys/1.0/local/include/freetype2
 D:/Mingw/msys/1.0/local/include/freetype2/freetype
 E:/mingw/msys/1.0/local/include/freetype2/freetype

ft2build,h:
 C:/mingw/msys/1.0/local/include/freetype2
 D:/Mingw/msys/1.0/local/include
 E:/mingw/msys/1.0/local/include

D: and E: systems already found freetype but C: required
the freetype2 search to be as follows:

find_path(FREETYPE_INCLUDE_DIR_freetype2 config/ftheader.h
         - etc -
  PATH_SUFFIXES include/freetype2 include/freetype
include/freetype2/freetype
)

when the paths have been set up properly we find what we want.
here is the chatter from my debug run:

--  project(test_test C) has just been called. results:
 PROJECT_SOURCE_DIR = F:/test
 CMAKE_SYSTEM_NAME = Windows
WIN32 1 MINGW? 1 MSYS? 1
--  =======================================================
 Lists.txt>check this out: LDFLAGS=-LE:/MinGW/local32/lib
 Lists.txt> LD_LIBRARY_PATH=
 Lists.txt> CMAKE_C_FLAGS = -IE:/MinGW/local32/include
 Lists.txt> CFLAGS=-IE:/MinGW/local32/include
 Lists.txt>     CC=E:/mingw/mingw32/bin/gcc.exe
 Lists.txt> CXXFLAGS=-IE:/MinGW/local32/include
 Lists.txt> CPPFLAGS=-IE:/MinGW/local32/include
--  Lists.txt>    WIN32?1 MINGW?1 MSYS?1
-- 
CMAKE_SYSTEM_PREFIX_PATH:
 E:/mingw/msys/1.0/local;E:/mingw/msys/1.0
CMAKE_SYSTEM_LIBRARY_PATH:
 E:/mingw/msys/1.0/local/lib;E:/mingw/msys/1.0/lib;E:/mingw/msys/1.0/lib/w32api
========================================================
-- FREETYPE_INCLUDE_DIR_ft2build? E:/mingw/msys/1.0/local/include
-- FREETYPE_INCLUDE_DIR_freetype2?
E:/mingw/msys/1.0/local/include/freetype2/freetype
-- FREETYPE_LIBRARY? E:/mingw/msys/1.0/local/lib/libfreetype.dll.a
-- CMAKE_SYSTEM_PREFIX_PATH? E:/mingw/msys/1.0/local;E:/mingw/msys/1.0
-- CMAKE_SYSTEM_LIBRARY_PATH?
E:/mingw/msys/1.0/local/lib;E:/mingw/msys/1.0/lib;E:/mingw/msys/1.0/lib/w32api
-- CMAKE_SYSTEM_INCLUDE_PATH?
E:/mingw/msys/1.0/local/include;E:/mingw/msys/1.0/include;E:/mingw/msys/1.0/include/w32api
-- Found Freetype: E:/mingw/msys/1.0/local/lib/libfreetype.dll.a
-- FREETYPE FOUND? TRUE



On Tue, May 27, 2014 at 7:43 AM, Brad King <brad.king at kitware.com> wrote:

> On 05/25/2014 01:05 AM, Taylor Holberton wrote:
> > Here's some patches for the FindFreetype module.
> > The first few patches change formatting. While the
> > last one extends the functionality.
>
> Thanks.  I've applied the style changes:
>
>  FindFreetype: Add newlines to reduce code width
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ad6dace
>
>  FindFreetype: Move PATH_SUFFIXES argument for more consistency
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=836a28d5
>
>  FindFreetype: Use lower-case name in call to FPHSA
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=444f8801
>
>  FindFreetype: Indent with 2 spaces instead of 4
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=58f7baab
>
> In the last change, the explicit CMAKE_SYSTEM_PREFIX_PATH
> reference should not be necessary.  The commands already
> use that variable internally to generate paths.  Just add
> PATH_SUFFIXES to refer to the path under the install prefix
> at which the freetype2 headers exist.
>
> Thanks,
> -Brad
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140528/76711ecb/attachment-0002.html>


More information about the cmake-developers mailing list