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

I tried that, it doesn’t work.

See the code above, it has.

target_sources(foo PRIVATE "${response_file}")