Skip processing '-framework' flags in qt6_generate_meta_types_dep_file

Otherwise we get generation errors due to calling GENEX_EVAL on
something that is an invalid target.

Perhaps there will be a better way once
https://gitlab.kitware.com/cmake/cmake/issues/20287 is fixed.

Change-Id: I6af9511cbb9942b9edbc3b3fc7028936308715d8
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexandru Croitor 2020-01-29 15:54:38 +01:00
parent ccdc6c2dd3
commit 274a61d096

View File

@ -630,6 +630,10 @@ function(qt6_generate_meta_types_dep_file target dep_file dep_file_install)
set(gen_exp "")
set(gen_exp_install "")
foreach(dep IN LISTS link_dependencies)
# Skip over any flags starting with -, like -framework or -lboo.
if("${dep}" MATCHES "^-")
continue()
endif()
# replace LINK_ONLY with true, or we will get an error evaluating that
# generator expression
string(REPLACE "$<LINK_ONLY:" "$<1:" genex_target "$<GENEX_EVAL:${dep}>")