How to correctly generate compile_commands.json for library dependency using PkgConfig?

I was able to generate the correct -I flags by adding this to my ./cmake/FindCriterion.cmake

add_compile_options(${PC_Criterion_CFLAGS})

I was expecting that the cflags were also added when the IMPORTED_TARGET was linked (like the headers are included). But apparently not.