diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b8ea595..f3b21b56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,15 +41,15 @@ include(FeatureSummary) add_definitions(-DQT_NO_URL_CAST_FROM_STRING) -find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED +find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED Core Qml Quick - QuickCompiler ) - -if (QUICK_COMPILER) - find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED QuickCompiler) +if (QT_MAJOR_VERSION STREQUAL "5") + if (QUICK_COMPILER) + find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED QuickCompiler) + endif() endif() find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS diff --git a/components/mobileshell/CMakeLists.txt b/components/mobileshell/CMakeLists.txt index 12bb431e..80565459 100644 --- a/components/mobileshell/CMakeLists.txt +++ b/components/mobileshell/CMakeLists.txt @@ -20,13 +20,15 @@ set(mobileshellplugin_SRCS homescreen/favoritesmodel.cpp taskswitcher/displaysmodel.cpp ) - -if(QUICK_COMPILER) - qtquick_compiler_add_resources(RESOURCES resources.qrc) +if (QT_MAJOR_VERSION STREQUAL "5") + if(QUICK_COMPILER) + qtquick_compiler_add_resources(RESOURCES resources.qrc) + else() + qt5_add_resources(RESOURCES resources.qrc) + endif() else() qt5_add_resources(RESOURCES resources.qrc) endif() - add_library(mobileshellplugin SHARED ${mobileshellplugin_SRCS} ${RESOURCES}) target_link_libraries(mobileshellplugin