Skip to content

Commit

Permalink
Fix Mac ndk-build error on motive, pie_noon, pindrop.
Browse files Browse the repository at this point in the history
We were looking for 'flatc' in motive/bin/Debug/flatc,
on Mac. It's actually built to flatbuffers/Debug/flatc.

Tested: OS X Yosemite, ndk-r10d. Also tested on Linux.
Change-Id: I9f1ecfe00c5f42fd9b6808b5a5da1c920487a4c2
  • Loading branch information
jsanmiya committed Mar 27, 2015
1 parent ca5c9e7 commit e859895
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ tests/monsterdata_java_wire.mon
tests/monsterdata_go_wire.mon
CMakeLists.txt.user
CMakeScripts/**
CTestTestfile.cmake
build/Xcode/FlatBuffers.xcodeproj/project.xcworkspace/**
build/Xcode/FlatBuffers.xcodeproj/xcuserdata/**
FlatBuffers.xcodeproj/
java/.idea
java/*.iml
java/target
9 changes: 6 additions & 3 deletions android/jni/include.mk
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,20 @@ endif
# The following block generates build rules which result in headers being
# rebuilt from flatbuffers schemas.

FLATBUFFERS_CMAKELISTS_DIR := \
$(realpath $(dir $(lastword $(MAKEFILE_LIST)))/../..)

# Directory that contains the FlatBuffers compiler.
FLATBUFFERS_FLATC_PATH?=$(CURDIR)/bin
ifeq (Windows,$(PROJECT_OS))
FLATBUFFERS_FLATC_PATH?=$(CURDIR)/bin
FLATBUFFERS_FLATC := $(FLATBUFFERS_FLATC_PATH)/Debug/flatc.exe
endif
ifeq (Linux,$(PROJECT_OS))
FLATBUFFERS_FLATC_PATH?=$(CURDIR)/bin
FLATBUFFERS_FLATC := $(FLATBUFFERS_FLATC_PATH)/flatc
endif
ifeq (Darwin,$(PROJECT_OS))
FLATBUFFERS_FLATC_PATH?=$(FLATBUFFERS_CMAKELISTS_DIR)
FLATBUFFERS_FLATC := $(FLATBUFFERS_FLATC_PATH)/Debug/flatc
endif

Expand All @@ -80,8 +85,6 @@ CMAKE := cmake
endif

# Generate a host build rule for the flatbuffers compiler.
FLATBUFFERS_CMAKELISTS_DIR := \
$(realpath $(dir $(lastword $(MAKEFILE_LIST)))/../..)
ifeq (Windows,$(PROJECT_OS))
define build_flatc_recipe
cd & jni\build_flatc.bat $(CMAKE)
Expand Down

0 comments on commit e859895

Please sign in to comment.