diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index ba70e82ce7..6f178e2e58 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -924,14 +924,22 @@ function(add_qt_tool name) return() endif() - qt_parse_all_arguments(arg "add_qt_tool" "BOOTSTRAP;NO_INSTALL" "" "${__default_private_args}" ${ARGN}) + qt_parse_all_arguments(arg "add_qt_tool" "BOOTSTRAP;NO_QT;NO_INSTALL" "" "${__default_private_args}" ${ARGN}) set(disable_autogen_tools "${arg_DISABLE_AUTOGEN_TOOLS}") - if (arg_BOOTSTRAP) - set(corelib ${QT_CMAKE_EXPORT_NAMESPACE}::Bootstrap) - list(APPEND disable_autogen_tools "uic" "moc" "rcc") + if (arg_NO_QT) + # FIXME: Remove NO_QT again once qmake can use a "normal" Qt! + if (arg_BOOTSTRAP) + message(FATAL_ERROR "Tool can not be NO_QT and BOOTSTRAP at the same time!") + endif() + set(corelib "") else() - set(corelib ${QT_CMAKE_EXPORT_NAMESPACE}::Core) + if (arg_BOOTSTRAP) + set(corelib ${QT_CMAKE_EXPORT_NAMESPACE}::Bootstrap) + list(APPEND disable_autogen_tools "uic" "moc" "rcc") + else() + set(corelib ${QT_CMAKE_EXPORT_NAMESPACE}::Core) + endif() endif() set(bootstrap "") diff --git a/qmake/CMakeLists.txt b/qmake/CMakeLists.txt index d40ec9119b..fc6e4ceea3 100644 --- a/qmake/CMakeLists.txt +++ b/qmake/CMakeLists.txt @@ -12,6 +12,7 @@ find_library(FWFoundation Foundation) # special case ##################################################################### add_qt_tool(qmake # special case + NO_QT # special case # GUI # special case: remove this SOURCES ../src/corelib/codecs/qutfcodec.cpp ../src/corelib/codecs/qutfcodec_p.h