0

In CMake, I can write something like:

find_package(PkgConfig REQUIRED)
pkg_search_module(GERBV REQUIRED libgerbv)
include_directories(${SOME_INCLUDE_DIRS};${GERBV_INCLUDE_DIRS})
... target_link_libraries(someProject gerbv)

And therefore I will only add the include folders from the libgerbv library and I won't add any libs, that pkg-config --libs libgerbv shows, I can choose manually, which ones I need and which ones I don't.

In QMake, the way one can use the pkg-config is:

CONFIG += link_pkgconfig
PKGCONFIG += libgerbv

But it loads all the libs that "come with" the libgerbv library. Is there any way I can, just like in the CMake project, only add the include folders and manually set the "-lgerbv" flag, and, therefore, let me decide which libs, that come with libgerbv, I do need and which I do not?

sx107
  • 309
  • 3
  • 11
  • I'm not a pkgconfig expert, but have you tried running the command directly as here: http://stackoverflow.com/questions/3517694/linking-libraries-to-a-qt-project-using-pkg-config-output – Brad Aug 13 '16 at 00:28
  • @Brad the problem is that the pkg-config command itself does not output the include directories (while I need just include all of them, but NOT linking with all the libs). So `INCLUDEPATH += \`pkg-config --cflags libgerbv\``, obviously, doesn't work and `LIBS += \`pkg-config --libs libgerbv\`` is the opposite of my goal. The `CONFIG += link_pkgconfig; PKGCONFIG += libgerbv` links all the libraries, this is what I do NOT want. – sx107 Aug 13 '16 at 01:28

0 Answers0