From 8f985ff1acb527f7774d3a9240738dfa564a8e71 Mon Sep 17 00:00:00 2001 From: Daniel Nachbaur Date: Tue, 28 Apr 2015 17:52:11 +0200 Subject: [PATCH] Port to Qt5 --- CommonApplication.cmake | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/CommonApplication.cmake b/CommonApplication.cmake index 9c67960..18b07f2 100644 --- a/CommonApplication.cmake +++ b/CommonApplication.cmake @@ -25,20 +25,26 @@ function(COMMON_APPLICATION Name) set(LINK_LIBRARIES ${${NAME}_LINK_LIBRARIES}) if(${NAME}_MOC_HEADERS) - if(NOT QT4_FOUND) - message(FATAL_ERROR "Qt4 not found, needed for application ${Name}") + if(NOT Qt5Core_FOUND) + message(FATAL_ERROR "Qt5Core not found, needed for MOC of application ${Name}") endif() - qt4_wrap_cpp(MOC_SOURCES ${${NAME}_MOC_HEADERS}) + qt5_wrap_cpp(MOC_SOURCES ${${NAME}_MOC_HEADERS}) list(APPEND HEADERS ${${NAME}_MOC_HEADERS}) list(APPEND SOURCES ${MOC_SOURCES}) endif() if(${NAME}_UI_FORMS) - qt4_wrap_ui(UI_SOURCES ${${NAME}_UI_FORMS}) + if(NOT Qt5Widgets_FOUND) + message(FATAL_ERROR "Qt5Widgets not found, needed for UIC of application ${Name}") + endif() + qt5_wrap_ui(UI_SOURCES ${${NAME}_UI_FORMS}) list(APPEND SOURCES ${UI_SOURCES}) include_directories(${PROJECT_BINARY_DIR}) endif() if(${NAME}_RESOURCES) - qt4_add_resources(QRC_SOURCES ${${NAME}_RESOURCES}) + if(NOT Qt5Core_FOUND) + message(FATAL_ERROR "Qt5Core not found, needed for QRC of application ${Name}") + endif() + qt5_add_resources(QRC_SOURCES ${${NAME}_RESOURCES}) list(APPEND SOURCES ${QRC_SOURCES}) endif()