mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-30 08:40:00 +00:00
Allow customization of flatc cmdline arguments on Android.
On Android builds, set FLATBUFFERS_FLATC_ARGS to change the arguments passed to the flatc cmdline. Do this in your Android makefile where you include the flatbuffers include.mk (before or after). For example FLATBUFFERS_FLATC_ARGS=--gen-mutable The default value is --gen-includes although since that is deprecated we could just make the default value blank. Change-Id: I79fb35f50c3e21bbef18ad40ad3559cb026ffe8e
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
21765bea2e
commit
185b9f9792
@@ -66,6 +66,8 @@ FLATBUFFERS_FLATC_PATH?=$(FLATBUFFERS_CMAKELISTS_DIR)
|
|||||||
FLATBUFFERS_FLATC := $(FLATBUFFERS_FLATC_PATH)/Debug/flatc
|
FLATBUFFERS_FLATC := $(FLATBUFFERS_FLATC_PATH)/Debug/flatc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
FLATBUFFERS_FLATC_ARGS?=--gen-includes
|
||||||
|
|
||||||
# Search for cmake.
|
# Search for cmake.
|
||||||
CMAKE_ROOT := $(realpath $(LOCAL_PATH)/../../../../../../prebuilts/cmake)
|
CMAKE_ROOT := $(realpath $(LOCAL_PATH)/../../../../../../prebuilts/cmake)
|
||||||
ifeq (,$(CMAKE))
|
ifeq (,$(CMAKE))
|
||||||
@@ -149,7 +151,7 @@ $(eval \
|
|||||||
$(call flatbuffers_fbs_to_h,$(2),$(3),$(1)): $(1) $(flatc_target)
|
$(call flatbuffers_fbs_to_h,$(2),$(3),$(1)): $(1) $(flatc_target)
|
||||||
$(call host-echo-build-step,generic,Generate) \
|
$(call host-echo-build-step,generic,Generate) \
|
||||||
$(subst $(LOCAL_PATH)/,,$(call flatbuffers_fbs_to_h,$(2),$(3),$(1)))
|
$(subst $(LOCAL_PATH)/,,$(call flatbuffers_fbs_to_h,$(2),$(3),$(1)))
|
||||||
$(hide) $$(FLATBUFFERS_FLATC) --gen-includes \
|
$(hide) $$(FLATBUFFERS_FLATC) $(FLATBUFFERS_FLATC_ARGS) \
|
||||||
$(foreach include,$(4),-I $(include)) -o $$(dir $$@) -c $$<)
|
$(foreach include,$(4),-I $(include)) -o $$(dir $$@) -c $$<)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user