Fix includes
[quassel.git] / doc / build-static-quassel
1 These notes should help you to build a quasselcore statically linked to Qt
2 and OpenSSL. Note that these are just hints that work for me; ymmv.
3
4 1.) Get a statically linked Qt
5     As of Qt 4.4, this configure line for building should probably work if
6     you only want to build a static core (since we disable most GUI
7     components here; you'd need to adjust that line for a full Qt!)
8
9     ./configure -static -no-accessibility -qt-sql-sqlite -qt-zlib -no-qt3support \
10     -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg -nomake demos -nomake examples \
11     -nomake gui -nomake uic -nomake opengl -nomake tools -no-opengl -no-sm -no-xshape \
12     -no-xinerama -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-fontconfig -no-tablet \
13     -no-xkb -no-glib -no-svg -openssl-linked -no-phonon -no-webkit -no-dbus -no-xmlpatterns \
14     -prefix /usr/local/Trolltech/qt-4.4-static
15
16     To only build non-X dependent parts of Qt:
17
18     $> export QT4_TARGET_DIRECTORIES="src/tools/moc src/tools/rcc src/tools/uic src/corelib src/xml \
19                                      src/network src/sql src/plugins/codecs src/script"
20     $> for i in $QT4_TARGET_DIRECTORIES; do make -C $i; done
21
22     NOTE: This has not really been tested and may or may not be working for
23           you. If in doubt, follow the official route and just do make
24           and make install.
25
26 2.) Link some system libs into /path/to/builddir/staticlibs
27     (we need this, because otherwise your quasselcore wouldn't be
28     portable)
29
30     On my system, I have this in staticlibs:
31       libcrypto.a -> /usr/lib/libcrypto.a
32       libssl.a -> /usr/lib/libssl.a
33       libstdc++.a -> /usr/lib/gcc/i686-pc-linux-gnu/4.2.3/libstdc++.a
34
35     YMMV depending on the exact versions installed on your system, of course.
36
37 3.) Build Quassel Core:
38     
39     $> cd /path/to/builddir
40     $> cmake /path/to/source -DSTATIC=1 -DWANT_QTCLIENT=0 -DWANT_MONO=0 -DQT=/usr/local/Trolltech/qt-4.4-static
41     $> make
42
43 4.) Enjoy.