I made a dependency on a library target for a custom target by
“ADD_DEPENDENCIES(lib_target extern_target)”.
It works well that every time lib_target is built, extern_target will be built.
However, when associated files in extern_taget is updated, it doesn’t introduce a rebuilt on lib_target.
Yap, it looks like add_dependencies() just sets a prerequisite of the target.
Thanks for the suggestion and it is what I am doing right now to touch source files.
Just wondering if any other solution here.
If ${GENERATED_IMAGE} is added to a source in lib_target in some way, that should do it. I don’t think there’s a way to do what it appears you’re looking for (cross compile something and then embed that into a static library).