update flatbuffers to version 1.3.0
This commit is contained in:
@@ -1,62 +0,0 @@
|
||||
From ab710b6f89339e9ddaffa8416910e4fd8684d0fb Mon Sep 17 00:00:00 2001
|
||||
From: Martell Malone <martellmalone@gmail.com>
|
||||
Date: Wed, 22 Jul 2015 13:34:44 +0100
|
||||
Subject: [PATCH] Add a libflatbuffers for other projects to use
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a746a64..3beee77 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -6,6 +6,7 @@ project(FlatBuffers)
|
||||
option(FLATBUFFERS_CODE_COVERAGE "Enable the code coverage build option." OFF)
|
||||
option(FLATBUFFERS_BUILD_TESTS "Enable the build of tests and samples." ON)
|
||||
option(FLATBUFFERS_INSTALL "Enable the installation of targets." ON)
|
||||
+option(FLATBUFFERS_BUILD_FLATLIB "Enable the build of the flatbuffers library" ON)
|
||||
option(FLATBUFFERS_BUILD_FLATC "Enable the build of the flatbuffers compiler" ON)
|
||||
option(FLATBUFFERS_BUILD_FLATHASH "Enable the build of flathash" ON)
|
||||
|
||||
@@ -15,7 +16,7 @@ if(NOT FLATBUFFERS_BUILD_FLATC AND FLATBUFFERS_BUILD_TESTS)
|
||||
set(FLATBUFFERS_BUILD_TESTS OFF)
|
||||
endif()
|
||||
|
||||
-set(FlatBuffers_Compiler_SRCS
|
||||
+set(FlatBuffers_Library_SRCS
|
||||
include/flatbuffers/flatbuffers.h
|
||||
include/flatbuffers/hash.h
|
||||
include/flatbuffers/idl.h
|
||||
@@ -26,6 +27,10 @@ set(FlatBuffers_Compiler_SRCS
|
||||
src/idl_gen_go.cpp
|
||||
src/idl_gen_text.cpp
|
||||
src/idl_gen_fbs.cpp
|
||||
+)
|
||||
+
|
||||
+set(FlatBuffers_Compiler_SRCS
|
||||
+ ${FlatBuffers_Library_SRCS}
|
||||
src/flatc.cpp
|
||||
)
|
||||
|
||||
@@ -91,6 +96,10 @@ endif(BIICODE)
|
||||
|
||||
include_directories(include)
|
||||
|
||||
+if(FLATBUFFERS_BUILD_FLATLIB)
|
||||
+add_library(flatbuffers STATIC ${FlatBuffers_Library_SRCS})
|
||||
+endif()
|
||||
+
|
||||
if(FLATBUFFERS_BUILD_FLATC)
|
||||
add_executable(flatc ${FlatBuffers_Compiler_SRCS})
|
||||
endif()
|
||||
@@ -121,6 +130,9 @@ endif()
|
||||
|
||||
if(FLATBUFFERS_INSTALL)
|
||||
install(DIRECTORY include/flatbuffers DESTINATION include)
|
||||
+ if(FLATBUFFERS_BUILD_FLATLIB)
|
||||
+ install(TARGETS flatbuffers DESTINATION lib)
|
||||
+ endif()
|
||||
if(FLATBUFFERS_BUILD_FLATC)
|
||||
install(TARGETS flatc DESTINATION bin)
|
||||
endif()
|
||||
--
|
||||
2.4.5
|
||||
|
||||
@@ -3,27 +3,21 @@
|
||||
_realname=flatbuffers
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=1.1.0
|
||||
pkgver=1.3.0
|
||||
pkgrel=1
|
||||
pkgdesc='Memory Efficient Serialization Library (mingw-w64)'
|
||||
arch=('any')
|
||||
url='https://google.github.io/flatbuffers/'
|
||||
license=('BSD')
|
||||
license=('Apache')
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake")
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-libsystre")
|
||||
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/google/${_realname}/archive/v${pkgver}.tar.gz"
|
||||
"0001-Add-a-libflatbuffers-for-other-projects-to-use.patch")
|
||||
sha256sums=('6ac776d86e1c9ac84497c51aeac5ddc79c9596166abd937dea073e1cc574a673'
|
||||
'84823326981c764fe5c554286e4e7396ee9366e859a6eadede8573d200195342')
|
||||
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/google/${_realname}/archive/v${pkgver}.tar.gz")
|
||||
sha256sums=('b81e11aa101927d464a231d6d3b18ab0e8ea4e959b72f415bb385bae0d74df53')
|
||||
options=('strip' '!libtool' 'staticlibs')
|
||||
|
||||
prepare() {
|
||||
cd $srcdir/${_realname}-${pkgver}
|
||||
patch -p1 < $srcdir/0001-Add-a-libflatbuffers-for-other-projects-to-use.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
mkdir -p "${srcdir}/build-${CARCH}"
|
||||
cd "${srcdir}/build-${CARCH}"
|
||||
mkdir -p "${srcdir}/build-${MINGW_CHOST}"
|
||||
cd "${srcdir}/build-${MINGW_CHOST}"
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
|
||||
${MINGW_PREFIX}/bin/cmake \
|
||||
@@ -35,6 +29,6 @@ build() {
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/build-${CARCH}"
|
||||
cd "${srcdir}/build-${MINGW_CHOST}"
|
||||
make install DESTDIR="${pkgdir}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user