summaryrefslogtreecommitdiffstats
path: root/RepositoryExternal.mk
diff options
context:
space:
mode:
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)