aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xpackaging/ubuntu/rules4
-rw-r--r--subsurface-configure.pri6
2 files changed, 7 insertions, 3 deletions
diff --git a/packaging/ubuntu/rules b/packaging/ubuntu/rules
index bc5831655..5b9fdc516 100755
--- a/packaging/ubuntu/rules
+++ b/packaging/ubuntu/rules
@@ -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
diff --git a/subsurface-configure.pri b/subsurface-configure.pri
index f8789b182..4c55c8b67 100644
--- a/subsurface-configure.pri
+++ b/subsurface-configure.pri
@@ -137,7 +137,11 @@ isEmpty(LIBGIT2DEVEL) {
PKGCONFIG += libgit2
} else {
INCLUDEPATH += $$LIBGIT2DEVEL/include
- LIBS += -L$$LIBGIT2DEVEL/build -lgit2 -lz -lcrypto
+ 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