summaryrefslogtreecommitdiffstats
path: root/src/dbus
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2020-01-31 14:44:52 +0100
committerLeander Beernaert <leander.beernaert@qt.io>2020-02-03 08:07:03 +0000
commit465949420a877099247d94dd4db54d19ca5a9a7c (patch)
tree3c108ee74ace2abd74c456b75ea54ef59176e11d /src/dbus
parent4954adea39cb9e02be36c9b786016ac2802fcbb9 (diff)
Update add_custom_command and add_custom_target dependencies
If we don't add the executable used by the custom_target and/or custom_command to list of the command's/target's dependencies (DEPENDS) the generated file will not update should the executable change. Change-Id: Idce30f3dd4f756d9e8f6848c5e16f5dd6c7c8f0a Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/dbus')
-rw-r--r--src/dbus/Qt6DBusMacros.cmake13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/dbus/Qt6DBusMacros.cmake b/src/dbus/Qt6DBusMacros.cmake
index 85de817a0b..d7bba30148 100644
--- a/src/dbus/Qt6DBusMacros.cmake
+++ b/src/dbus/Qt6DBusMacros.cmake
@@ -59,7 +59,9 @@ function(qt6_add_dbus_interface _sources _interface _basename)
add_custom_command(OUTPUT "${_impl}" "${_header}"
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::qdbusxml2cpp ${_params} -p ${_basename} ${_infile}
- DEPENDS ${_infile} VERBATIM)
+ DEPENDS ${_infile} ${QT_CMAKE_EXPORT_NAMESPACE}::qdbuscpp2xml
+ VERBATIM
+ )
set_source_files_properties("${_impl}" "${_header}" PROPERTIES SKIP_AUTOMOC TRUE)
@@ -134,7 +136,8 @@ function(qt6_generate_dbus_interface _header) # _customName OPTIONS -some -optio
add_custom_command(OUTPUT ${_target}
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::qdbuscpp2xml ${_DBUS_INTERFACE_OPTIONS} ${_in_file} -o ${_target}
- DEPENDS ${_in_file} VERBATIM
+ DEPENDS ${_in_file} ${QT_CMAKE_EXPORT_NAMESPACE}::qdbuscpp2xml
+ VERBATIM
)
endfunction()
@@ -168,12 +171,14 @@ function(qt6_add_dbus_adaptor _sources _xml_file _include _parentClass) # _optio
if(_optionalClassName)
add_custom_command(OUTPUT "${_impl}" "${_header}"
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::qdbusxml2cpp -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile}
- DEPENDS ${_infile} VERBATIM
+ DEPENDS ${_infile} ${QT_CMAKE_EXPORT_NAMESPACE}::qdbuscpp2xml
+ VERBATIM
)
else()
add_custom_command(OUTPUT "${_impl}" "${_header}"
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::qdbusxml2cpp -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile}
- DEPENDS ${_infile} VERBATIM
+ DEPENDS ${_infile} ${QT_CMAKE_EXPORT_NAMESPACE}::qdbuscpp2xml
+ VERBATIM
)
endif()