cmake: Fix dependencies between kobject_hash files
cmake: Fix dependencies between kobject_hash files

CMake's custom_command support is not great. It is technically
supported, but it is not easy to get it right.

As explained in "5. File-level dependencies of custom targets are not
propagated" from http://bit.ly/2GvwwEy. When a custom_command uses a
custom_target as input, the custom_command must DEPEND on both the
custom_target and the underlying file.

Longterm we need to do something more sofisticated to prevent these
issues from popping up. Like add some static analysis to detect badly
written CMake code or introduce an abstraction for custom commands
that is not affect by this issue.

This fixes #5881

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

kraj/zephyr,explora26/zephyr,galak/zephyr,finikorg/zephyr,ldts/zephyr,zephyrproject-rtos/zephyr,mbolivar/zephyr,ldts/zephyr,Vudentz/zephyr,galak/zephyr,nashif/zephyr,kraj/zephyr,nashif/zephyr,finikorg/zephyr,mbolivar/zephyr,GiulianoFranchetto/zephyr,Vudentz/zephyr,nashif/zephyr,GiulianoFranchetto/zephyr,mbolivar/zephyr,zephyrproject-rtos/zephyr,mbolivar/zephyr,explora26/zephyr,punitvara/zephyr,finikorg/zephyr,galak/zephyr,zephyriot/zephyr,GiulianoFranchetto/zephyr,punitvara/zephyr,kraj/zephyr,finikorg/zephyr,Vudentz/zephyr,finikorg/zephyr,kraj/zephyr,galak/zephyr,zephyriot/zephyr,GiulianoFranchetto/zephyr,mbolivar/zephyr,zephyriot/zephyr,punitvara/zephyr,explora26/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,zephyriot/zephyr,explora26/zephyr,explora26/zephyr,zephyrproject-rtos/zephyr,ldts/zephyr,punitvara/zephyr,zephyriot/zephyr,Vudentz/zephyr,ldts/zephyr,nashif/zephyr,GiulianoFranchetto/zephyr,ldts/zephyr,kraj/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,galak/zephyr,punitvara/zephyr