OOF2: The Manual
Name
oof2setuputils.add_third_party_libs — Add libraries and library directories for an internal extension
Synopsis
from oof2setuputils import add_third_party_libs add_third_party_libs(cmd, clib)
Description
add_third_party_libs
runs a Unix
command and incorporates its output into the given
CLibInfo
object. The Unix command
must print the linker arguments that specify required
external libraries and their locations.
Parameters
cmd
-
A string, containing the Unix command to be executed.
clib
-
The
CLibInfo
object that was passed in as an argument toset_clib_flags
.
Example
OOF2 uses the Magick++ library, which provides a Magick++-config command, which prints library information, like this:
% Magick++-config --ldflags --libs -L/usr/local/stow/ImageMagick-6.2.4-gcc3/lib -L/sw/lib -L/usr/X11R6/lib -L/usr/X11R6/lib -lfreetype -L/sw/lib -lMagick++ -lWand -lMagick -llcms -ltiff -lfreetype -ljpeg -lpng -ldpstk -ldps -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lpthread -lm -lpthread
An internal OOF2 extension that uses
Magick++ could define
set_clib_flags
like this:
import oof2setuputils def set_clib_flags(clib): [...] oof2setuputils.add_third_party_libs('Magick++-config --ldflags --libs', clib) [...]