Skip to content

Commit

Permalink
More build fixes for bridges, fix make clean without PyQt
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Sep 21, 2024
1 parent b7bc7fa commit 362f031
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
17 changes: 9 additions & 8 deletions source/frontend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 $@
Expand Down
6 changes: 6 additions & 0 deletions source/modules/distrho/DistrhoUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@

#include "src/DistrhoDefines.h"

#if defined(DISTRHO_OS_WINDOWS) && !defined(_MSC_VER)
#include <winsock2.h>
#undef max
#undef min
#endif

#include <cstdarg>
#include <cstdio>
#include <cstdlib>
Expand Down

0 comments on commit 362f031

Please sign in to comment.