Library Descriptor

From ISP_RAS

Jump to: navigation, search

Library descriptor is a simple file with an XML-like structure that specifies version number, paths to header files and shared objects and optionally some other information.
The easiest library descriptor has the following structure:

 <version>
     /* Version of the library */
 </version>
   
 <headers>
     /* The list of paths to header files and/or
        directories with header files, one per line */
 </headers>
   
 <libs>
     /* The list of paths to shared objects and/or
        directories with shared objects, one per line */
 </libs>

Additional sections of the descriptor are:

 <include_paths>
     /* The list of directories to be searched for header files
        needed for compiling of library headers, one per line */
 </include_paths>
   
 <gcc_options>
     /* Additional gcc options, one per line */
 </gcc_options>
 
 <include_preamble>
     /* The list of header files that should be included before other headers, one per line.
        For example, it is a tree.h for libxml2 and ft2build.h for freetype2 library */
 </include_preamble>
 
 <libs_depend>
     /* The list of paths to shared objects that should be provided to gcc
        for resolving undefined symbols (if NEEDED elf section in the library
        shared objects doesn't include it) */
 </libs_depend>
   
 <opaque_types>
     /* The list of opaque types, one per line */
 </opaque_types>
   
 <skip_interfaces>
     /* The list of functions (mangled/symbol names in C++)
        that should be skipped while testing, one per line */
 </skip_interfaces>
 
 <libgroup>
   <name>
       /* Name of the libgroup */
   </name>
 
   <interfaces>
       /* The list of functions (mangled/symbol names in C++) in the group that should be tested, one per line */
   </interfaces>
 </libgroup>

Examples

