Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to Qt5 #311

Merged
merged 1 commit into from
May 12, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions CommonApplication.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down