summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2006-11-17 22:15:55 +0000
committerrubidium <rubidium@openttd.org>2006-11-17 22:15:55 +0000
commitbd129cf6bf59d62896fec327a3b5677f74bbb606 (patch)
treef7d122025647f602c6b732895a8d7570773ba14f /Makefile
parentf2cda44d2e3c55069279ad3e03aeb5d2a7f0f35c (diff)
downloadopenttd-bd129cf6bf59d62896fec327a3b5677f74bbb606.tar.xz
(svn r7196) -Feature: use fontconfig so one can set the font family name in openttd.cfg instead of the full path to the font.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 62d420dba..0da359dcc 100644
--- a/Makefile
+++ b/Makefile
@@ -241,6 +241,12 @@ $(error WITH_FREETYPE can't be used when FREETYPE_CONFIG is not set. Edit Makefi
endif
endif
+ifdef WITH_FONTCONFIG
+ ifndef FONTCONFIG_CONFIG
+$(error WITH_FONTCONFIG can't be used when FONTOCNFIG_CONFIG is not set. Edit Makefile.config to correct this)
+ endif
+endif
+
##############################################################################
#
# Compiler configuration
@@ -508,6 +514,15 @@ CFLAGS += $(CCFLAGS_FREETYPE)
LIBS += $(LDFLAGS_FREETYPE)
endif
+# fontconfig config
+ifdef WITH_FONTCONFIG
+CDEFS += -DWITH_FONTCONFIG
+CCFLAGS_FONTCONFIG := $(shell $(FONTCONFIG_CONFIG) --cflags)
+LDFLAGS_FONTCONFIG := $(shell $(FONTCONFIG_CONFIG) --libs)
+CFLAGS += $(CCFLAGS_FONTCONFIG)
+LIBS += $(LDFLAGS_FONTCONFIG)
+endif
+
# iconv is enabled defaultly on OSX >= 10.3
ifdef OSX
ifndef JAGUAR