[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] CMakeLists.txt patch
From: |
Werner LEMBERG |
Subject: |
Re: [ft] CMakeLists.txt patch |
Date: |
Tue, 11 Aug 2015 08:13:52 +0200 (CEST) |
>> Below you can see what I currently have. Note that one central
>> variable in `freetype-config.in' is still missing:
>> %LIBSTATIC_CONFIG%. This exposes a weakness present in most
>> `FindXXX.cmake' modules that come with cmake itself: There is no
>> support for getting the static libraries necessary for linking.
>
> What value do you expect in LIBSTATIC_CONFIG?
Ah, a typo, I've meant LIBSSTATIC_CONFIG. This variable should hold
all libraries necessary for statically linking FreeType. For example,
I get the following value on my GNU/Linux box.
-lz -lbz2 -lpng12 -lz -lm -L/usr/local/lib -lharfbuzz
^ ^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^
| | | |
from zlib from libpng from harfbuzz
|
from bzip2
In general, the static dependency values for a library `foo' are
collected using the following methods, where the first successful one
wins; see `builds/unix/configure.raw' for details.
(1) pkg-config --static --libs foo
On my computer, this gives the above value. [Note that the data
for harfbuzz is probably incorrect; I'll check that with
Behdad.]
(2) foo-config --static --ldflags
(3) AC_CHECK_LIB([foo], ...)
Unfortunately, only a handful of the available cmake modules have code
to return static dependencies, e.g., `FindBoost.cmake'.
Werner