Skip to content

Commit ecf81a9

Browse files
author
minggo
committed
Merge pull request #58 from pipu/v3_add_flatbuffers
Add flat buffers into external
2 parents 90cb68b + 45525c0 commit ecf81a9

12 files changed

Lines changed: 5451 additions & 0 deletions

flatbuffers/Android.mk

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
LOCAL_PATH := $(call my-dir)
2+
3+
include $(CLEAR_VARS)
4+
5+
LOCAL_MODULE := cocos_flatbuffers_static
6+
7+
LOCAL_MODULE_FILENAME := flatbuffers
8+
9+
LOCAL_SRC_FILES := \
10+
flatc.cpp \
11+
idl_gen_cpp.cpp \
12+
idl_gen_fbs.cpp \
13+
idl_gen_general.cpp \
14+
idl_gen_go.cpp \
15+
idl_gen_text.cpp \
16+
idl_parser.cpp
17+
18+
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/..
19+
20+
LOCAL_C_INCLUDES := $(LOCAL_PATH)/..\
21+
22+
LOCAL_CPPFLAGS += -fexceptions
23+
24+
include $(BUILD_STATIC_LIBRARY)

flatbuffers/CMakeLists.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
set(FLATBUFFERS_SRC
2+
./flatc.cpp
3+
./idl_gen_cpp.cpp
4+
./idl_gen_fbs.cpp
5+
./idl_gen_general.cpp
6+
./idl_gen_go.cpp
7+
./idl_gen_text.cpp
8+
./idl_parser.cpp
9+
)
10+
11+
include_directories(
12+
${CMAKE_CURRENT_SOURCE_DIR}
13+
)
14+
15+
add_library(flatbuffers STATIC
16+
${FLATBUFFERS_SRC}
17+
)
18+
19+
set_target_properties(flatbuffers
20+
PROPERTIES
21+
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
22+
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
23+
)

0 commit comments

Comments
 (0)