How to force a static archive to be recreated when another file changes

I wonder if that approach not working is related to the behavior of having the OPTIMIZE_DEPENDENCIES target property set to true? Maybe worth checking if you have that enabled and see if disabling it makes any difference.