summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfalkTX <falktx@falktx.com>2019-09-26 05:15:15 +0100
committerfalkTX <falktx@falktx.com>2019-09-26 05:15:15 +0100
commita7a7b47e9a8246d91dc882150f4516d012483a55 (patch)
tree30d7712c3f2c83075019ff0c97906e0512635ea5
parent707004259059928c885136599d91af8348756013 (diff)
Fix build without opengl
-rw-r--r--Makefile.plugins.mk11
-rw-r--r--distrho/src/DistrhoPluginChecks.h7
-rw-r--r--examples/ExternalUI/Makefile1
-rw-r--r--examples/Info/DistrhoPluginInfo.h1
4 files changed, 17 insertions, 3 deletions
diff --git a/Makefile.plugins.mk b/Makefile.plugins.mk
index f68a2e15..7c1e5540 100644
--- a/Makefile.plugins.mk
+++ b/Makefile.plugins.mk
@@ -70,8 +70,9 @@ UI_TYPE = opengl
endif
ifeq ($(UI_TYPE),cairo)
+DGL_FLAGS += -DDGL_CAIRO
ifeq ($(HAVE_CAIRO),true)
-DGL_FLAGS += $(CAIRO_FLAGS) -DDGL_CAIRO
+DGL_FLAGS += $(CAIRO_FLAGS)
DGL_LIBS += $(CAIRO_LIBS)
DGL_LIB = $(DPF_PATH)/build/libdgl-cairo.a
HAVE_DGL = true
@@ -81,8 +82,9 @@ endif
endif
ifeq ($(UI_TYPE),opengl)
+DGL_FLAGS += -DDGL_OPENGL
ifeq ($(HAVE_OPENGL),true)
-DGL_FLAGS += $(OPENGL_FLAGS) -DDGL_OPENGL
+DGL_FLAGS += $(OPENGL_FLAGS)
DGL_LIBS += $(OPENGL_LIBS)
DGL_LIB = $(DPF_PATH)/build/libdgl-opengl.a
HAVE_DGL = true
@@ -91,6 +93,11 @@ HAVE_DGL = false
endif
endif
+ifeq ($(UI_TYPE),external)
+DGL_FLAGS += -DDGL_EXTERNAL
+HAVE_DGL = true
+endif
+
DGL_LIBS += $(DGL_SYSTEM_LIBS)
ifneq ($(HAVE_DGL),true)
diff --git a/distrho/src/DistrhoPluginChecks.h b/distrho/src/DistrhoPluginChecks.h
index 01a52a16..6e2ba5b5 100644
--- a/distrho/src/DistrhoPluginChecks.h
+++ b/distrho/src/DistrhoPluginChecks.h
@@ -139,7 +139,12 @@
// -----------------------------------------------------------------------
// Disable UI if DGL or External UI is not available
-#if DISTRHO_PLUGIN_HAS_UI && ! DISTRHO_PLUGIN_HAS_EXTERNAL_UI && ! defined(HAVE_CAIRO) && ! defined(HAVE_OPENGL)
+#if (defined(DGL_CAIRO) && ! defined(HAVE_CAIRO)) || (defined(DGL_OPENGL) && ! defined(HAVE_OPENGL))
+# undef DISTRHO_PLUGIN_HAS_EMBED_UI
+# define DISTRHO_PLUGIN_HAS_EMBED_UI 0
+#endif
+
+#if DISTRHO_PLUGIN_HAS_UI && ! DISTRHO_PLUGIN_HAS_EMBED_UI && ! DISTRHO_PLUGIN_HAS_EXTERNAL_UI
# undef DISTRHO_PLUGIN_HAS_UI
# define DISTRHO_PLUGIN_HAS_UI 0
#endif
diff --git a/examples/ExternalUI/Makefile b/examples/ExternalUI/Makefile
index 75ea517f..932db4d5 100644
--- a/examples/ExternalUI/Makefile
+++ b/examples/ExternalUI/Makefile
@@ -21,6 +21,7 @@ FILES_UI = \
# --------------------------------------------------------------
# Do some magic
+UI_TYPE = external
include ../../Makefile.plugins.mk
ifneq ($(HAIKU),true)
diff --git a/examples/Info/DistrhoPluginInfo.h b/examples/Info/DistrhoPluginInfo.h
index c10a3739..df72edcc 100644
--- a/examples/Info/DistrhoPluginInfo.h
+++ b/examples/Info/DistrhoPluginInfo.h
@@ -26,6 +26,7 @@
#define DISTRHO_PLUGIN_NUM_INPUTS 2
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2
#define DISTRHO_PLUGIN_WANT_TIMEPOS 1
+#define DISTRHO_PLUGIN_USES_MODGUI 1
#define DISTRHO_UI_USER_RESIZABLE 1
#define DISTRHO_UI_USE_NANOVG 1