mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 13:47:26 +02:00
Update TomahawkUse.cmake.in to current qt5 behaviours
This commit is contained in:
@@ -3,15 +3,41 @@
|
|||||||
set( TOMAHAWK_QT5 @TOMAHAWK_QT5@ )
|
set( TOMAHAWK_QT5 @TOMAHAWK_QT5@ )
|
||||||
|
|
||||||
if(TOMAHAWK_QT5)
|
if(TOMAHAWK_QT5)
|
||||||
find_package(Qt5Core)
|
message(STATUS "Found Qt5! Be aware that Qt5-support is still experimental and not officially supported!")
|
||||||
find_package(Qt5Network)
|
|
||||||
find_package(Qt5Gui)
|
|
||||||
find_package(Qt5Sql)
|
|
||||||
|
|
||||||
set(NEEDED_QT4_COMPONENTS "QtCore" "QtXml" "QtNetwork")
|
# CMAKE 2.8.13+/3.0.0+ requires these for IMPORTed targets
|
||||||
if(BUILD_GUI OR NOT DEFINED BUILD_GUI)
|
find_package(Qt5Core REQUIRED)
|
||||||
find_package(Qt5Widgets)
|
find_package(Qt5Concurrent REQUIRED)
|
||||||
find_package(Qt5Svg)
|
find_package(Qt5Svg REQUIRED)
|
||||||
|
find_package(Qt5UiTools REQUIRED)
|
||||||
|
find_package(Qt5WebKitWidgets REQUIRED)
|
||||||
|
find_package(Qt5Widgets REQUIRED)
|
||||||
|
find_package(Qt5Xml REQUIRED)
|
||||||
|
|
||||||
|
macro(qt_wrap_ui)
|
||||||
|
qt5_wrap_ui(${ARGN})
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
macro(qt_add_resources)
|
||||||
|
qt5_add_resources(${ARGN})
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
find_package(Qt5LinguistTools REQUIRED)
|
||||||
|
macro(qt_add_translation)
|
||||||
|
qt5_add_translation(${ARGN})
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
if( UNIX AND NOT APPLE )
|
||||||
|
# We need this to find the paths to qdbusxml2cpp and co
|
||||||
|
find_package(Qt5DBus REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(APPLE)
|
||||||
|
find_package(Qt5MacExtras REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
find_package(Qt5WinExtras REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
macro(qt_wrap_ui)
|
macro(qt_wrap_ui)
|
||||||
@@ -26,6 +52,24 @@ if(TOMAHAWK_QT5)
|
|||||||
macro(qt_add_translation)
|
macro(qt_add_translation)
|
||||||
qt5_add_translation(${ARGN})
|
qt5_add_translation(${ARGN})
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
if( UNIX AND NOT APPLE )
|
||||||
|
macro(qt_add_dbus_interface)
|
||||||
|
qt5_add_dbus_interface(${ARGN})
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
macro(qt_add_dbus_adaptor)
|
||||||
|
qt5_add_dbus_adaptor(${ARGN})
|
||||||
|
endmacro()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
macro(setup_qt)
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
set(QT_RCC_EXECUTABLE "${Qt5Core_RCC_EXECUTABLE}")
|
||||||
|
#FIXME: CrashReporter depends on deprecated QHttp
|
||||||
|
set(WITH_KDE4 OFF)
|
||||||
|
|
||||||
else(TOMAHAWK_QT5)
|
else(TOMAHAWK_QT5)
|
||||||
find_package(Qt4 COMPONENTS QtNetwork QtCore QtGui QtSql REQUIRED)
|
find_package(Qt4 COMPONENTS QtNetwork QtCore QtGui QtSql REQUIRED)
|
||||||
include( ${QT_USE_FILE} )
|
include( ${QT_USE_FILE} )
|
||||||
|
Reference in New Issue
Block a user