Skip to content

Commit

Permalink
Fix build with some libraries in custom prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
falkTX committed Oct 11, 2021
1 parent 5ec8d07 commit db46099
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
8 changes: 7 additions & 1 deletion source/Makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ ifneq ($(WIN32),true)

ifeq ($(shell $(PKG_CONFIG) --exists libmagic && echo true),true)
HAVE_LIBMAGIC = true
HAVE_LIBMAGICPKG = true
else
# old libmagic versions don't have a pkg-config file, so we need to call the compiler to test it
CFLAGS_WITHOUT_ARCH = $(subst -arch arm64,,$(CFLAGS))
Expand Down Expand Up @@ -555,7 +556,12 @@ LIBLO_FLAGS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags liblo)
LIBLO_LIBS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs liblo)
endif

ifeq ($(HAVE_LIBMAGIC),true)
ifeq ($(HAVE_LIBMAGICPKG),true)
MAGIC_FLAGS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags libmagic)
# this is missing in upstream pkg-config
MAGIC_FLAGS += -I$(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --variable=includedir libmagic)
MAGIC_LIBS = $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs libmagic)
else ifeq ($(HAVE_LIBMAGIC),true)
MAGIC_LIBS += -lmagic
ifeq ($(LINUX_OR_MACOS),true)
MAGIC_LIBS += -lz
Expand Down
4 changes: 4 additions & 0 deletions source/backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ TARGETS = \

# ---------------------------------------------------------------------------------------------------------------------

BUILD_CXX_FLAGS += $(FLUIDSYNTH_FLAGS)

# ---------------------------------------------------------------------------------------------------------------------

STANDALONE_LIBS = $(MODULEDIR)/carla_engine.a
STANDALONE_LIBS += $(MODULEDIR)/carla_plugin.a
STANDALONE_LIBS += $(MODULEDIR)/jackbridge.a
Expand Down
2 changes: 2 additions & 0 deletions source/backend/engine/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ BUILD_CXX_FLAGS += -Wno-undef
endif
endif

BUILD_CXX_FLAGS += $(MAGIC_FLAGS)

# ---------------------------------------------------------------------------------------------------------------------

OBJS = \
Expand Down
2 changes: 2 additions & 0 deletions source/backend/plugin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ BUILD_CXX_FLAGS += -Wno-undef
endif
endif

BUILD_CXX_FLAGS += $(MAGIC_FLAGS)

# ---------------------------------------------------------------------------------------------------------------------

OBJS = \
Expand Down
2 changes: 1 addition & 1 deletion source/utils/JucePluginWindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ class JucePluginWindow : public DialogWindow
v3_cpp_obj(fVst3View)->on_focus (fVst3View, true);
}

void focusLost (const FocusChangeType cause)
void focusLost (const FocusChangeType cause) override
{
if (fVst3View != nullptr)
v3_cpp_obj(fVst3View)->on_focus (fVst3View, false);
Expand Down

0 comments on commit db46099

Please sign in to comment.