Skip to content

Commit

Permalink
Merge pull request #89 from rock-core/fix-qt5-moc-ui-fallback
Browse files Browse the repository at this point in the history
Rock.cmake: Fix MOC/MOC5, UI/UI5 fallback when only qt5 is enabled
  • Loading branch information
pierrewillenbrockdfki authored Jul 26, 2024
2 parents 401b4f0 + 0d30083 commit 47b39b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/Rock.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,8 @@ macro(rock_target_definition TARGET_NAME)
list(LENGTH ${TARGET_NAME}_MOC5 QT_MOC5_LENGTH)
if ((QT_MOC_LENGTH GREATER 0) AND (DEFINED ROCK_QT_VERSION_5) AND (NOT DEFINED ROCK_QT_VERSION_4) AND (QT_MOC5_LENGTH EQUAL 0))
message(WARNING "you are requesting moc generation for Qt4 using the MOC keyword but used rock_find_qt5 to find qt. We are assuming here that you wanted to use the qt5 moc (MOC5 keyword) instead of the qt4 moc")
set(QT_MOC5_LENGTH QT_MOC_LENGTH)
set(${TARGET_NAME}_MOC5 ${TARGET_NAME}_MOC)
set(QT_MOC5_LENGTH ${QT_MOC_LENGTH})
set(${TARGET_NAME}_MOC5 ${${TARGET_NAME}_MOC})
set(${TARGET_NAME}_MOC)
set(QT_MOC_LENGTH 0)
endif()
Expand Down Expand Up @@ -664,8 +664,8 @@ macro(rock_target_definition TARGET_NAME)
list(LENGTH ${TARGET_NAME}_UI5 QT_UI5_LENGTH)
if ((QT_UI_LENGTH GREATER 0) AND (DEFINED ROCK_QT_VERSION_5) AND (NOT DEFINED ROCK_QT_VERSION_4) AND (QT_UI5_LENGTH EQUAL 0))
message(WARNING "you are requesting ui generation for Qt5 using the UI keyword but used rock_find_qt5 to find qt. We are assuming here that you wanted to use the qt5 ui (UI5 keyword) instead of the qt4 ui")
set(QT_UI5_LENGTH QT_UI_LENGTH)
set(${TARGET_NAME}_UI5 ${TARGET_NAME}_UI)
set(QT_UI5_LENGTH ${QT_UI_LENGTH})
set(${TARGET_NAME}_UI5 ${${TARGET_NAME}_UI})
set(${TARGET_NAME}_UI)
set(QT_UI_LENGTH 0)
endif()
Expand Down

0 comments on commit 47b39b8

Please sign in to comment.