diff --git a/cmake/QtBuildInformation.cmake b/cmake/QtBuildInformation.cmake index ff9cc9d866f..15b1a7926ad 100644 --- a/cmake/QtBuildInformation.cmake +++ b/cmake/QtBuildInformation.cmake @@ -99,7 +99,8 @@ function(qt_configure_eval_commands) endif() set(command_index 0) - while(command_index LESS command_count) + # LESS_EQUAL is used because command_count is not actual count, but last added command index + while(command_index LESS_EQUAL command_count) get_property(command_args GLOBAL PROPERTY qt_configure_command_${command_index}) if(NOT command_args) message(FATAL_ERROR