Browse Source

Fix build without opengl

pull/185/head
falkTX 3 years ago
parent
commit
a7a7b47e9a
4 changed files with 17 additions and 3 deletions
  1. +9
    -2
      Makefile.plugins.mk
  2. +6
    -1
      distrho/src/DistrhoPluginChecks.h
  3. +1
    -0
      examples/ExternalUI/Makefile
  4. +1
    -0
      examples/Info/DistrhoPluginInfo.h

+ 9
- 2
Makefile.plugins.mk View File

@@ -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)


+ 6
- 1
distrho/src/DistrhoPluginChecks.h View File

@@ -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


+ 1
- 0
examples/ExternalUI/Makefile View File

@@ -21,6 +21,7 @@ FILES_UI = \
# --------------------------------------------------------------
# Do some magic

UI_TYPE = external
include ../../Makefile.plugins.mk

ifneq ($(HAIKU),true)


+ 1
- 0
examples/Info/DistrhoPluginInfo.h View File

@@ -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



Loading…
Cancel
Save