mirror of https://github.com/qt/qtactiveqt.git
Run dumpcpp also when type library is specified by UUID
We should only give a value to the custom command's MAIN_DEPENDENCY if
the type library is a file, not when it is an UUID. If the
MAIN_DEPENDENCY does not exist as a target or a file, the custom command
is not run at build time.
This regression was introduced in
377c95c4a0
when the MAIN_DEPENDENCY was
introduced to reevaluate the custom command if the type library file
changed.
Fixes: QTBUG-126518
Pick-to: 6.8
Change-Id: Idc5346049ce9e5215827a454c3031e5062fb010d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
parent
2c9aabcd64
commit
24ea2efe32
|
@ -49,6 +49,9 @@ function(qt6_target_typelibs target)
|
|||
set(hex_six "${hex_two}${hex_two}${hex_two}")
|
||||
|
||||
set(ident_ "[a-zA-Z0-9_]")
|
||||
|
||||
set(typelibFilePath "") # Only set if type library is a file and not a UUID
|
||||
|
||||
foreach(lib IN LISTS arg_LIBRARIES)
|
||||
unset(libpath CACHE)
|
||||
if(lib MATCHES "^(${ident_}+):({${hex_four}-${hex_two}-${hex_two}-${hex_two}-${hex_six}})$")
|
||||
|
@ -71,6 +74,7 @@ C indentifier")
|
|||
endif()
|
||||
endif()
|
||||
|
||||
set(typelibFilePath ${libpath})
|
||||
get_filename_component(out_basename "${libpath}" NAME_WE)
|
||||
endif()
|
||||
|
||||
|
@ -88,7 +92,7 @@ C indentifier")
|
|||
"${libpath}" -o "${out_filebasepath}"
|
||||
${extra_args}
|
||||
DEPENDS ${QT_CMAKE_EXPORT_NAMESPACE}::dumpcpp
|
||||
MAIN_DEPENDENCY ${libpath}
|
||||
MAIN_DEPENDENCY ${typelibFilePath}
|
||||
WORKING_DIRECTORY "${output_directory}"
|
||||
COMMENT "Generate type lib sources ${out_header} ${out_source}..."
|
||||
)
|
||||
|
|
|
@ -21,4 +21,4 @@ qt_internal_add_test(tst_dumpcpp
|
|||
)
|
||||
|
||||
qt6_target_typelibs(tst_dumpcpp LIBRARIES "ieframe.dll")
|
||||
qt6_target_typelibs(tst_dumpcpp LIBRARIES "msxml6.dll")
|
||||
qt6_target_typelibs(tst_dumpcpp LIBRARIES "msxml6:{F5078F18-C551-11D3-89B9-0000F81FE221}")
|
||||
|
|
Loading…
Reference in New Issue