| 1 |
diff --git a/cmake/QtBaseHelpers.cmake b/cmake/QtBaseHelpers.cmake |
| 2 |
index 4b48f8f176..63e445e346 100644 |
| 3 |
--- a/cmake/QtBaseHelpers.cmake |
| 4 |
+++ b/cmake/QtBaseHelpers.cmake |
| 5 |
@@ -212,7 +212,7 @@ macro(qt_internal_qtbase_build_repo) |
| 6 |
endif() |
| 7 |
|
| 8 |
if(NOT QT_INTERNAL_BUILD_STANDALONE_PARTS) |
| 9 |
- if(QT_FEATURE_settings) |
| 10 |
+ if(QT_WILL_BUILD_TOOLS AND QT_FEATURE_settings) |
| 11 |
add_subdirectory(qmake) |
| 12 |
endif() |
| 13 |
|
| 14 |
diff --git a/qmake/CMakeLists.txt b/qmake/CMakeLists.txt |
| 15 |
index 9334ca72ab..801b4f7647 100644 |
| 16 |
--- a/qmake/CMakeLists.txt |
| 17 |
+++ b/qmake/CMakeLists.txt |
| 18 |
@@ -112,19 +112,6 @@ qt_internal_add_tool(${target_name} |
| 19 |
generators/win32/msvc_objectmodel.cpp # xml symbols clash with generators/win32/msbuild_objectmodel.cpp |
| 20 |
library/qmakeparser.cpp # struct statics clashes with qmakeevaluator_p.h |
| 21 |
) |
| 22 |
- |
| 23 |
-# When we don't build tools, we still want to be able to build the documentation. |
| 24 |
-# Add a fake interface library to make sure the documentation target is created. |
| 25 |
-# We use the direct name rather than ${target_name} to ensure the doc target keeps |
| 26 |
-# the original name even when cross-building. |
| 27 |
-if(NOT TARGET qmake) |
| 28 |
- add_library(qmake INTERFACE) |
| 29 |
-endif() |
| 30 |
- |
| 31 |
-qt_internal_add_docs(qmake |
| 32 |
- doc/qmake.qdocconf |
| 33 |
-) |
| 34 |
- |
| 35 |
qt_internal_return_unless_building_tools() |
| 36 |
|
| 37 |
#### Keys ignored in scope 1:.:.:qmake.pro:<TRUE>: |
| 38 |
@@ -154,3 +141,6 @@ set_target_properties(${target_name} PROPERTIES |
| 39 |
qt_internal_apply_gc_binaries(${target_name} PRIVATE) |
| 40 |
qt_skip_warnings_are_errors(${target_name}) |
| 41 |
|
| 42 |
+qt_internal_add_docs(${target_name} |
| 43 |
+ doc/qmake.qdocconf |
| 44 |
+) |
| 45 |
-- |
| 46 |
2.46.2 |
| 47 |
|