From 33f2ddb6960288f7c48d2b8d0fa8632051746817 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Wed, 28 Oct 2020 20:07:28 +0300 Subject: [PATCH] [QT] fix build with prebuild i2pd libs Signed-off-by: R4SAS --- .github/workflows/build-qt.yml | 1 - qt/i2pd_qt/i2pd_qt.pro | 24 ++++++++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-qt.yml b/.github/workflows/build-qt.yml index 6211c4c7..d4fde2b9 100644 --- a/.github/workflows/build-qt.yml +++ b/.github/workflows/build-qt.yml @@ -15,7 +15,6 @@ jobs: sudo apt-get install build-essential qt5-default libqt5gui5 libboost1.74-dev libminiupnpc-dev libssl-dev zlib1g-dev - name: build application run: | - make -j3 USE_AVX=no USE_AESNI=no USE_UPNP=yes DEBUG=no mk_obj_dir libi2pd.a libi2pdclient.a cd qt/i2pd_qt qmake make -j3 diff --git a/qt/i2pd_qt/i2pd_qt.pro b/qt/i2pd_qt/i2pd_qt.pro index 80968fcb..1064e953 100644 --- a/qt/i2pd_qt/i2pd_qt.pro +++ b/qt/i2pd_qt/i2pd_qt.pro @@ -7,8 +7,6 @@ TEMPLATE = app QMAKE_CXXFLAGS *= -Wno-unused-parameter -Wno-maybe-uninitialized CONFIG += strict_c++ c++11 -DEFINES += USE_UPNP - CONFIG(debug, debug|release) { message(Debug build) DEFINES += DEBUG_WITH_DEFAULT_LOGGING @@ -75,6 +73,22 @@ FORMS += mainwindow.ui \ LIBS += ../../libi2pd.a ../../libi2pdclient.a -lz +libi2pd.commands = cd $$PWD/../../ && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" USE_UPNP=yes DEBUG=no mk_obj_dir libi2pd.a +libi2pd.target = $$PWD/../../libi2pd.a +libi2pd.depends = FORCE + +libi2pdclient.commands = cd $$PWD/../../ && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" USE_UPNP=yes DEBUG=no mk_obj_dir libi2pdclient.a +libi2pdclient.target = $$PWD/../../libi2pdclient.a +libi2pdclient.depends = FORCE + +cleani2pd.commands = cd $$PWD/../../ && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) clean +cleani2pd.depends = clean + +PRE_TARGETDEPS += $$PWD/../../libi2pd.a $$PWD/../../libi2pdclient.a +QMAKE_EXTRA_TARGETS += cleani2pd libi2pd libi2pdclient +CLEAN_DEPS += cleani2pd + + macx { message("using mac os x target") BREWROOT=/usr/local @@ -110,10 +124,12 @@ windows { QMAKE_CXXFLAGS_RELEASE = -Os QMAKE_LFLAGS = -Wl,-Bstatic -static-libgcc -static-libstdc++ -mwindows - #linker's -s means "strip" + # linker's -s means "strip" QMAKE_LFLAGS_RELEASE += -s - LIBS = -lminiupnpc \ + LIBS = \ + $$PWD/../../libi2pd.a $$PWD/../../libi2pdclient.a \ + -lminiupnpc \ -lboost_system$$BOOST_SUFFIX \ -lboost_date_time$$BOOST_SUFFIX \ -lboost_filesystem$$BOOST_SUFFIX \