Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Commit 76c5e02

Browse files
authored
Merge pull request #91 from orbea/pkg-config
build: don't hardcode pkg-config
2 parents 09d3359 + d430baa commit 76c5e02

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ FNAME_cli := flips
1717

1818
CXX ?= g++
1919
CFLAGS ?= -g
20+
PKG_CONFIG ?= pkg-config
2021

2122
XFILES :=
2223

@@ -69,10 +70,10 @@ endif
6970

7071
ifeq ($(TARGET),gtk)
7172
ifeq ($(GTKFLAGS),)
72-
GTKFLAGS := $(shell pkg-config --cflags --libs gtk+-3.0)
73+
GTKFLAGS := $(shell $(PKG_CONFIG) --cflags --libs gtk+-3.0)
7374
endif
7475
ifeq ($(GTKFLAGS),)
75-
$(warning pkg-config can't find gtk+-3.0, or pkg-config itself can't be found)
76+
$(warning $(PKG_CONFIG) can't find gtk+-3.0, or $(PKG_CONFIG) itself can't be found)
7677
$(warning if you have the needed files installed, specify their locations and names with `make GTKFLAGS='-I/usr/include' GTKLIBS='-L/usr/lib -lgtk'`)
7778
$(warning if not, the package names under Debian and derivates are 'pkg-config libgtk-3-dev'; for other distros, consult a search engine)
7879
$(warning If you instead want to build the CLI version, set the TARGET environment variable like so:)

0 commit comments

Comments
 (0)