Tweaks for proper plugin resource usage

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2021-10-21 17:10:54 +01:00
parent 588f316fd6
commit 28bcac708f
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
7 changed files with 82 additions and 65 deletions

View file

@ -234,13 +234,6 @@ PLUGIN_FILES += $(filter-out rackwindows/src/plugin.cpp,$(wildcard rackwindows/s
PLUGIN_FILES += $(filter-out ZetaCarinaeModules/src/plugin.cpp,$(wildcard ZetaCarinaeModules/src/*.cpp))
# --------------------------------------------------------------
# Resources to symlink
# TODO
# PLUGIN_RESOURCES = res/Befaco/res
# PLUGIN_RESOURCES = res/Befaco/res
# --------------------------------------------------------------
# Build setup
@ -296,17 +289,6 @@ BASE_FLAGS += -Wno-unused-variable
# also lots of plugins not updated to v2 yet
BASE_FLAGS += -Wno-deprecated-declarations
# --------------------------------------------------------------
# temporary macro just to get the ball rolling
ifeq ($(EXE_WRAPPER),wine)
PLUGINS_DIR = Z:$(subst /,\\,$(CURDIR))
else
PLUGINS_DIR = $(CURDIR)
endif
BUILD_CXX_FLAGS += -DCARDINAL_PLUGINS_DIR='"$(PLUGINS_DIR)"'
# --------------------------------------------------------------
# Build targets
@ -321,20 +303,28 @@ clean:
# --------------------------------------------------------------
PLUGIN_LIST = $(subst /plugin.json,,$(wildcard */plugin.json))
PLUGIN_RESOURCES = ../bin/Cardinal.lv2/resources/PluginManifests/Core.json
PLUGIN_RESOURCES += $(PLUGIN_LIST:%=../bin/Cardinal.lv2/resources/%)
PLUGIN_RESOURCES += $(PLUGIN_LIST:%=../bin/Cardinal.lv2/resources/PluginManifests/%.json)
ifeq ($(MACOS),true)
PLUGIN_RESOURCES += ../bin/Cardinal.vst/Contents/Resources/PluginManifests/Core.json
PLUGIN_RESOURCES += $(PLUGIN_LIST:%=../bin/Cardinal.vst/Contents/Resources/%)
PLUGIN_RESOURCES += $(PLUGIN_LIST:%=../bin/Cardinal.vst/Contents/Resources/PluginManifests/%.json)
else
PLUGIN_RESOURCES += ../bin/Cardinal.vst/resources/PluginManifests/Core.json
PLUGIN_RESOURCES += $(PLUGIN_LIST:%=../bin/Cardinal.vst/resources/%)
PLUGIN_RESOURCES += $(PLUGIN_LIST:%=../bin/Cardinal.vst/resources/PluginManifests/%.json)
endif
PLUGIN_RESOURCES += ../bin/Cardinal.vst3/Contents/Resources/PluginManifests/Core.json
PLUGIN_RESOURCES += $(PLUGIN_LIST:%=../bin/Cardinal.vst3/Contents/Resources/%)
PLUGIN_RESOURCES += $(PLUGIN_LIST:%=../bin/Cardinal.vst3/Contents/Resources/PluginManifests/%.json)
resources: $(PLUGIN_RESOURCES)
../bin/Cardinal.%/Core.json: Core.json
-@mkdir -p "$(shell dirname $@)"
ln -sf $(abspath $<) $@
../bin/Cardinal.lv2/resources/%: %/res
-@mkdir -p "$(shell dirname $@)"
ln -sf $(abspath $<) $@