Makefile: Use pkg-config on Linux to get the ncurses compilation flags
Fixes #1659
This commit is contained in:
parent
9cb07503c6
commit
40eb598065
|
@ -22,8 +22,6 @@ mandocs := $(docs:.asciidoc=.gz)
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
DESTDIR ?= # root dir
|
DESTDIR ?= # root dir
|
||||||
|
|
||||||
NCURSESW_INCLUDE ?= /usr/include/ncursesw
|
|
||||||
|
|
||||||
bindir := $(DESTDIR)$(PREFIX)/bin
|
bindir := $(DESTDIR)$(PREFIX)/bin
|
||||||
sharedir := $(DESTDIR)$(PREFIX)/share/kak
|
sharedir := $(DESTDIR)$(PREFIX)/share/kak
|
||||||
docdir := $(DESTDIR)$(PREFIX)/share/doc/kak
|
docdir := $(DESTDIR)$(PREFIX)/share/doc/kak
|
||||||
|
@ -49,8 +47,8 @@ else ifneq (,$(findstring CYGWIN,$(os)))
|
||||||
CPPFLAGS += -D_XOPEN_SOURCE=700
|
CPPFLAGS += -D_XOPEN_SOURCE=700
|
||||||
LIBS += -lncursesw -lboost_regex -ldbghelp
|
LIBS += -lncursesw -lboost_regex -ldbghelp
|
||||||
else
|
else
|
||||||
LIBS += -lncursesw -lboost_regex
|
LIBS += $(shell pkg-config --libs ncursesw) -lboost_regex
|
||||||
CPPFLAGS += -I$(NCURSESW_INCLUDE)
|
CPPFLAGS += $(shell pkg-config --cflags ncursesw)
|
||||||
LDFLAGS += -rdynamic
|
LDFLAGS += -rdynamic
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user