Fix icon when `CC` has more than one word (#123)

Takes the first word as an argument instead of the entire `CC` string.
Ensures it's always one word.
This commit is contained in:
Filipianosol 2022-05-30 12:08:30 +02:00 committed by GitHub
parent 668544f62d
commit b9229aea5f
1 changed files with 1 additions and 1 deletions

View File

@ -906,7 +906,7 @@ ifeq ($(WINDOWS_BUILD),1)
ifeq ($(ICON),1) ifeq ($(ICON),1)
Command := mkdir -p "$(BUILD_DIR)/res" Command := mkdir -p "$(BUILD_DIR)/res"
Resp := $(shell $(call Command)) Resp := $(shell $(call Command))
Command := windres -o "$(BUILD_DIR)/res/icon.o" -i "res/icon.rc" --preprocessor $(CC) --preprocessor-arg -E --preprocessor-arg -xc-header --preprocessor-arg -DRC_INVOKED Command := windres -o "$(BUILD_DIR)/res/icon.o" -i "res/icon.rc" --preprocessor $(word 1, $(CC)) --preprocessor-arg -E --preprocessor-arg -xc-header --preprocessor-arg -DRC_INVOKED
Resp := $(shell $(call Command)) Resp := $(shell $(call Command))
ifeq ($(.SHELLSTATUS),0) ifeq ($(.SHELLSTATUS),0)
LDFLAGS += $(BUILD_DIR)/res/icon.o LDFLAGS += $(BUILD_DIR)/res/icon.o