Allow static libgit2

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-12-01 18:45:41 -08:00
parent 74447d6389
commit ebd22b9abc
2 changed files with 7 additions and 3 deletions

View file

@ -18,8 +18,8 @@ override_dh_auto_clean:
override_dh_auto_configure:
(cd libdivecomputer ; autoreconf --install ; ./configure ; make)
(mkdir libgit2/build ; cd libgit2/build ; cmake .. ; make )
qmake LIBDCDEVEL=./libdivecomputer LIBGIT2DEVEL=./libgit2 subsurface.pro
(mkdir libgit2/build ; cd libgit2/build ; cmake -DBUILD_SHARED_LIBS=OFF .. ; sed -i 's/.so$/.a/' CMakeCache.txt ; make )
qmake LIBDCDEVEL=./libdivecomputer LIBGIT2DEVEL=./libgit2 LIBGIT2STATIC=1 subsurface.pro
override_dh_installchangelogs:
dh_installchangelogs

View file

@ -137,7 +137,11 @@ isEmpty(LIBGIT2DEVEL) {
PKGCONFIG += libgit2
} else {
INCLUDEPATH += $$LIBGIT2DEVEL/include
isEmpty(LIBGIT2STATIC) {
LIBS += -L$$LIBGIT2DEVEL/build -lgit2 -lz -lcrypto
} else {
LIBS += $$LIBGIT2DEVEL/build/libgit2.a -Wl,-Bstatic -lz -lssl -lcrypto -Wl,-Bdynamic -ldl
}
}
# Add libiconv if needed