summaryrefslogtreecommitdiffstats
path: root/cmake/QtTargetHelpers.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/QtTargetHelpers.cmake')
-rw-r--r--cmake/QtTargetHelpers.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/QtTargetHelpers.cmake b/cmake/QtTargetHelpers.cmake
index 397628ba11a..da210820bb2 100644
--- a/cmake/QtTargetHelpers.cmake
+++ b/cmake/QtTargetHelpers.cmake
@@ -925,6 +925,12 @@ function(qt_internal_export_additional_targets_file_finalizer id)
list(LENGTH arg_TARGETS num_TARGETS)
+ if(num_TARGETS EQUAL 0)
+ # Return early without creating and installing the additional file if there are no targets
+ # to process.
+ return()
+ endif()
+
# Determine the release configurations we're currently building
if(QT_GENERATOR_IS_MULTI_CONFIG)
set(active_configurations ${CMAKE_CONFIGURATION_TYPES})