[cmake-developers] FreeType headers almost there but not quite ... resolved

Greg Jung gvjung at gmail.com
Thu Jul 3 01:10:43 EDT 2014


Hi again,  I'm re-transmitting this to include the mailing list, trim some
and add
my final analysis.
   I went back and was able to run cmake without my modifications, and the
build proceeded fine ... oh but
with_freetype was set to off, so that doesn't count.  The same problem that
bothered me when I first dove into
the CMAKE system is still pestering me: Freetype library.  The module in
the plplot distribution works fine for
only linux/unix hosts:

FIND_PATH(FREETYPE_INCLUDE_DIR freetype/config/ftheader.h
/usr/local/include/freetype2
/usr/include/freetype2
)
In MSYS case, /usr/local means nothing to CMAKE.  The cmake distribution
has a (more inclusive, shotgun)
approach and I originally modified some (cmake-2.8).cmake modules to
a) find the /MSYS and /mingw anchors and set appropriate values for
CMAKE_SYSTEM_PREFIX_PATH,
 CMAKE _SYSTEM_LIBRARY_PATH, etc. in the MSYS case,
b) parse environment variable PKG_CONFIG_PATH and use pkg-config facilities
in cmake to hook libraries in.
Of course that [b)] is what (plplot)/pkg-config.cmake does so I use that,
and lib/pkgconfig/freetype.pc
blends well into that system.

Today I did some searching of the plplot-developer mailing list archives
and found that a working downstream change
has been in the plplot trunk since march 2014, that instead of
FREETYPE_INCLUDE_DIR to use
FREETYPE_INCLUDE_CFLAGS for build commands.  So all versiopns 13025+ are
good with that.
The revised (plplot).freetype.cmake actually constructs INCLUDE_CFLAGS from
the INCLUDE_DIRS
returned by (cmake-2.8).FindFreeType.cmake.   This module (FindFreetype)
however is of no use to my
configuration because it requires a windows GTKM installation to find a
freeetype collection.  Instead I am MSYS
 and stubbornly so, windows is only my backdrop. Hence my (cmake) module
revisions
discussed above are needed to make it all fly. And it does.

I attached my cmake modules I use and additionally,  pkg-config.cmake
modules slightly
modified from the plplot code.  freetype.cmake is re-cast so that a prior
pick-up of freetype
can be used, i.e. freetype2.pc, as i do in the custom code.  FindFreetype
is called if the option
is on but it still hasn't been found.  Both cases converge to create
_INCLUDE_CFLAGS
from INCLUDE_DIRS where the (revised as of 13025) plplot build scripting.

I re-tested, and include the cmake-gui chatter (cmake.out) from my revised
config.  In my enhanced
cmake I can find freetype under MSYS, but with the modified procedure (call
boiler_plate before including freetype)
you can use vanilla cmake. ... The attached files include a cmake.out
(cmake-gui configuration chatter) with
plplot-5.10.0 using replacement .cmakes as found in the tarball, including
the "plplot-specific" directory for the plplot/cmake/modules.

I now test my vanilla cmake and attach it as "cmakeold.out".
Last-second revision: src/CMakeLists.txt line 244 needs to use
FREETYPE_INCLUDE_CFLAGS also.

On Tue, Jul 1, 2014 at 1:35 PM, Alan W. Irwin <irwin at beluga.phys.uvic.ca>
wrote:

> On 2014-07-01 00:41-0700 Greg Jung wrote:
>
> Hi Greg:
>
> Thanks for your interest in PLplot.
>
> I suspect this is either an issue concerning how you are using the
> PLplot build system or an issue with that system itself so I plan to
> follow up on this question on the appropriate list (plplot-devel) for
> discussing such issues.
>
> Alan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140702/067567ad/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmake.out
Type: application/octet-stream
Size: 5269 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140702/067567ad/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: newcmakemodules.tar.gz
Type: application/x-gzip
Size: 41053 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140702/067567ad/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmakeold.out
Type: application/octet-stream
Size: 9273 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140702/067567ad/attachment-0003.obj>


More information about the cmake-developers mailing list