>>cat
test.pro TEMPLATE = lib
SOURCE = lib.cpp
QMAKE_PKGCONFIG_NAME = $$TARGET
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
QMAKE_PKGCONFIG_INCDIR = /tmp
CONFIG += create_pc create_prl no_install_prl
target.path = /tmp
INSTALLS += target
Now if I build and install in the source directory, I get that the pc file gets installed correctly:
>> $${XPATH}/qt5/bin/qmake && make && sudo make install
install -m 644 -p release/pkgconfig/test.pc /tmp/pkgconfig/test.pc
However if I build out of source, it fails:
>> mkdir build
>> cd build
>> $${XPATH}/qt5/bin/qmake && make && sudo make install
...
install -m 644 -p build/release/pkgconfig/test.pc /tmp/pkgconfig/test.pc
install: cannot stat 'build/release/pkgconfig/test.pc': No such file or directory
(It searches the file in wrong place.)
Most
probably the problem comes from one of the qt prf files, but they look
for me so cryptic, it is hard to find the place I am looking for. Does
anyone has an idea?