This section demonstrates descriptor examples. See also descriptors for libraries in Moblin OS.

 <version>
     0.3.4
 </version>
 
 <headers>
     /usr/local/libssh/0.3.4/include
 </headers>
 
 <libs>
     /usr/local/libssh/0.3.4/lib/libssh.so
 </libs>
 
 <include_paths>
     /usr/include/openssl
 </include_paths>
 <version>
     2.7.6
 </version>
 
 <headers>
     /usr/local/libxml2-2.7.6/include
 </headers>
 
 <libs>
     /usr/local/libxml2-2.7.6/lib/libxml2.so.2.7.6
 </libs>
 
 <include_preamble>
     tree.h
 </include_preamble>
 <version>
     1.28.0
 </version>
 
 <headers>
     /usr/local/atk-1.28.0/include/atk-1.0/atk/atk.h
 </headers>
 
 <libs>
     /usr/local/atk-1.28.0/lib
 </libs>
 
 <include_paths>
     /usr/include/glib-2.0/
     /usr/lib/glib-2.0/include/
     /usr/local/atk-1.28.0/include/atk-1.0/
 </include_paths>
 <version>
     1.3.2
 </version>
 
 <headers>
     /usr/local/libX11-1.3.2/include
 </headers>
 
 <libs>
     /usr/local/libX11-1.3.2/lib
 </libs>
 
 <include_preamble>
     Xlib.h
 </include_preamble>
  • Qt4 (libQtCore)
 <version>
     4.6.0
 </version>
 
 <headers>
     /usr/local/Qt-4.6.0/include/QtCore/QtCore
 </headers>
 
 <libs>
     /usr/local/Qt-4.6.0/lib/libQtCore.so.4
 </libs>
 
 <include_paths>
     /usr/local/Qt-4.6.0/include/
 </include_paths>
 
 <gcc_options>
    -fvisibility=hidden
    -fvisibility-inlines-hidden
    -fPIC
    -Wall
    -W
    -D_REENTRANT
    -DQT_NO_CAST_FROM_ASCII
    -DQT_NO_CAST_TO_ASCII
    -DQT_NO_STL
    -DQT_SHARED
    -DQT3_SUPPORT
 </gcc_options>
 <version>
     1.1.22
 </version>
 
 <headers>
     /usr/local/libxslt-1.1.22/include/
 </headers>
 
 <libs>
     /usr/local/libxslt-1.1.22/lib/libxslt.so
     /usr/local/libxslt-1.1.22/lib/libexslt.so
 </libs>
 
 <include_paths>
     /usr/include/libxml2/
 </include_paths>
 
 <include_preamble>
     xsltInternals.h
 </include_preamble>
 <version>
     2.26.1
 </version>
 
 <headers>
     /usr/local/libxml++-2.26.1/include
     /usr/local/libxml++-2.26.1/lib/libxml++-2.6/include
 </headers>
 
 <libs>
     /usr/local/libxml++-2.26.1/lib
 </libs>
 
 <include_paths>
     /usr/include/glib-2.0/
     /usr/lib/glib-2.0/include/
     /usr/include/glibmm-2.4/
     /usr/lib/glibmm-2.4/include/
 </include_paths>
 <version>
     1.26.0
 </version>
 
 <headers>
     /usr/local/pango-1.26.0/include
 </headers>
 
 <libs>
     /usr/local/pango-1.26.0/lib
 </libs>
 
 <include_paths>
     /usr/local/pango-1.26.0/include/pango-1.0/pango
     /usr/local/pango-1.26.0/include/pango-1.0/
     /usr/include/glib-2.0/
     /usr/lib/glib-2.0/include/
     /usr/include/cairo/
     /usr/include/freetype2/
     /usr/include/X11
 </include_paths>
 
 <include_preamble>
     pango.h
 </include_preamble>
 <version>
     2.18.4
 </version>
 
 <headers>
     /usr/local/gtk+-2.18.4/include/gtk-2.0/gdk/gdk.h
     /usr/local/gtk+-2.18.4/include/gtk-2.0/gtk/gtk.h
     /usr/local/gtk+-2.18.4/include/gail-1.0/
     /usr/local/gtk+-2.18.4/include/gtk-unix-print-2.0/
 </headers>
 
 <libs>
     /usr/local/gtk+-2.18.4/lib
 </libs>
 
 <include_paths>
     /usr/local/gtk+-2.18.4/include/gtk-2.0/
     /usr/local/gtk+-2.18.4/lib/gtk-2.0/include
     /usr/include/atk-1.0/
     /usr/include/glib-2.0/
     /usr/lib/glib-2.0/include/
     /usr/include/cairo/
     /usr/include/pango-1.0/
 </include_paths>
 <version>
     2.22.2
 </version>
 
 <headers>
     /usr/local/glib-2.22.2/include/glib-2.0/glib.h
     /usr/local/glib-2.22.2/include/glib-2.0/glib-object.h
     /usr/local/glib-2.22.2/include/glib-2.0/gmodule.h
 </headers>
 
 <libs>
     /usr/local/glib-2.22.2/lib/
 </libs>
 
 <include_paths>
     /usr/local/glib-2.22.2/lib/glib-2.0/include/
 </include_paths>
 <version>
     2.28.0
 </version>
 
 <headers>
     /usr/local/libsoup-2.28.0/include
 </headers>
 
 <libs>
     /usr/local/libsoup-2.28.0/lib
 </libs>
 
 <include_paths>
     /usr/include/glib-2.0/
     /usr/lib/glib-2.0/include/
 </include_paths>
 <version>
     4.9.9.1
 </version>
 
 <headers>
     /usr/local/include/allegro5/allegro.h
 </headers>
 
 <libs>
     /usr/local/lib/liballegro-4.9.9.so
 </libs>
 <version>
     1.9.0.1
 </version>
 
 <headers>
     /usr/local/mathgl-1.9.0.1/include/
 </headers>
 
 <libs>
     /usr/local/mathgl-1.9.0.1/lib/
 </libs>
 
 <include_paths>
     /usr/local/gsl-1.9/include/
 </include_paths>
 <version>
     1.9
 </version>
 
 <headers>
     /usr/local/gsl-1.9/include/
 </headers>
 
 <libs>
     /usr/local/gsl-1.9/lib/
 </libs>
 
 <include_preamble>
     stdlib.h
 </include_preamble>
 <version>
     7
 </version>
 
 <headers>
     /usr/local/libjpeg-7/include/jpeglib.h
 </headers>
 
 <libs>
     /usr/local/libjpeg-7/lib/
 </libs>
 
 <include_preamble>
     stdio.h
 </include_preamble>
Personal tools