Time/PeriodClock: rename get_now() to GetNow()
[xcsoar.git] / build / pkgconfig.mk
blobe4f072315ada90c920dd021c71c00705e8f6a5b3
1 PKG_CONFIG = pkg-config
3 ifeq ($(TARGET_IS_DARWIN),y)
4 PKG_CONFIG += --static
5 endif
7 ifeq ($(HOST_IS_WIN32)$(HAVE_WIN32)$(HAVE_CE)$(call string_equals,WINE,$(TARGET)),nynn)
8 PKG_CONFIG := PKG_CONFIG_LIBDIR=/usr/local/i686-w64-mingw32/lib/pkgconfig $(PKG_CONFIG)
9 endif
11 # Generates a pkg-config lookup for a library.
13 # Example: $(eval $(call CURL,libcurl >= 2.21))
15 # Arguments: PREFIX, SPEC
17 # PREFIX is a prefix for variables that will hold the results. This
18 # function will append "_CPPFLAGS" (pkg-config --cflags) and "_LDLIBS"
19 # (pkg-config --libs).
21 # SPEC is the pkg-config package specification.
23 define pkg-config-library
25 $(1)_CPPFLAGS := $$(shell $$(PKG_CONFIG) --cflags $(2))
26 $(1)_LDLIBS := $$(shell $$(PKG_CONFIG) --libs $(2))
28 ifeq ($$($(1)_CPPFLAGS)$$($(1)_LDLIBS),)
29 $$(error library not found: $(2))
30 endif
32 endef