Makefile: Enable overriding pkg-config (#107)

Sometimes there's a need to precise which `pkg-config` is to be used.
Now `pkg-config`'s name or path can be overridden with `PKG_CONFIG`.

Fixes #106.
This commit is contained in:
Adam Jeliński 2021-08-18 14:12:21 +02:00 committed by GitHub
parent cd3ef72166
commit a36bf2e6bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,5 @@
CAPNP_CXX_FLAGS=$(shell pkg-config capnp --cflags --libs) PKG_CONFIG ?= pkg-config
CAPNP_CXX_FLAGS=$(shell $(PKG_CONFIG) capnp --cflags --libs)
ifeq ($(CAPNP_CXX_FLAGS),) ifeq ($(CAPNP_CXX_FLAGS),)
$(warning "Warning: pkg-config failed to find compilation configuration for capnp.") $(warning "Warning: pkg-config failed to find compilation configuration for capnp.")