summaryrefslogtreecommitdiff
path: root/RepositoryExternal.mk
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-09-27 21:45:47 +0200
committerMichael Stahl <mstahl@redhat.com>2012-09-28 16:49:07 +0200
commit78b59b8302e79fad71bfff66d5b88db80527e6a1 (patch)
tree877b7bec05cebfa44db36af96b292874d20e3a39 /RepositoryExternal.mk
parent40e0ebff76d839a548638ca8709c68c56e2b926c (diff)
gbuild: clean up usage of weird x11_extensions module etc.
Move libraries using those headers to RepositoryExternal.mk and also move pkg-config invocation to configure. Change-Id: I17a240fcba83a98f3f248f15b34d245f941c62e2
Diffstat (limited to 'RepositoryExternal.mk')
-rw-r--r--RepositoryExternal.mk62
1 files changed, 62 insertions, 0 deletions
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 05880d958992..d653b208dba2 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1940,6 +1940,68 @@ endef
endif # SYSTEM_LIBORCUS
+
+### X11 stuff ###
+
+ifeq ($(GUIBASE),unx)
+
+# TODO: do we really need these X11 headers in the repo?
+ifneq ($(filter X11_EXTENSIONS,$(BUILD_TYPE)),)
+
+define gb_LinkTarget__use_x11extensions
+$(call gb_LinkTarget_use_packages,$(1),\
+ x11_extensions_inc \
+)
+endef
+
+else # !X11_EXTENSIONS
+
+gb_LinkTarget__use_x11extensions :=
+
+endif # X11_EXTENSIONS
+
+ifeq ($(XRANDR_DLOPEN),FALSE)
+
+define gb_LinkTarget__use_Xrandr
+$(call gb_LinkTarget__use_x11extensions,$(1))
+
+$(call gb_LinkTarget_set_include,$(1),\
+ $$(INCLUDE) \
+ $(XRANDR_CFLAGS) \
+)
+
+$(call gb_LinkTarget_add_libs,$(1),\
+ $(XRANDR_LIBS) \
+)
+endef
+
+else # XRANDR_DLOPEN
+
+define gb_LinkTarget__use_Xrandr
+$(call gb_LinkTarget__use_x11extensions,$(1))
+
+$(call gb_LinkTarget_add_defs,$(1),\
+ -DXRANDR_DLOPEN \
+)
+endef
+
+endif # XRANDR_DLOPEN
+
+define gb_LinkTarget__use_Xrender
+$(call gb_LinkTarget__use_x11extensions,$(1))
+
+$(call gb_LinkTarget_set_include,$(1),\
+ $$(INCLUDE) \
+ $(XRENDER_CFLAGS) \
+)
+
+$(call gb_LinkTarget_add_libs,$(1),\
+ $(XRENDER_LIBS) \
+)
+endef
+
+endif # GUIBASE=unx
+
# MacOSX-only frameworks ############################################
# (in alphabetical order)