mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-10 09:52:13 +02:00
only use notifications/pkg-config if env var is defined and non-0 (#366)
This commit is contained in:
parent
1c6fd5df39
commit
8b8cf9c777
21
Makefile
21
Makefile
|
@ -1,16 +1,19 @@
|
|||
DC ?= dmd
|
||||
|
||||
ifdef PKGCONFIG
|
||||
LIBS = $(shell pkg-config --libs sqlite3 libcurl)
|
||||
pkgconfig := $(shell if [ $(PKGCONFIG) ] && [ "$(PKGCONFIG)" != 0 ] ; then echo 1 ; else echo "" ; fi)
|
||||
notifications := $(shell if [ $(NOTIFICATIONS) ] && [ "$(NOTIFICATIONS)" != 0 ] ; then echo 1 ; else echo "" ; fi)
|
||||
|
||||
ifeq ($(pkgconfig),1)
|
||||
LIBS = $(shell pkg-config --libs sqlite3 libcurl)
|
||||
else
|
||||
LIBS = -lcurl -lsqlite3
|
||||
LIBS = -lcurl -lsqlite3
|
||||
endif
|
||||
ifdef NOTIFICATIONS
|
||||
NOTIF_VERSIONS = -version=NoPragma -version=NoGdk -version=Notifications
|
||||
ifdef PKGCONFIG
|
||||
LIBS += $(shell pkg-config --libs libnotify)
|
||||
ifeq ($(notifications),1)
|
||||
NOTIF_VERSIONS = -version=NoPragma -version=NoGdk -version=Notifications
|
||||
ifeq ($(pkgconfig),1)
|
||||
LIBS += $(shell pkg-config --libs libnotify)
|
||||
else
|
||||
LIBS += -lgmodule-2.0 -lglib-2.0 -lnotify
|
||||
LIBS += -lgmodule-2.0 -lglib-2.0 -lnotify
|
||||
endif
|
||||
endif
|
||||
LIBS += -ldl
|
||||
|
@ -53,7 +56,7 @@ SOURCES = \
|
|||
src/util.d \
|
||||
src/progress.d
|
||||
|
||||
ifdef NOTIFICATIONS
|
||||
ifeq ($(notifications),1)
|
||||
SOURCES += src/notifications/notify.d src/notifications/dnotify.d
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue