cmd: compile midi-parser only if plugin has midi

This commit is contained in:
Stefano D'Angelo 2024-02-11 11:17:15 +01:00
parent 29891ae7bb
commit ecf6c7608a
2 changed files with 6 additions and 1 deletions

View File

@ -33,7 +33,10 @@ endif
PROGRAM = ${BUNDLE_NAME}${EXE_SUFFIX}
C_SRCS = ${COMMON_DIR}/src/main.c ${MIDI_PARSER_DIR}/src/midi-parser.c ${C_SRCS_EXTRA}
C_SRCS = ${COMMON_DIR}/src/main.c ${C_SRCS_EXTRA}
ifeq ($(HAS_MIDI_IN), yes)
C_SRCS += ${MIDI_PARSER_DIR}/src/midi-parser.c
endif
C_OBJS = $(addprefix build/obj/, $(notdir $(C_SRCS:.c=.o)))
CXX_SRCS = ${CXX_SRCS_EXTRA}

View File

@ -13,3 +13,5 @@ PLUGIN_DIR := {{=it.cmd_make && it.cmd_make.pluginDir ? it.cmd_make.pluginDir :
TINYWAV_DIR := {{=it.cmd_make.tinywavDir}}
MIDI_PARSER_DIR := {{=it.cmd_make.midiParserDir}}
HAS_MIDI_IN := {{=it.product.buses.filter(x => x.type == "midi" && x.direction == "input").length > 0 ? "yes" : "no"}}