diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2020-01-29 16:25:06 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-01-29 15:36:55 +0000 |
commit | f47efdac1d704698cbc8746b4edc59e79e46a2dd (patch) | |
tree | d14e2e09447142f6d907a63610a1c7a0fddbf06a /src/corelib | |
parent | 274a61d0966e96f66ec9f0fd63f67966b28bf212 (diff) |
Only add --automoc-json to AUTOMOC_OPTIONS for metatypes targets
Change-Id: I7c2e859a83ea78c2a6cf2ad59c175c1b29a74621
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/Qt6CoreMacros.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index 3857d46b36..446926cd73 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -707,6 +707,11 @@ function(qt6_generate_meta_types_json_file target) endif() endif() + # Tell automoc to output json files + set_property(TARGET "${target}" APPEND PROPERTY + AUTOMOC_MOC_OPTIONS "--output-json" + ) + get_target_property(target_type ${target} TYPE) if (target_type STREQUAL "INTERFACE_LIBRARY" OR CMAKE_VERSION VERSION_LESS "3.16.0") # interface libraries not supported or cmake version is not high enough |