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

Rock.cmake: Fix MOC/MOC5, UI/UI5 fallback when only qt5 is enabled #89

Merged
merged 1 commit into from
Jul 26, 2024
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
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