Skip to content

Commit c148720

Browse files
author
timlinux
committedApr 16, 2006
Preliminary support for static builds. Does not work for me yet due to no static sqlite libe being found. Previous invocation mechanism should still work fine
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5288 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed
 

‎build.sh

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,29 @@ then
2222
AUTOGEN_FLAGS="--enable-debug"
2323
export CFLAGS="-g -Wall"
2424
export CXXFLAGS="-g -Wall"
25+
elif [ $2 = static ]
26+
then
27+
#this is to tell linker to statically linke
28+
#against deps like gdal etc - useful for
29+
#trying to build a distributeable binary of qgis
30+
export LDFLAGS=-static
2531
fi
2632

27-
export QTDIR=/usr/local/Trolltech/Qt-4.1.0
33+
#qt installed from source
34+
#export QTDIR=/usr/local/Trolltech/Qt-4.1.0
35+
#qt installed from debian apt
36+
export QTDIR=/usr
2837
export PATH=$QTDIR/bin:$PATH
2938
export LD_LIBRARY_PATH=$QTDIR/lib
30-
./autogen.sh $AUTOGEN_FLAGS --prefix=${1} --with-qtdir=$QTDIR --with-grass=/usr/lib/grass && make && make install
39+
40+
# Note: --enable-static=no tells compiler
41+
# 'dont build static versions of qgis .o files'
42+
# This only applies to qgis interal libs and speeds
43+
# up the compilation process. See discussion on
44+
# http://logs.qgis.org/slogs/%23qgis.2006-04-15.log at 17:06:10
45+
# for additional details
46+
./autogen.sh $AUTOGEN_FLAGS --prefix=${1} \
47+
--enable-static=no \
48+
--with-qtdir=$QTDIR \
49+
--with-grass=/usr/lib/grass && make && make install
3150

0 commit comments

Comments
 (0)
Please sign in to comment.