From 362f031960fb03c403244b55932b927c1a0c6e62 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 21 Sep 2024 22:15:24 +0200 Subject: [PATCH] More build fixes for bridges, fix make clean without PyQt Signed-off-by: falkTX --- source/frontend/Makefile | 17 +++++++++-------- source/modules/distrho/DistrhoUtils.hpp | 6 ++++++ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/source/frontend/Makefile b/source/frontend/Makefile index 2a6193f9f4..c4f13025fd 100644 --- a/source/frontend/Makefile +++ b/source/frontend/Makefile @@ -34,10 +34,6 @@ else NON_STATIC_LINK_FLAGS = $(LINK_FLAGS) endif -ifeq (,$(FRONTEND_TYPE)) -$(error Trying to build frontend without Qt and/or PyQt, cannot continue) -endif - ifeq ($(WINDOWS),true) QT_LINK_FLAGS += -L$(BINDIR) $(BINDIR)/libcarla_utils.dll else @@ -154,21 +150,26 @@ all: $(BINDIR)/libcarla_frontend$(LIB_EXT) $(QMs) $(RES) $(UIs) # --------------------------------------------------------------------------------------------------------------------- -dialogs/ui_%.h: dialogs/%.ui +dialogs/ui_%.h: dialogs/%.ui qt_config.py $(UIC) $< -o $@ -pluginlist/ui_%.h: pluginlist/%.ui +pluginlist/ui_%.h: pluginlist/%.ui qt_config.py $(UIC) $< -o $@ -%_ui.py: %.ui +%_ui.py: %.ui qt_config.py $(PYUIC) $< -o $@ -ui_%.py: $(RESDIR)/ui/%.ui +ui_%.py: $(RESDIR)/ui/%.ui qt_config.py $(PYUIC) $< -o $@ qt_config.py: +ifneq (,$(FRONTEND_TYPE)) echo "#!/usr/bin/env python3" > $@ echo "qt = $(FRONTEND_TYPE)" >> $@ +else + @echo Error: Trying to build frontend without Qt and/or PyQt, cannot continue + @false +endif resources_rc.py: $(RESDIR)/resources.qrc $(RESDIR)/*/*.png $(RESDIR)/*/*.svg $(RESDIR)/*/*.svgz $(PYRCC) $< -o $@ diff --git a/source/modules/distrho/DistrhoUtils.hpp b/source/modules/distrho/DistrhoUtils.hpp index a76948662c..c7c810ef28 100644 --- a/source/modules/distrho/DistrhoUtils.hpp +++ b/source/modules/distrho/DistrhoUtils.hpp @@ -19,6 +19,12 @@ #include "src/DistrhoDefines.h" +#if defined(DISTRHO_OS_WINDOWS) && !defined(_MSC_VER) +#include +#undef max +#undef min +#endif + #include #include #include