1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 14:16:32 +02:00

qt5: that should have ended up in the latest commit, too late for git

for me
This commit is contained in:
Dominik Schmidt
2013-01-06 04:58:31 +01:00
parent 110fb0100d
commit d7ba7ead99
5 changed files with 31 additions and 6 deletions

View File

@@ -115,6 +115,7 @@ if(Qt5Core_DIR)
macro(setup_qt) macro(setup_qt)
endmacro() endmacro()
set(QT_RCC_EXECUTABLE "${Qt5Core_RCC_EXECUTABLE}")
#FIXME: CrashReporter depends on deprecated QHttp #FIXME: CrashReporter depends on deprecated QHttp
set(WITH_CRASHREPORTER OFF) set(WITH_CRASHREPORTER OFF)
set(WITH_BREAKPAD OFF) set(WITH_BREAKPAD OFF)
@@ -123,15 +124,27 @@ else()
set(NEEDED_QT4_COMPONENTS "QtCore" "QtXml" "QtNetwork") set(NEEDED_QT4_COMPONENTS "QtCore" "QtXml" "QtNetwork")
if(BUILD_GUI) if(BUILD_GUI)
list(APPEND NEEDED_QT4_COMPONENTS "QtGui" "QtWebkit" "QtUiTools" ) list(APPEND NEEDED_QT4_COMPONENTS "QtGui" "QtWebkit" "QtUiTools" "QtSvg" )
endif() endif()
macro_optional_find_package(Qt4 4.7.0 COMPONENTS ${NEEDED_QT4_COMPONENTS} ) macro_optional_find_package(Qt4 4.7.0 COMPONENTS ${NEEDED_QT4_COMPONENTS} )
macro_logfeature(QT4_FOUND "Qt" "A cross-platform application and UI framework" "http://qt.nokia.com" TRUE "" "If you see this, although libqt4-devel is installed, check whether the \n qtwebkit-devel package and whatever contains QtUiTools is installed too") macro_log_feature(QT4_FOUND "Qt" "A cross-platform application and UI framework" "http://qt.nokia.com" TRUE "" "If you see this, although libqt4-devel is installed, check whether the \n qtwebkit-devel package and whatever contains QtUiTools is installed too")
macro(qt5_use_modules) macro(qt5_use_modules)
endmacro() endmacro()
macro(qt_wrap_ui)
qt4_wrap_ui(${ARGN})
endmacro()
macro(qt_add_resources)
qt4_add_resources(${ARGN})
endmacro()
macro(qt_add_translation)
qt4_add_translation(${ARGN})
endmacro()
macro(setup_qt) macro(setup_qt)
if(NOT BUILD_GUI) if(NOT BUILD_GUI)
set(QT_DONT_USE_QTGUI TRUE) set(QT_DONT_USE_QTGUI TRUE)

View File

@@ -39,7 +39,7 @@ macro(add_tomahawk_translations language)
# Run the resource compiler (rcc_options should already be set) # Run the resource compiler (rcc_options should already be set)
add_custom_command( add_custom_command(
OUTPUT ${trans_outfile} OUTPUT ${trans_outfile}
COMMAND ${Qt5Core_RCC_EXECUTABLE} COMMAND ${QT_RCC_EXECUTABLE}
ARGS ${rcc_options} -name ${trans_file} -o ${trans_outfile} ${trans_infile} ARGS ${rcc_options} -name ${trans_file} -o ${trans_outfile} ${trans_infile}
MAIN_DEPENDENCY ${trans_infile} MAIN_DEPENDENCY ${trans_infile}
DEPENDS ${QM_FILES} DEPENDS ${QM_FILES}

View File

@@ -154,12 +154,20 @@ set( libGuiSources
widgets/searchlineedit/SearchLineEdit.cpp widgets/searchlineedit/SearchLineEdit.cpp
) )
IF(QCA2_FOUND) if(QCA2_FOUND)
set( libGuiSources ${libGuiSources} utils/GroovesharkParser.cpp ) set( libGuiSources ${libGuiSources} utils/GroovesharkParser.cpp )
set( libGuiHeaders ${libGuiHeaders} utils/GroovesharkParser.h ) set( libGuiHeaders ${libGuiHeaders} utils/GroovesharkParser.h )
ENDIF(QCA2_FOUND) endif()
set( libSources if(UNIX AND NOT APPLE)
if(BUILD_GUI AND X11_FOUND)
include_directories( ${THIRDPARTY_DIR}/libqnetwm )
list(APPEND libSources ${libSources} ${THIRDPARTY_DIR}/libqnetwm/libqnetwm/netwm.cpp)
list(APPEND LINK_LIBRARIES ${X11_LIBRARIES})
endif()
endif()
list(APPEND libSources
TomahawkSettings.cpp TomahawkSettings.cpp
SourceList.cpp SourceList.cpp
Pipeline.cpp Pipeline.cpp

View File

@@ -1,3 +1,5 @@
#include <QtPlugin>
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 ) #if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
#if defined(Q_EXPORT_PLUGIN) #if defined(Q_EXPORT_PLUGIN)
#undef Q_EXPORT_PLUGIN #undef Q_EXPORT_PLUGIN

View File

@@ -39,6 +39,8 @@
#include <QStyleOption> #include <QStyleOption>
#include <QDesktopServices> #include <QDesktopServices>
//FIXME: Qt5: this doesnt fail because Q_WS_X11 is deprecated
//TODO: change to Q_OS_X11 and fix errors
#ifdef Q_WS_X11 #ifdef Q_WS_X11
#include <QtGui/QX11Info> #include <QtGui/QX11Info>
#include <libqnetwm/netwm.h> #include <libqnetwm/netwm.h>