diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-03-07 16:33:00 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-03-07 16:33:00 -0800 |
commit | 4edf37f9be0374c73ae957c09b393f5bc913fe3f (patch) | |
tree | 3acfd408a1c3c946a428d906161a6dd66617e7bd | |
parent | 18303b6f43591c631de01db0067ecdf4cb6dac85 (diff) | |
download | subsurface-4edf37f9be0374c73ae957c09b393f5bc913fe3f.tar.gz |
Update cross building for Windows on Linux
This updates the instructions and the plumbing to be able to link against
a locally built libgit2
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | INSTALL | 8 | ||||
-rwxr-xr-x | packaging/windows/mingw-make.sh | 2 | ||||
-rw-r--r-- | packaging/windows/subsurface.nsi.in | 2 | ||||
-rw-r--r-- | subsurface-configure.pri | 9 | ||||
-rw-r--r-- | subsurface.pro | 2 |
5 files changed, 20 insertions, 3 deletions
@@ -210,6 +210,14 @@ $ mingw32-cmake -DCMAKE_BUILD_TYPE=Release -DQTONLY=TRUE ../sources $ mingw32-make -j4 $ mingw32-make install +To compile libgit2, use: + +$ mkdir -p ~/src/libgit2/build +$ git clone git://github.com/libgit2/libgit2 ~/src/libgit2 +$ cd ~/src/libgit2/build +$ mingw32-cmake .. +$ mingw32-cmake --build . + To compile Subsurface, use: $ mkdir -p ~/src/subsurface diff --git a/packaging/windows/mingw-make.sh b/packaging/windows/mingw-make.sh index 3d503bf0e..7ca88ea23 100755 --- a/packaging/windows/mingw-make.sh +++ b/packaging/windows/mingw-make.sh @@ -11,5 +11,5 @@ rm packaging/windows/subsurface.nsi > /dev/null 2>&1 export PATH=/usr/i686-w64-mingw32/sys-root/mingw/bin:$PATH -mingw32-qmake-qt4 CROSS_PATH=/usr/i686-w64-mingw32/sys-root/mingw +mingw32-qmake-qt4 CROSS_PATH=/usr/i686-w64-mingw32/sys-root/mingw LIBGIT2DEVEL=../libgit2 CONFIG+=libgit21-api mingw32-make $@ diff --git a/packaging/windows/subsurface.nsi.in b/packaging/windows/subsurface.nsi.in index 956ecf41b..1a718a2bf 100644 --- a/packaging/windows/subsurface.nsi.in +++ b/packaging/windows/subsurface.nsi.in @@ -120,6 +120,8 @@ Section File libssl-10.dll File libeay32.dll File ssleay32.dll + File libgit2.dll + File libcrypto-10.dll File Qt*4.dll File subsurface.ico File qt.conf diff --git a/subsurface-configure.pri b/subsurface-configure.pri index 712b2272a..dff3b6f7d 100644 --- a/subsurface-configure.pri +++ b/subsurface-configure.pri @@ -126,7 +126,14 @@ LIBS *= $$XSLT_LIBS $$XML2_LIBS # We're searching for: # libzip # sqlite3 -link_pkgconfig: PKGCONFIG += libzip sqlite3 libgit2 +link_pkgconfig: PKGCONFIG += libzip sqlite3 + +isEmpty(LIBGIT2DEVEL) { + PKGCONFIG += libgit2 +} else { + INCLUDEPATH += $$LIBGIT2DEVEL/include + LIBS += -L$$LIBGIT2DEVEL/build -lgit2 -lz -lcrypto +} # Add libiconv if needed link_pkgconfig: packagesExist(libiconv): PKGCONFIG += libiconv diff --git a/subsurface.pro b/subsurface.pro index 9efbc1376..803930e0f 100644 --- a/subsurface.pro +++ b/subsurface.pro @@ -195,7 +195,7 @@ QTTRANSLATIONS = \ qt_sk.qm \ qt_sv.qm -doc.commands += $(MKDIR) $$OUT_PWD/Documentation$$escape_expand(\\n\\t)$(MAKE) -C $$PWD/Documentation OUT=$$OUT_PWD/Documentation/ doc +doc.commands += $(CHK_DIR_EXISTS) $$OUT_PWD/Documentation$$escape_expand(\\n\\t)$(MAKE) -C $$PWD/Documentation OUT=$$OUT_PWD/Documentation/ doc all.depends += doc QMAKE_EXTRA_TARGETS += doc all |