CMake: Check CMAKE_CONFIGURATION_TYPES when doing automoc extraction

Otherwise when configuring a standalone example without specifying a
CMAKE_BUILD_TYPE (so it's empty), building fails because
qt6_generate_meta_types_json_file thinks it's being called with
a multi-config generator.

Change-Id: I360c7dbb19522155d8e72f98836fb663916715a0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Alexandru Croitor 2020-05-25 19:18:49 +02:00
parent 4182cf409e
commit f77c4ebb7d

View File

@ -619,7 +619,7 @@ function(qt6_generate_meta_types_json_file target)
AUTOMOC_MOC_OPTIONS "--output-json"
)
if(CMAKE_BUILD_TYPE)
if(NOT CMAKE_CONFIGURATION_TYPES)
set(cmake_autogen_cache_file
"${target_binary_dir}/CMakeFiles/${target}_autogen.dir/ParseCache.txt")
set(mutli_config_args