Important: Please read the Qt Code of Conduct -

Qt Creator pkg-config support for a "generic" project?

  • Is Qt Creator supposed to have some kind of support for the "pkg-config" tool for "generic" projects? I can see traces of it in the source code - src/plugins/genericprojectmanager have files pkgconfigtool.h and pkgconfigtool.cpp, which implement a class GenericProjectManager::Internal::PkgConfigTool. I'm unable to determine if and how this is used, however. Does anyone know more?

    It would be nice to be able to use pkg-config to set up include paths for auto-completion etc, rather than having to hard-code directories in the .includes file...


    • Toralf

  • Lifetime Qt Champion


    Did you try to use "this syntax": ?

    Hope it helps

  • When I said "generic" project, I meant I'm not using qmake.

  • Lifetime Qt Champion

    AFAIK QtCreator supports "generic" project (non Qt) with cmake and qmake as build systems. What would you be using ?

  • Plain make, GNU implementation - with some help from "pkg-config". I'm quite sure this is supposed to be supported. The make part, I mean - the question was of course whether the project manager understands about pkg-config, too.

    Again, I think this is what's referred to as a "generic" project. A project using cmake is a CMake project, and a project using qmake is a probably a "Qt project" even if it doesn't actually use the Qt library, in terms of what project manager is used.

  • Lifetime Qt Champion

    even with plain make you need a mean to generate the Makefile (or you have to write it by hand).

    In this case you should use the Non-Qt Project template (QtCreator2.8.1) and select Plain C or C++ Project

  • Maybe I wasn't clear enough on this, but I'm not looking for a way to set up the build configuration as such - this is working fine already. What I was asking about was configuration of Qt creator indexing for external header files, i.e. the mechanism that, among other things, allows the editor to suggest function or method names as I'm typing.

  • Lifetime Qt Champion

    Hoooo ok, I understand what you mean now. IIRC, QtCreator will use the content of INCLUDEPATH for that purpose

Log in to reply