fix build for Qt5.11, enable unit tests
This commit is contained in:
parent
4406ba3800
commit
e55c8c2d6d
4 changed files with 327 additions and 17 deletions
12
.SRCINFO
12
.SRCINFO
|
@ -1,16 +1,14 @@
|
|||
pkgbase = multimc5
|
||||
pkgdesc = Minecraft launcher with ability to manage multiple instances.
|
||||
pkgver = 0.6.2
|
||||
pkgrel = 1
|
||||
pkgrel = 2
|
||||
url = http://multimc.org/
|
||||
arch = i686
|
||||
arch = x86_64
|
||||
license = Apache
|
||||
makedepends = patch
|
||||
makedepends = cmake
|
||||
makedepends = qt5-tools
|
||||
makedepends = qt5-x11extras
|
||||
makedepends = java-environment>=8
|
||||
makedepends = java-environment<10
|
||||
depends = zlib
|
||||
depends = libgl
|
||||
depends = qt5-base
|
||||
|
@ -20,15 +18,17 @@ pkgbase = multimc5
|
|||
depends = xorg-xrandr
|
||||
optdepends = mcedit: Allows editing of minecraft worlds
|
||||
provides = multimc
|
||||
conflicts = multimc5-git
|
||||
conflicts = multimc-git
|
||||
conflicts = multimc
|
||||
source = https://github.com/MultiMC/MultiMC5/archive/0.6.2.tar.gz
|
||||
source = https://github.com/MultiMC/libnbtplusplus/archive/multimc-0.5.0.tar.gz
|
||||
source = https://github.com/MultiMC/quazip/archive/multimc-2.tar.gz
|
||||
source = multimc-fix-build-with-qt-511.patch
|
||||
source = quazip-fix-build-with-qt-511.patch
|
||||
sha512sums = e70e7e02b8e92f7f6edf8f6d84aae1049af0def9018e3c91839838d9f156dc99a784a62f65c449b493694c997444d490517a6413fad1aefa9753a99c585f2d7f
|
||||
sha512sums = 333aa110a399a5061aba306912b6e9af18f824920a778afeb6b5714d91af64cb6135e2801a6271a38896a36db733308cbfade79830ca08bfca8a9d79fef69e68
|
||||
sha512sums = de5169e46018b61f9d1221e537785c19e62d7de57e9726f65668ee5c265b4db8464cc6f8ac48bd28c0166b186fff31115c11e05451259437f3358e3b2c5fc57f
|
||||
sha512sums = 7c40028655a327503565a3384dc163c0061718a0ec73feb306dcfe298c02573764ae98ae1390e7eab4ef374ceb63f7ecde6c86f6f0f17591b07ae4a27147466f
|
||||
sha512sums = ca7a350bdeecf65dbca7de8d6912c935c6ba603edcddcd4ffe71d8997e50e4046335dde6d1d7c629d35025073d18be4d112a960d43a8801de979687bc26e46d4
|
||||
|
||||
pkgname = multimc5
|
||||
|
||||
|
|
42
PKGBUILD
42
PKGBUILD
|
@ -3,7 +3,7 @@
|
|||
|
||||
pkgname=multimc5
|
||||
pkgver=0.6.2
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
__pkgver_libnbtplusplus=multimc-0.5.0
|
||||
__pkgver_quazip=multimc-2
|
||||
pkgdesc="Minecraft launcher with ability to manage multiple instances."
|
||||
|
@ -12,24 +12,39 @@ url="http://multimc.org/"
|
|||
license=('Apache')
|
||||
depends=('zlib' 'libgl' 'qt5-base' 'qt5-x11extras' 'java-runtime' 'qt5-svg' 'xorg-xrandr')
|
||||
provides=('multimc')
|
||||
makedepends=('patch' 'cmake' 'qt5-tools' 'qt5-x11extras' 'java-environment>=8' 'java-environment<10')
|
||||
conflicts=('multimc')
|
||||
makedepends=('cmake' 'java-environment>=8' 'java-environment<10')
|
||||
optdepends=('mcedit: Allows editing of minecraft worlds')
|
||||
conflicts=('multimc5-git' 'multimc-git' 'multimc')
|
||||
|
||||
source=("https://github.com/MultiMC/MultiMC5/archive/${pkgver}.tar.gz"
|
||||
"https://github.com/MultiMC/libnbtplusplus/archive/${__pkgver_libnbtplusplus}.tar.gz"
|
||||
"https://github.com/MultiMC/quazip/archive/${__pkgver_quazip}.tar.gz"
|
||||
"https://github.com/MultiMC/libnbtplusplus/archive/${__pkgver_libnbtplusplus}.tar.gz"
|
||||
"https://github.com/MultiMC/quazip/archive/${__pkgver_quazip}.tar.gz"
|
||||
"multimc-fix-build-with-qt-511.patch"
|
||||
"quazip-fix-build-with-qt-511.patch"
|
||||
)
|
||||
sha512sums=('e70e7e02b8e92f7f6edf8f6d84aae1049af0def9018e3c91839838d9f156dc99a784a62f65c449b493694c997444d490517a6413fad1aefa9753a99c585f2d7f'
|
||||
'333aa110a399a5061aba306912b6e9af18f824920a778afeb6b5714d91af64cb6135e2801a6271a38896a36db733308cbfade79830ca08bfca8a9d79fef69e68'
|
||||
'de5169e46018b61f9d1221e537785c19e62d7de57e9726f65668ee5c265b4db8464cc6f8ac48bd28c0166b186fff31115c11e05451259437f3358e3b2c5fc57f')
|
||||
'de5169e46018b61f9d1221e537785c19e62d7de57e9726f65668ee5c265b4db8464cc6f8ac48bd28c0166b186fff31115c11e05451259437f3358e3b2c5fc57f'
|
||||
'7c40028655a327503565a3384dc163c0061718a0ec73feb306dcfe298c02573764ae98ae1390e7eab4ef374ceb63f7ecde6c86f6f0f17591b07ae4a27147466f'
|
||||
'ca7a350bdeecf65dbca7de8d6912c935c6ba603edcddcd4ffe71d8997e50e4046335dde6d1d7c629d35025073d18be4d112a960d43a8801de979687bc26e46d4')
|
||||
prepare() {
|
||||
rmdir "${srcdir}/MultiMC5-${pkgver}/libraries/libnbtplusplus" | echo "libnbtplusplus has data"
|
||||
rmdir "${srcdir}/MultiMC5-${pkgver}/libraries/quazip" | echo "quazip has data"
|
||||
cd "${srcdir}/MultiMC5-${pkgver}"
|
||||
|
||||
rmdir "libraries/libnbtplusplus"
|
||||
rmdir "libraries/quazip"
|
||||
cp --recursive "${srcdir}/libnbtplusplus-${__pkgver_libnbtplusplus}/" \
|
||||
"${srcdir}/MultiMC5-${pkgver}/libraries/libnbtplusplus"
|
||||
"libraries/libnbtplusplus"
|
||||
cp --recursive "${srcdir}/quazip-${__pkgver_quazip}/" \
|
||||
"${srcdir}/MultiMC5-${pkgver}/libraries/quazip"
|
||||
"libraries/quazip"
|
||||
|
||||
# https://github.com/MultiMC/MultiMC5/pull/2304
|
||||
patch -p1 < "${srcdir}/multimc-fix-build-with-qt-511.patch"
|
||||
|
||||
cd "libraries/quazip"
|
||||
# https://github.com/MultiMC/quazip/pull/1
|
||||
patch -p1 < "${srcdir}/quazip-fix-build-with-qt-511.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/MultiMC5-${pkgver}"
|
||||
mkdir -p build
|
||||
|
@ -43,8 +58,13 @@ build() {
|
|||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "${srcdir}/MultiMC5-${pkgver}/build"
|
||||
make test
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/MultiMC5-${pkgver}/build"
|
||||
cd "${srcdir}/MultiMC5-${pkgver}/build"
|
||||
make install DESTDIR="${pkgdir}"
|
||||
install -D "${srcdir}/MultiMC5-${pkgver}/application/resources/multimc/scalable/multimc.svg" "${pkgdir}/usr/share/pixmaps/multimc.svg"
|
||||
install -D "${srcdir}/MultiMC5-${pkgver}/application/package/linux/multimc.desktop" "${pkgdir}/usr/share/applications/multimc.desktop"
|
||||
|
|
257
multimc-fix-build-with-qt-511.patch
Normal file
257
multimc-fix-build-with-qt-511.patch
Normal file
|
@ -0,0 +1,257 @@
|
|||
From 4d68c1b509cd289e9f02cbf258e69f2539349029 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Shatunov <me@prok.pw>
|
||||
Date: Fri, 1 Jun 2018 21:20:33 +0700
|
||||
Subject: [PATCH] GH-2291 Fix build with Qt 5.11+
|
||||
|
||||
---
|
||||
api/gui/CMakeLists.txt | 3 +--
|
||||
api/logic/CMakeLists.txt | 2 +-
|
||||
application/dialogs/NotificationDialog.cpp | 1 +
|
||||
application/pages/global/ExternalToolsPage.cpp | 1 +
|
||||
application/pages/global/JavaPage.cpp | 1 +
|
||||
application/pages/global/MinecraftPage.cpp | 1 +
|
||||
application/pages/global/PasteEEPage.cpp | 1 +
|
||||
application/pages/global/ProxyPage.cpp | 2 ++
|
||||
application/pages/instance/NotesPage.cpp | 1 +
|
||||
application/pages/modplatform/ImportPage.cpp | 1 +
|
||||
application/pages/modplatform/VanillaPage.cpp | 1 +
|
||||
cmake/UnitTest.cmake | 5 ++---
|
||||
libraries/LocalPeer/CMakeLists.txt | 2 +-
|
||||
libraries/classparser/CMakeLists.txt | 3 +--
|
||||
libraries/ganalytics/CMakeLists.txt | 2 +-
|
||||
libraries/iconfix/CMakeLists.txt | 2 +-
|
||||
libraries/quazip | 2 +-
|
||||
libraries/rainbow/CMakeLists.txt | 2 +-
|
||||
libraries/systeminfo/CMakeLists.txt | 2 +-
|
||||
19 files changed, 21 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/api/gui/CMakeLists.txt b/api/gui/CMakeLists.txt
|
||||
index deae735fb..9a6ede257 100644
|
||||
--- a/api/gui/CMakeLists.txt
|
||||
+++ b/api/gui/CMakeLists.txt
|
||||
@@ -21,8 +21,7 @@ set_target_properties(MultiMC_gui PROPERTIES CXX_VISIBILITY_PRESET hidden VISIBI
|
||||
generate_export_header(MultiMC_gui)
|
||||
|
||||
# Link
|
||||
-target_link_libraries(MultiMC_gui MultiMC_iconfix MultiMC_logic)
|
||||
-qt5_use_modules(MultiMC_gui Gui)
|
||||
+target_link_libraries(MultiMC_gui MultiMC_iconfix MultiMC_logic Qt5::Gui)
|
||||
|
||||
# Mark and export headers
|
||||
target_include_directories(MultiMC_gui PUBLIC "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
diff --git a/api/logic/CMakeLists.txt b/api/logic/CMakeLists.txt
|
||||
index d6b61d234..a320ab8ba 100644
|
||||
--- a/api/logic/CMakeLists.txt
|
||||
+++ b/api/logic/CMakeLists.txt
|
||||
@@ -476,7 +476,7 @@ generate_export_header(MultiMC_logic)
|
||||
|
||||
# Link
|
||||
target_link_libraries(MultiMC_logic xz-embedded MultiMC_unpack200 systeminfo MultiMC_quazip MultiMC_classparser ${NBT_NAME} ${ZLIB_LIBRARIES})
|
||||
-qt5_use_modules(MultiMC_logic Core Xml Network Concurrent)
|
||||
+target_link_libraries(MultiMC_logic Qt5::Core Qt5::Xml Qt5::Network Qt5::Concurrent)
|
||||
|
||||
# Mark and export headers
|
||||
target_include_directories(MultiMC_logic PUBLIC "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}" PRIVATE "${ZLIB_INCLUDE_DIRS}")
|
||||
diff --git a/application/dialogs/NotificationDialog.cpp b/application/dialogs/NotificationDialog.cpp
|
||||
index d61bf6bd4..80adab3de 100644
|
||||
--- a/application/dialogs/NotificationDialog.cpp
|
||||
+++ b/application/dialogs/NotificationDialog.cpp
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "ui_NotificationDialog.h"
|
||||
|
||||
#include <QTimerEvent>
|
||||
+#include <QStyle>
|
||||
|
||||
NotificationDialog::NotificationDialog(const NotificationChecker::NotificationEntry &entry, QWidget *parent) :
|
||||
QDialog(parent, Qt::MSWindowsFixedSizeDialogHint | Qt::WindowTitleHint | Qt::CustomizeWindowHint),
|
||||
diff --git a/application/pages/global/ExternalToolsPage.cpp b/application/pages/global/ExternalToolsPage.cpp
|
||||
index ff63ecbbb..dd44e5049 100644
|
||||
--- a/application/pages/global/ExternalToolsPage.cpp
|
||||
+++ b/application/pages/global/ExternalToolsPage.cpp
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <QMessageBox>
|
||||
#include <QFileDialog>
|
||||
#include <QStandardPaths>
|
||||
+#include <QTabBar>
|
||||
|
||||
#include "settings/SettingsObject.h"
|
||||
#include "tools/BaseProfiler.h"
|
||||
diff --git a/application/pages/global/JavaPage.cpp b/application/pages/global/JavaPage.cpp
|
||||
index 42577a88d..b828a4505 100644
|
||||
--- a/application/pages/global/JavaPage.cpp
|
||||
+++ b/application/pages/global/JavaPage.cpp
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
#include <QDir>
|
||||
+#include <QTabBar>
|
||||
|
||||
#include "dialogs/VersionSelectDialog.h"
|
||||
|
||||
diff --git a/application/pages/global/MinecraftPage.cpp b/application/pages/global/MinecraftPage.cpp
|
||||
index aecd8d575..e6687cdec 100644
|
||||
--- a/application/pages/global/MinecraftPage.cpp
|
||||
+++ b/application/pages/global/MinecraftPage.cpp
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QDir>
|
||||
+#include <QTabBar>
|
||||
|
||||
#include "settings/SettingsObject.h"
|
||||
#include "MultiMC.h"
|
||||
diff --git a/application/pages/global/PasteEEPage.cpp b/application/pages/global/PasteEEPage.cpp
|
||||
index 3d4e3a88b..09d36ceaa 100644
|
||||
--- a/application/pages/global/PasteEEPage.cpp
|
||||
+++ b/application/pages/global/PasteEEPage.cpp
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <QMessageBox>
|
||||
#include <QFileDialog>
|
||||
#include <QStandardPaths>
|
||||
+#include <QTabBar>
|
||||
|
||||
#include "settings/SettingsObject.h"
|
||||
#include "tools/BaseProfiler.h"
|
||||
diff --git a/application/pages/global/ProxyPage.cpp b/application/pages/global/ProxyPage.cpp
|
||||
index 1e75bab15..e9882a85f 100644
|
||||
--- a/application/pages/global/ProxyPage.cpp
|
||||
+++ b/application/pages/global/ProxyPage.cpp
|
||||
@@ -16,6 +16,8 @@
|
||||
#include "ProxyPage.h"
|
||||
#include "ui_ProxyPage.h"
|
||||
|
||||
+#include <QTabBar>
|
||||
+
|
||||
#include "settings/SettingsObject.h"
|
||||
#include "MultiMC.h"
|
||||
|
||||
diff --git a/application/pages/instance/NotesPage.cpp b/application/pages/instance/NotesPage.cpp
|
||||
index 48bb468c1..3925fdfc7 100644
|
||||
--- a/application/pages/instance/NotesPage.cpp
|
||||
+++ b/application/pages/instance/NotesPage.cpp
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "NotesPage.h"
|
||||
#include "ui_NotesPage.h"
|
||||
+#include <QTabBar>
|
||||
|
||||
NotesPage::NotesPage(BaseInstance *inst, QWidget *parent)
|
||||
: QWidget(parent), ui(new Ui::NotesPage), m_inst(inst)
|
||||
diff --git a/application/pages/modplatform/ImportPage.cpp b/application/pages/modplatform/ImportPage.cpp
|
||||
index 545ca38d1..f00c48110 100644
|
||||
--- a/application/pages/modplatform/ImportPage.cpp
|
||||
+++ b/application/pages/modplatform/ImportPage.cpp
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "dialogs/ProgressDialog.h"
|
||||
#include "dialogs/NewInstanceDialog.h"
|
||||
#include <QFileDialog>
|
||||
+#include <QValidator>
|
||||
#include <InstanceImportTask.h>
|
||||
|
||||
class UrlValidator : public QValidator
|
||||
diff --git a/application/pages/modplatform/VanillaPage.cpp b/application/pages/modplatform/VanillaPage.cpp
|
||||
index 77dbc42a3..c355fccbd 100644
|
||||
--- a/application/pages/modplatform/VanillaPage.cpp
|
||||
+++ b/application/pages/modplatform/VanillaPage.cpp
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <Filter.h>
|
||||
#include <Env.h>
|
||||
#include <InstanceCreationTask.h>
|
||||
+#include <QTabBar>
|
||||
|
||||
VanillaPage::VanillaPage(NewInstanceDialog *dialog, QWidget *parent)
|
||||
: QWidget(parent), dialog(dialog), ui(new Ui::VanillaPage)
|
||||
diff --git a/cmake/UnitTest.cmake b/cmake/UnitTest.cmake
|
||||
index e48ff74df..2552b32ce 100644
|
||||
--- a/cmake/UnitTest.cmake
|
||||
+++ b/cmake/UnitTest.cmake
|
||||
@@ -7,7 +7,7 @@ message(${TEST_RESOURCE_PATH})
|
||||
function(add_unit_test name)
|
||||
set(options "")
|
||||
set(oneValueArgs DATA)
|
||||
- set(multiValueArgs SOURCES LIBS QT)
|
||||
+ set(multiValueArgs SOURCES LIBS)
|
||||
|
||||
cmake_parse_arguments(OPT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
||||
|
||||
@@ -40,8 +40,7 @@ function(add_unit_test name)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
- target_link_libraries(${name}_test ${OPT_LIBS})
|
||||
- qt5_use_modules(${name}_test Test ${OPT_QT})
|
||||
+ target_link_libraries(${name}_test Qt5::Test ${OPT_LIBS})
|
||||
|
||||
target_include_directories(${name}_test PRIVATE "${TEST_RESOURCE_PATH}/UnitTest/")
|
||||
|
||||
diff --git a/libraries/LocalPeer/CMakeLists.txt b/libraries/LocalPeer/CMakeLists.txt
|
||||
index 99e3fe4d9..3d2a1e62c 100644
|
||||
--- a/libraries/LocalPeer/CMakeLists.txt
|
||||
+++ b/libraries/LocalPeer/CMakeLists.txt
|
||||
@@ -26,4 +26,4 @@ endif()
|
||||
add_library(LocalPeer STATIC ${SINGLE_SOURCES})
|
||||
target_include_directories(LocalPeer PUBLIC include)
|
||||
|
||||
-qt5_use_modules(LocalPeer Core Network)
|
||||
+target_link_libraries(LocalPeer Qt5::Core Qt5::Network)
|
||||
diff --git a/libraries/classparser/CMakeLists.txt b/libraries/classparser/CMakeLists.txt
|
||||
index db266f53f..e96062586 100644
|
||||
--- a/libraries/classparser/CMakeLists.txt
|
||||
+++ b/libraries/classparser/CMakeLists.txt
|
||||
@@ -38,5 +38,4 @@ add_definitions(-DCLASSPARSER_LIBRARY)
|
||||
|
||||
add_library(MultiMC_classparser STATIC ${CLASSPARSER_SOURCES} ${CLASSPARSER_HEADERS})
|
||||
target_include_directories(MultiMC_classparser PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
-target_link_libraries(MultiMC_classparser MultiMC_quazip)
|
||||
-qt5_use_modules(MultiMC_classparser Core)
|
||||
+target_link_libraries(MultiMC_classparser MultiMC_quazip Qt5::Core)
|
||||
diff --git a/libraries/ganalytics/CMakeLists.txt b/libraries/ganalytics/CMakeLists.txt
|
||||
index 26b1b47cf..cf1cc5598 100644
|
||||
--- a/libraries/ganalytics/CMakeLists.txt
|
||||
+++ b/libraries/ganalytics/CMakeLists.txt
|
||||
@@ -12,6 +12,6 @@ include/ganalytics.h
|
||||
)
|
||||
|
||||
add_library(ganalytics STATIC ${ganalytics_SOURCES})
|
||||
-qt5_use_modules(ganalytics Core Gui Network)
|
||||
+target_link_libraries(ganalytics Qt5::Core Qt5::Gui Qt5::Network)
|
||||
target_include_directories(ganalytics PUBLIC include)
|
||||
target_link_libraries(ganalytics systeminfo)
|
||||
diff --git a/libraries/iconfix/CMakeLists.txt b/libraries/iconfix/CMakeLists.txt
|
||||
index 93bfdd060..d0b7aa340 100644
|
||||
--- a/libraries/iconfix/CMakeLists.txt
|
||||
+++ b/libraries/iconfix/CMakeLists.txt
|
||||
@@ -15,7 +15,7 @@ internal/qiconloader_p.h
|
||||
add_library(MultiMC_iconfix SHARED ${ICONFIX_SOURCES})
|
||||
target_include_directories(MultiMC_iconfix PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_BINARY_DIR}" )
|
||||
|
||||
-qt5_use_modules(MultiMC_iconfix Core Widgets)
|
||||
+target_link_libraries(MultiMC_iconfix Qt5::Core Qt5::Widgets)
|
||||
|
||||
set_target_properties(MultiMC_iconfix PROPERTIES CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN 1)
|
||||
generate_export_header(MultiMC_iconfix)
|
||||
diff --git a/libraries/rainbow/CMakeLists.txt b/libraries/rainbow/CMakeLists.txt
|
||||
index bc561800c..b7e110458 100644
|
||||
--- a/libraries/rainbow/CMakeLists.txt
|
||||
+++ b/libraries/rainbow/CMakeLists.txt
|
||||
@@ -12,7 +12,7 @@ add_definitions(-DRAINBOW_LIBRARY)
|
||||
add_library(MultiMC_rainbow SHARED ${RAINBOW_SOURCES})
|
||||
target_include_directories(MultiMC_rainbow PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
|
||||
-qt5_use_modules(MultiMC_rainbow Core Gui)
|
||||
+target_link_libraries(MultiMC_rainbow Qt5::Core Qt5::Gui)
|
||||
|
||||
# Install it
|
||||
install(
|
||||
diff --git a/libraries/systeminfo/CMakeLists.txt b/libraries/systeminfo/CMakeLists.txt
|
||||
index 393b53180..173d7b59f 100644
|
||||
--- a/libraries/systeminfo/CMakeLists.txt
|
||||
+++ b/libraries/systeminfo/CMakeLists.txt
|
||||
@@ -19,7 +19,7 @@ elseif (UNIX)
|
||||
endif()
|
||||
|
||||
add_library(systeminfo STATIC ${systeminfo_SOURCES})
|
||||
-qt5_use_modules(systeminfo Core Gui Network)
|
||||
+target_link_libraries(systeminfo Qt5::Core Qt5::Gui Qt5::Network)
|
||||
target_include_directories(systeminfo PUBLIC include)
|
||||
|
||||
include (UnitTest)
|
33
quazip-fix-build-with-qt-511.patch
Normal file
33
quazip-fix-build-with-qt-511.patch
Normal file
|
@ -0,0 +1,33 @@
|
|||
From 469b97b618314ec009a37cad22e9d2541d6481f7 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Shatunov <me@prok.pw>
|
||||
Date: Fri, 1 Jun 2018 21:07:13 +0700
|
||||
Subject: [PATCH] Fix build with Qt 5.11+
|
||||
|
||||
---
|
||||
CMakeLists.txt | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 376583c..7c0c6eb 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -44,10 +44,9 @@ endif()
|
||||
|
||||
add_library(MultiMC_quazip SHARED ${QUAZIP_SRC})
|
||||
target_include_directories(MultiMC_quazip PUBLIC "quazip" "${CMAKE_CURRENT_BINARY_DIR}" PRIVATE ${ZLIB_INCLUDE_DIRS})
|
||||
-target_link_libraries(MultiMC_quazip ${ZLIB_LIBRARIES})
|
||||
+target_link_libraries(MultiMC_quazip Qt5::Core ${ZLIB_LIBRARIES})
|
||||
target_compile_definitions(MultiMC_quazip PRIVATE "-DQUAZIP_BUILD")
|
||||
set_target_properties(MultiMC_quazip PROPERTIES CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN 1)
|
||||
-qt5_use_modules(MultiMC_quazip Core)
|
||||
|
||||
# Install it
|
||||
install(
|
||||
@@ -84,6 +83,5 @@ set(QUAZIP_TEST_SRC
|
||||
)
|
||||
|
||||
add_executable(MultiMC_quazip_test ${QUAZIP_TEST_SRC})
|
||||
-target_link_libraries(MultiMC_quazip_test MultiMC_quazip)
|
||||
-qt5_use_modules(MultiMC_quazip_test Network Test)
|
||||
+target_link_libraries(MultiMC_quazip_test MultiMC_quazip Qt5::Network Qt5::Test)
|
||||
add_test(NAME quazip_testsuite COMMAND MultiMC_quazip_test)
|
Reference in a new issue