Cleanup linking of QT components

This commit is contained in:
Jonas Kvinge 2018-07-03 19:33:09 +02:00
parent b0f86a38ca
commit 6dccc8857b
1 changed files with 12 additions and 11 deletions

View File

@ -102,10 +102,9 @@ pkg_check_modules(PHONON phonon4qt5)
pkg_check_modules(SQLITE REQUIRED sqlite3>=3.7) pkg_check_modules(SQLITE REQUIRED sqlite3>=3.7)
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
pkg_check_modules(CHROMAPRINT REQUIRED libchromaprint) pkg_check_modules(CHROMAPRINT REQUIRED libchromaprint)
pkg_check_modules(LIBPULSE libpulse)
pkg_check_modules(LIBGPOD libgpod-1.0>=0.7.92) pkg_check_modules(LIBGPOD libgpod-1.0>=0.7.92)
pkg_check_modules(LIBMTP libmtp>=1.0) pkg_check_modules(LIBMTP libmtp>=1.0)
pkg_check_modules(LIBPULSE libpulse)
pkg_check_modules(LIBXML libxml-2.0)
pkg_check_modules(IMOBILEDEVICE libimobiledevice-1.0) pkg_check_modules(IMOBILEDEVICE libimobiledevice-1.0)
pkg_check_modules(USBMUXD libusbmuxd) pkg_check_modules(USBMUXD libusbmuxd)
pkg_check_modules(PLIST libplist) pkg_check_modules(PLIST libplist)
@ -116,7 +115,7 @@ endif(WIN32)
# QT # QT
set(QT_MIN_VERSION 5.6.0) set(QT_MIN_VERSION 5.6.0)
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core OpenGL Sql Network Xml Widgets Concurrent Test) find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core Concurrent Widgets Network Sql OpenGL Xml)
if(X11_FOUND) if(X11_FOUND)
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS X11Extras) find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS X11Extras)
endif() endif()
@ -128,14 +127,16 @@ if(APPLE)
find_package(Qt5 REQUIRED COMPONENTS MacExtras) find_package(Qt5 REQUIRED COMPONENTS MacExtras)
endif() endif()
if(UNIX AND X11_FOUND AND DBUS_FOUND) set(QT_LIBRARIES Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network Qt5::Sql Qt5::OpenGL Qt5::Xml)
set(QT_LIBRARIES Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network Qt5::Sql Qt5::OpenGL Qt5::Xml Qt5::X11Extras Qt5::DBus)
elseif(UNIX AND X11_FOUND) if(DBUS_FOUND)
set(QT_LIBRARIES Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network Qt5::Sql Qt5::OpenGL Qt5::Xml Qt5::X11Extras) set(QT_LIBRARIES ${QT_LIBRARIES} Qt5::DBus)
elseif(APPLE) endif()
set(QT_LIBRARIES Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network Qt5::Sql Qt5::OpenGL Qt5::Xml Qt5::MacExtras) if(X11_FOUND)
else() set(QT_LIBRARIES ${QT_LIBRARIES} Qt5::X11Extras)
set(QT_LIBRARIES Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network Qt5::Sql Qt5::OpenGL Qt5::Xml) endif()
if(APPLE)
set(QT_LIBRARIES ${QT_LIBRARIES} Qt5::MacExtras)
endif() endif()
# Don't try to use webkit if their include directories couldn't be found. # Don't try to use webkit if their include directories couldn't be found.