From 446b382c741f7b6b882c70e94a0e9e03e594f135 Mon Sep 17 00:00:00 2001 From: Pavel Vatagin Date: Mon, 9 Jan 2017 18:19:54 +0400 Subject: [PATCH] fix configure Windows build (Qt5) (#5586) --- 3rdparty/qxt/CMakeLists.txt | 6 +++++- CMakeLists.txt | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/3rdparty/qxt/CMakeLists.txt b/3rdparty/qxt/CMakeLists.txt index 6514a6472..75fa686b2 100644 --- a/3rdparty/qxt/CMakeLists.txt +++ b/3rdparty/qxt/CMakeLists.txt @@ -28,4 +28,8 @@ ADD_LIBRARY(qxt STATIC ${QXT-SOURCES-MOC} ) -QT5_USE_MODULES(qxt Core Widgets X11Extras) +if(WIN32) + QT5_USE_MODULES(qxt Core Widgets) +else(WIN32) + QT5_USE_MODULES(qxt Core Widgets X11Extras) +endif(WIN32) diff --git a/CMakeLists.txt b/CMakeLists.txt index 50e3bee57..7309e5b85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,7 @@ pkg_check_modules(TAGLIB REQUIRED taglib>=1.6) if (WIN32) find_package(ZLIB REQUIRED) - find_library(QTSPARKLE_LIBRARIES qtsparkle) + find_library(QTSPARKLE_LIBRARIES qtsparkle-qt5) endif (WIN32) find_library(LASTFM5_LIBRARIES lastfm5) @@ -299,7 +299,11 @@ if (HAVE_VK) endif(HAVE_VK) # We can include the Qt definitions now -set(QT_LIBRARIES Qt5::Core Qt5::OpenGL Qt5::Sql Qt5::Network Qt5::Xml Qt5::Widgets Qt5::Concurrent Qt5::X11Extras Qt5::DBus) +if(WIN32) + set(QT_LIBRARIES Qt5::Core Qt5::OpenGL Qt5::Sql Qt5::Network Qt5::Xml Qt5::Widgets Qt5::Concurrent) +else(WIN32) + set(QT_LIBRARIES Qt5::Core Qt5::OpenGL Qt5::Sql Qt5::Network Qt5::Xml Qt5::Widgets Qt5::Concurrent Qt5::X11Extras Qt5::DBus) +endif(WIN32) # Remove GLU and GL from the link line - they're not really required # and don't exist on my mingw toolchain