Hi! I think the original post is fairly clear in asking specifically about using get_target_property
to generate a pkg-config file and running into the issue of the generator expressions not having been expanded at the time the file is generated.
My impression is that the original request implies that targets’ properties already implement some complex logic concerned with the includes, and flags, and dependencies, etc, and the author must wish to reuse that logic when generating the .pc
export. It is a valid use-case to use CMake to generate package info consumable by non-CMake projects. I’m afraid your references to the docopt example, and man pkg-config
, to find_package
may have pulled the conversation in a completely different direction and possibly created some… tension.
On the subject matter, I don’t see any file(GENERATE ...)
in cmake-pcfilegenerator/PcFileGenerator.cmake at main · antoniovazquezblanco/cmake-pcfilegenerator · GitHub (from CMake module to automatically generate pkg-config PC files from targets) but I do see a get_target_property
, I wonder how that works.