mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-27 13:44:32 +03:00
Makefile: Only check for pkg-config when on a system that uses it
This fixes compilation on OSX where pkg-config is not installed by default.
This commit is contained in:
parent
90c16d2b0d
commit
52016d32bc
11
src/Makefile
11
src/Makefile
@ -54,6 +54,10 @@ else ifneq (,$(findstring CYGWIN,$(os)))
|
|||||||
CPPFLAGS += -D_XOPEN_SOURCE=700
|
CPPFLAGS += -D_XOPEN_SOURCE=700
|
||||||
LIBS += -lncursesw -ldbghelp
|
LIBS += -lncursesw -ldbghelp
|
||||||
else
|
else
|
||||||
|
ifeq ($(PKG_CONFIG),)
|
||||||
|
$(error "pkg-config not found in PATH")
|
||||||
|
endif
|
||||||
|
|
||||||
LIBS += $(shell $(PKG_CONFIG) --libs ncursesw)
|
LIBS += $(shell $(PKG_CONFIG) --libs ncursesw)
|
||||||
CPPFLAGS += $(shell $(PKG_CONFIG) --cflags ncursesw)
|
CPPFLAGS += $(shell $(PKG_CONFIG) --cflags ncursesw)
|
||||||
LDFLAGS += -rdynamic
|
LDFLAGS += -rdynamic
|
||||||
@ -66,12 +70,7 @@ endif
|
|||||||
|
|
||||||
CXXFLAGS += -pedantic -std=gnu++14 -g -Wall -Wextra -Wno-unused-parameter -Wno-reorder -Wno-sign-compare -Wno-address -Wno-noexcept-type -Wno-unknown-attributes -Wno-unknown-warning-option
|
CXXFLAGS += -pedantic -std=gnu++14 -g -Wall -Wextra -Wno-unused-parameter -Wno-reorder -Wno-sign-compare -Wno-address -Wno-noexcept-type -Wno-unknown-attributes -Wno-unknown-warning-option
|
||||||
|
|
||||||
all : check_pkg_config kak
|
all : kak
|
||||||
|
|
||||||
check_pkg_config:
|
|
||||||
ifeq ($(PKG_CONFIG),)
|
|
||||||
$(error "pkg-config not found in PATH")
|
|
||||||
endif
|
|
||||||
|
|
||||||
kak : kak$(suffix)
|
kak : kak$(suffix)
|
||||||
ln -sf $< $@
|
ln -sf $< $@
|
||||||
|
Loading…
Reference in New Issue
Block a user