mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-14 00:21:16 +00:00
Look for system Vorbis, Opus and Ogg via pkg-config
As usual, the order of precedence is: user override, pkg-config, or assume they're in standard locations. In particular, Opus isn't in the default search path on Debian.
This commit is contained in:
parent
c817ab5ae0
commit
cff1fcd658
1 changed files with 15 additions and 9 deletions
24
Makefile
24
Makefile
|
@ -982,31 +982,37 @@ ifeq ($(USE_CURL),1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_CODEC_VORBIS),1)
|
ifeq ($(USE_CODEC_VORBIS),1)
|
||||||
CLIENT_CFLAGS += -DUSE_CODEC_VORBIS
|
VORBIS_CFLAGS ?= $(shell pkg-config --silence-errors --cflags vorbisfile vorbis || true)
|
||||||
CLIENT_LIBS += -lvorbisfile -lvorbis
|
VORBIS_LIBS ?= $(shell pkg-config --silence-errors --libs vorbisfile vorbis || echo -lvorbisfile -lvorbis)
|
||||||
|
CLIENT_CFLAGS += -DUSE_CODEC_VORBIS $(VORBIS_CFLAGS)
|
||||||
|
CLIENT_LIBS += $(VORBIS_LIBS)
|
||||||
NEED_OGG=1
|
NEED_OGG=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_CODEC_OPUS),1)
|
ifeq ($(USE_CODEC_OPUS),1)
|
||||||
CLIENT_CFLAGS += -DUSE_CODEC_OPUS
|
CLIENT_CFLAGS += -DUSE_CODEC_OPUS
|
||||||
ifeq ($(USE_INTERNAL_OPUS),1)
|
ifeq ($(USE_INTERNAL_OPUS),1)
|
||||||
CLIENT_CFLAGS += -DOPUS_BUILD -DHAVE_LRINTF -DFLOATING_POINT -DUSE_ALLOCA \
|
OPUS_CFLAGS = -DOPUS_BUILD -DHAVE_LRINTF -DFLOATING_POINT -DUSE_ALLOCA \
|
||||||
-I$(OPUSDIR)/include -I$(OPUSDIR)/celt -I$(OPUSDIR)/silk \
|
-I$(OPUSDIR)/include -I$(OPUSDIR)/celt -I$(OPUSDIR)/silk \
|
||||||
-I$(OPUSDIR)/silk/float
|
-I$(OPUSDIR)/silk/float -I$(OPUSFILEDIR)/include
|
||||||
|
|
||||||
CLIENT_CFLAGS += -I$(OPUSFILEDIR)/include
|
|
||||||
else
|
else
|
||||||
CLIENT_LIBS += -lopusfile -lopus
|
OPUS_CFLAGS=$(shell pkg-config --silence-errors --cflags opusfile opus || true)
|
||||||
|
OPUS_LIBS=$(shell pkg-config --silence-errors --libs opusfile opus || echo -lopusfile -lopus)
|
||||||
endif
|
endif
|
||||||
|
CLIENT_CFLAGS += $(OPUS_CFLAGS)
|
||||||
|
CLIENT_LIBS += $(OPUS_LIBS)
|
||||||
NEED_OGG=1
|
NEED_OGG=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(NEED_OGG),1)
|
ifeq ($(NEED_OGG),1)
|
||||||
ifeq ($(USE_INTERNAL_OGG),1)
|
ifeq ($(USE_INTERNAL_OGG),1)
|
||||||
CLIENT_CFLAGS += -I$(OGGDIR)/include
|
OGG_CFLAGS = -I$(OGGDIR)/include
|
||||||
else
|
else
|
||||||
CLIENT_LIBS += -logg
|
OGG_CFLAGS ?= $(shell pkg-config --silence-errors --cflags ogg || true)
|
||||||
|
OGG_LIBS ?= $(shell pkg-config --silence-errors --libs ogg || echo -logg)
|
||||||
endif
|
endif
|
||||||
|
CLIENT_CFLAGS += $(OGG_CFLAGS)
|
||||||
|
CLIENT_LIBS += $(OGG_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_RENDERER_DLOPEN),1)
|
ifeq ($(USE_RENDERER_DLOPEN),1)
|
||||||
|
|
Loading…
Reference in a new issue