diff --git a/CMakeLists.txt b/CMakeLists.txt index 58d6eb335..fec9d7802 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,6 +115,7 @@ if(Qt5Core_DIR) macro(setup_qt) endmacro() + set(QT_RCC_EXECUTABLE "${Qt5Core_RCC_EXECUTABLE}") #FIXME: CrashReporter depends on deprecated QHttp set(WITH_CRASHREPORTER OFF) set(WITH_BREAKPAD OFF) @@ -123,15 +124,27 @@ else() set(NEEDED_QT4_COMPONENTS "QtCore" "QtXml" "QtNetwork") if(BUILD_GUI) - list(APPEND NEEDED_QT4_COMPONENTS "QtGui" "QtWebkit" "QtUiTools" ) + list(APPEND NEEDED_QT4_COMPONENTS "QtGui" "QtWebkit" "QtUiTools" "QtSvg" ) endif() 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) 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) if(NOT BUILD_GUI) set(QT_DONT_USE_QTGUI TRUE) diff --git a/lang/translations.cmake b/lang/translations.cmake index 45ea39a85..a83c7620f 100644 --- a/lang/translations.cmake +++ b/lang/translations.cmake @@ -39,7 +39,7 @@ macro(add_tomahawk_translations language) # Run the resource compiler (rcc_options should already be set) add_custom_command( OUTPUT ${trans_outfile} - COMMAND ${Qt5Core_RCC_EXECUTABLE} + COMMAND ${QT_RCC_EXECUTABLE} ARGS ${rcc_options} -name ${trans_file} -o ${trans_outfile} ${trans_infile} MAIN_DEPENDENCY ${trans_infile} DEPENDS ${QM_FILES} diff --git a/src/libtomahawk/CMakeLists.txt b/src/libtomahawk/CMakeLists.txt index 18157cadf..3d66288e8 100644 --- a/src/libtomahawk/CMakeLists.txt +++ b/src/libtomahawk/CMakeLists.txt @@ -154,12 +154,20 @@ set( libGuiSources widgets/searchlineedit/SearchLineEdit.cpp ) -IF(QCA2_FOUND) +if(QCA2_FOUND) set( libGuiSources ${libGuiSources} utils/GroovesharkParser.cpp ) 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 SourceList.cpp Pipeline.cpp diff --git a/src/libtomahawk/TomahawkPlugin.h b/src/libtomahawk/TomahawkPlugin.h index cf6c35760..06c869cff 100644 --- a/src/libtomahawk/TomahawkPlugin.h +++ b/src/libtomahawk/TomahawkPlugin.h @@ -1,3 +1,5 @@ +#include + #if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 ) #if defined(Q_EXPORT_PLUGIN) #undef Q_EXPORT_PLUGIN diff --git a/src/libtomahawk/utils/TomahawkUtilsGui.cpp b/src/libtomahawk/utils/TomahawkUtilsGui.cpp index c0db15894..247be38eb 100644 --- a/src/libtomahawk/utils/TomahawkUtilsGui.cpp +++ b/src/libtomahawk/utils/TomahawkUtilsGui.cpp @@ -39,6 +39,8 @@ #include #include +//FIXME: Qt5: this doesnt fail because Q_WS_X11 is deprecated +//TODO: change to Q_OS_X11 and fix errors #ifdef Q_WS_X11 #include #include