Use PKGCONFIG instead of manually specifying LIBS for Linux

- The advantage is that this method automatically includes additional
  dependencies of LIBS (e.g. libupnp needs -lixml).
- Also if some distribution moves headers to non default locations the
  correct locations get added by PKGCONFIG
This commit is contained in:
AsamK 2015-09-05 23:48:24 +02:00
parent b8e3a434cf
commit 66b9557833
8 changed files with 34 additions and 38 deletions

View file

@ -2,8 +2,10 @@
TEMPLATE = lib
CONFIG += staticlib
CONFIG += create_prl
CONFIG -= qt
TARGET = resapi
TARGET_PRL = libresapi
DESTDIR = lib
CONFIG += libmicrohttpd
@ -26,6 +28,12 @@ win32{
}
libmicrohttpd{
linux {
CONFIG += link_pkgconfig
PKGCONFIG *= libmicrohttpd
} else {
LIBS *= -lmicrohttpd
}
SOURCES += \
api/ApiServerMHD.cpp