Hi there,
For unix, there is the create_pc feature, but I want to have the same behavior on Windows as well. I'd like to use pkg-config tool to discovery my library later on, so I need to write a .pc file manually.
How should I do this? I tried something, my attack plan was to create a custom compiler without inputs that writes the .pc file:
defineReplace(createPkgConfig) {
# To do
}
pkgconfig.commands = ${QMAKE_FUNC_createPkgConfig}
pkgconfig.name = PKGCONFIG ${QMAKE_FILE_IN}
pkgconfig.CONFIG += no_link
pkgconfig.output = $$TARGET.pc
QMAKE_EXTRA_COMPILERS += pkgconfig
defineReplace(createPkgConfig) {
# To do
}
pkgconfig.commands = ${QMAKE_FUNC_createPkgConfig}
pkgconfig.name = PKGCONFIG ${QMAKE_FILE_IN}
pkgconfig.CONFIG += no_link
pkgconfig.output = $$TARGET.pc
QMAKE_EXTRA_COMPILERS += pkgconfig
To copy to clipboard, switch view to plain text mode
This doesn't seem to work: WARNING: Compiler: pkgconfig: No output file specified, and no rules are created to actually do anything. Is this the way to go, or am I taking the wrong approach? Are there any examples showing how to do this?
Bookmarks