mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-30 05:10:02 +00:00
Fixed Android builds on Windows (generated schema rules).
include.mk causes absolute paths to be generated, which doesn't work on Windows (make doesn't like : in paths). Change-Id: Ib06c9581620bde1e8452e0dd887d3986d517c4f5 Tested: on Windows, Linux.
This commit is contained in:
@@ -86,6 +86,14 @@ ifeq (,$(CMAKE))
|
|||||||
CMAKE := cmake
|
CMAKE := cmake
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Windows friendly portable local path.
|
||||||
|
# GNU-make doesn't like : in paths, must use relative paths on Windows.
|
||||||
|
ifeq (Windows,$(PROJECT_OS))
|
||||||
|
PORTABLE_LOCAL_PATH =
|
||||||
|
else
|
||||||
|
PORTABLE_LOCAL_PATH = $(LOCAL_PATH)/
|
||||||
|
endif
|
||||||
|
|
||||||
# Generate a host build rule for the flatbuffers compiler.
|
# Generate a host build rule for the flatbuffers compiler.
|
||||||
ifeq (Windows,$(PROJECT_OS))
|
ifeq (Windows,$(PROJECT_OS))
|
||||||
define build_flatc_recipe
|
define build_flatc_recipe
|
||||||
@@ -170,7 +178,7 @@ $(foreach schema,$(1),\
|
|||||||
$(call flatbuffers_header_build_rule,\
|
$(call flatbuffers_header_build_rule,\
|
||||||
$(schema),$(strip $(2)),$(strip $(3)),$(strip $(4))))\
|
$(schema),$(strip $(2)),$(strip $(3)),$(strip $(4))))\
|
||||||
$(foreach src,$(strip $(5)),\
|
$(foreach src,$(strip $(5)),\
|
||||||
$(eval $(LOCAL_PATH)/$$(src): \
|
$(eval $(PORTABLE_LOCAL_PATH)$$(src): \
|
||||||
$(foreach schema,$(strip $(1)),\
|
$(foreach schema,$(strip $(1)),\
|
||||||
$(call flatbuffers_fbs_to_h,$(strip $(2)),$(strip $(3)),$(schema)))))
|
$(call flatbuffers_fbs_to_h,$(strip $(2)),$(strip $(3)),$(schema)))))
|
||||||
endef
|
endef
|
||||||
|
|||||||
Reference in New Issue
Block a user