From 782e05de55c544bdf75da1d22bd3df21fbd78066 Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Fri, 28 Aug 2015 12:06:41 -0700 Subject: [PATCH] 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. --- android/jni/include.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/android/jni/include.mk b/android/jni/include.mk index 2acae06b7..1e0bcf1fa 100644 --- a/android/jni/include.mk +++ b/android/jni/include.mk @@ -86,6 +86,14 @@ ifeq (,$(CMAKE)) CMAKE := cmake 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. ifeq (Windows,$(PROJECT_OS)) define build_flatc_recipe @@ -170,7 +178,7 @@ $(foreach schema,$(1),\ $(call flatbuffers_header_build_rule,\ $(schema),$(strip $(2)),$(strip $(3)),$(strip $(4))))\ $(foreach src,$(strip $(5)),\ - $(eval $(LOCAL_PATH)/$$(src): \ + $(eval $(PORTABLE_LOCAL_PATH)$$(src): \ $(foreach schema,$(strip $(1)),\ $(call flatbuffers_fbs_to_h,$(strip $(2)),$(strip $(3)),$(schema))))) endef