That looks to me like the real problem is the cppzmqConfig.cmake
file is missing the compiler definition. When a <packageName>Config.cmake
file is provided, it should be complete. The presence of a <packageName>.pc
file should be irrelevant. Your project should not have to try to read both. It appears they have provided the ZMQ_BUILD_DRAFT_API
compiler define only in <packageName>.pc
, but neglected to add it to their <packageName>Config.cmake
. I think you already know this, but I’m just being clear that rather than trying to read both files in your project, your time may be better spent convincing upstream to fix their <packageName>Config.cmake
file. Since you are producing a docker image for the build, you could also consider patching the <packageName>Config.cmake
file that you put in that docker image, but that’s not a great solution long term (any build elsewhere outside of that image would fail).