mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 07:13:35 +00:00
* Adds new RetroArchQT build target to RetroArch_Metal.xcodeproj Prerequisites: * Install Qt Frameworks $ brew install qt * Build `moc` files using $ make -f Makefile.apple HAVE_QT=1 Q=/usr/local/opt/qt/bin/moc generate Limitations: * Qt frameworks are not embedded in bundle, therefore Qt must be installed via the `brew` command
24 lines
640 B
Makefile
24 lines
640 B
Makefile
include Makefile.common
|
|
|
|
# Qt MOC generation, required for QObject-derived classes
|
|
ifneq ($(MOC_HEADERS),)
|
|
# prefix moc_ to base filename of paths and change extension from h to cpp, so a/b/foo.h becomes a/b/moc_foo.cpp
|
|
MOC_SRC := $(join $(addsuffix moc_,$(dir $(MOC_HEADERS))), $(notdir $(MOC_HEADERS:.h=.cpp)))
|
|
endif
|
|
|
|
Q ?= $(error missing moc)
|
|
|
|
.PHONY: generate
|
|
|
|
$(MOC_SRC):
|
|
@$(if $(Q), $(shell echo echo MOC $<),)
|
|
$(eval MOC_TMP := $(patsubst %.h,%_moc.cpp,$@))
|
|
$(Q)$(MOC) -o $(MOC_TMP) $<
|
|
|
|
$(foreach x,$(join $(addsuffix :,$(MOC_SRC)),$(MOC_HEADERS)),$(eval $x))
|
|
|
|
generate: $(MOC_SRC)
|
|
@echo $(MOC_SRC)
|
|
|
|
print-%:
|
|
@echo '$*=$($*)'
|