From 7aa5333a3faecaa7177848f95479ed0fcb73d045 Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Fri, 23 Feb 2018 19:09:18 +0100 Subject: [PATCH] kcoreaddons_add_plugin: remove effectless OBJECT_DEPENDS on json file The JSON file argument is passed to Q_PLUGIN_METADATA, which is a no-code macro at the C++ level and only used to note information used by moc for the generated moc file. So when the content of the JSON file has changed, this will not change anything in the preprocessed source file itself. It only has an effect on the content of the moc file generated based on it, which is either included and thus already triggers a dependecy or generated by automoc and compiled separately into the target with the needed dependencies. It is automoc which needs to properly trigger a recreation of the moc file when checking the sources (and at least in 3.9 & 10 does), and this is nothing that can be influenced by dependency rules. --- src/imageformats/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/imageformats/CMakeLists.txt b/src/imageformats/CMakeLists.txt index d9efcce..0dc9707 100644 --- a/src/imageformats/CMakeLists.txt +++ b/src/imageformats/CMakeLists.txt @@ -15,7 +15,6 @@ function(kimageformats_add_plugin plugin) message(FATAL_ERROR "JSON file doesn't exist: ${json}") endif() - set_property(SOURCE ${KIF_ADD_PLUGIN_SOURCES} APPEND PROPERTY OBJECT_DEPENDS ${json}) add_library(${plugin} MODULE ${KIF_ADD_PLUGIN_SOURCES}) set_property(TARGET ${plugin} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS ${json}) set_target_properties(${plugin} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/imageformats")