Search code examples
c++qtqt4qmakepkg-config

qt Qmake generating pkgconfig for a project


I have been told that it is possible to generate a pkg-config file through qmake, but I have no idea how to do it. I have been looking online for a while, and it seems as though it is something you just have to know how to do. Can someone give me an example, or point me to some sort of guide/tutorial?


Solution

  • Is this what you are looking for?

    To generate pkg-config using qmake you have to add to (modify) your project file (*.pro file):

    unix {
        CONFIG += link_pkgconfig
        PKGCONFIG += <pc_file_without_extension>
    }