Add support for pkg-config configured libs
This commit is contained in:
parent
cfc49155ac
commit
c3502ad4cc
1 changed files with 14 additions and 0 deletions
14
Makefile
14
Makefile
|
|
@ -64,6 +64,13 @@ endif
|
||||||
#
|
#
|
||||||
OS := $(shell uname -s)
|
OS := $(shell uname -s)
|
||||||
|
|
||||||
|
#
|
||||||
|
# PKGCONFIG
|
||||||
|
#
|
||||||
|
# Add the names of pkg-config development packages required to build your project
|
||||||
|
# The appropriate headers an libraries will be added to the build
|
||||||
|
PKGCONFIG :=
|
||||||
|
|
||||||
#
|
#
|
||||||
# Targets:
|
# Targets:
|
||||||
# check1 uses cppcheck
|
# check1 uses cppcheck
|
||||||
|
|
@ -158,6 +165,13 @@ CXXFLAGS = -std=c++17 $(NETBEANSBUILD) $(DBG_REL) -I./include/ $(_CXXFLAGS) $(
|
||||||
_APP_LIBS =
|
_APP_LIBS =
|
||||||
LIBS = $(NETBEANSBUILD) $(_APP_LIBS)
|
LIBS = $(NETBEANSBUILD) $(_APP_LIBS)
|
||||||
|
|
||||||
|
ifneq ($(PKGCONFIG),)
|
||||||
|
CXXFLAGS += $(shell pkg-config --cflags $(PKGCONFIG))
|
||||||
|
LIBS += $(shell pkg-config --libs $(PKGCONFIG))
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
debug release: DIRS $(APP)
|
debug release: DIRS $(APP)
|
||||||
.PHONY: check1 check2
|
.PHONY: check1 check2
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue