sorlok / waitzar

Automatically exported from code.google.com/p/waitzar
Other
0 stars 0 forks source link

Make pkgconfig work with scons #88

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There's no pressing need for integration, as the only program that uses
libwaitzar is ibus-waitzar. However, this is no reason to skip pkg-config!
Here's what we'll need (basically) to set this up:

First, modify scons to take a prefix (default "/usr"), a libdir (default
"/usr/lib") and an includedir (default "/usr/include"). Also, make a few
"library name" variables in scons (@VERSION@, @GENERIC_LIBRARY_NAME@)

Now, take our file: waitzar-1.0.pc.in:
    prefix=@prefix@
    exec_prefix=@exec_prefix@
    libdir=@libdir@
    includedir=@includedir@

    Name: waitzar
    Description: (...describe...)
    Requires: libboost-python(...whatever...)
    Version: @VERSION@
    Libs: -L${libdir} -l@GENERIC_LIBRARY_NAME@
    Cflags: -I${includedir}/@GENERIC_LIBRARY_NAME@

NOTE: Check with the developers about keeping the c++ and python libraries
together.

Step 2: In the scons "build" step, replace waitzar-1.0.pc.in with
waitzar-1.0.pc, substituting all variables. Make sure all compile targets
depend on it.

Step 3: Now, just make sure that it gets installed in pkgconfig. Also, make
sure it gets included in our tar/zip file, however we choose to do
something like "make dist".

Original issue reported on code.google.com by seth.h...@gmail.com on 23 Nov 2009 at 8:56