mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-10 01:42:32 +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
11
Makefile
11
Makefile
|
@ -1,13 +1,16 @@
|
||||||
DC ?= dmd
|
DC ?= dmd
|
||||||
|
|
||||||
ifdef PKGCONFIG
|
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)
|
LIBS = $(shell pkg-config --libs sqlite3 libcurl)
|
||||||
else
|
else
|
||||||
LIBS = -lcurl -lsqlite3
|
LIBS = -lcurl -lsqlite3
|
||||||
endif
|
endif
|
||||||
ifdef NOTIFICATIONS
|
ifeq ($(notifications),1)
|
||||||
NOTIF_VERSIONS = -version=NoPragma -version=NoGdk -version=Notifications
|
NOTIF_VERSIONS = -version=NoPragma -version=NoGdk -version=Notifications
|
||||||
ifdef PKGCONFIG
|
ifeq ($(pkgconfig),1)
|
||||||
LIBS += $(shell pkg-config --libs libnotify)
|
LIBS += $(shell pkg-config --libs libnotify)
|
||||||
else
|
else
|
||||||
LIBS += -lgmodule-2.0 -lglib-2.0 -lnotify
|
LIBS += -lgmodule-2.0 -lglib-2.0 -lnotify
|
||||||
|
@ -53,7 +56,7 @@ SOURCES = \
|
||||||
src/util.d \
|
src/util.d \
|
||||||
src/progress.d
|
src/progress.d
|
||||||
|
|
||||||
ifdef NOTIFICATIONS
|
ifeq ($(notifications),1)
|
||||||
SOURCES += src/notifications/notify.d src/notifications/dnotify.d
|
SOURCES += src/notifications/notify.d src/notifications/dnotify.d
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue