mpyne added a comment.
Yes, I think I agree with @rakuco. Especially since the fix for D10485 <https://phabricator.kde.org/D10485> ended up being reverted. I still think a separate fix is needed for kcm_lookandfeel, but the issue is that the `kcoreaddons_desktop_to_json` macro generates a JSON file which is intended for use in a compiled file, and there's no easy way to connect that dependency within *this* macro since the dependent source file is never actually passed into the macro. I do think it makes more sense to have the custom command here be a custom target but that wouldn't help fix the dependency link-up. Would it be possible in CMake to alter the macro to somehow make the JSON a dependency of *all* the source files of the provided target instead of just the auto-generated files? That would seem to get the right ordering without too much fuss. `add_custom_command` has a second signature that looks useful (offers to make the command happen in "PRE BUILD", however it only works for MSVC. Alternately we could try to do what the kcoreaddons_add_plugin macro does and let the calling code pass in the sources to be made dependent upon the JSON. REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D10450 To: tcberner, #freebsd, mpyne, bshah, dfaure, rakuco Cc: rikmills, rakuco, kfunk, adridg, kossebau, #frameworks, michaelh
