diff mbox series

[v2,2/2] package/flatbuffers: Enable host build

Message ID 20190616202337.27216-2-bernd.kuhls@t-online.de
State Accepted
Headers show
Series [v2,1/2] package/flatbuffers: bump version to v1.11.0 | expand

Commit Message

Bernd Kuhls June 16, 2019, 8:23 p.m. UTC
Host version of flatc compiler is needed for Kodi 18.x:
https://github.com/xbmc/xbmc/blob/master/cmake/modules/FindFlatBuffers.cmake#L51

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v2: removed upstream patch after version bump to v1.11.0

 package/flatbuffers/flatbuffers.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Thomas Petazzoni June 17, 2019, 6:12 p.m. UTC | #1
Hello Bernd,

On Sun, 16 Jun 2019 22:23:37 +0200
Bernd Kuhls <bernd.kuhls@t-online.de> wrote:

> Host version of flatc compiler is needed for Kodi 18.x:
> https://github.com/xbmc/xbmc/blob/master/cmake/modules/FindFlatBuffers.cmake#L51
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> v2: removed upstream patch after version bump to v1.11.0

I've applied, but I have a comment, see below.

> +HOST_FLATBUFFERS_CONF_OPTS += \
> +	-DCMAKE_CXX_FLAGS="-std=c++11" \

This line means you will have to change the dependency of Kodi to
require host gcc >= 4.8 instead of host gcc >= 4.6 as is done today.

Best regards,

Thomas
diff mbox series

Patch

diff --git a/package/flatbuffers/flatbuffers.mk b/package/flatbuffers/flatbuffers.mk
index 8252a1616c..3664cc79cb 100644
--- a/package/flatbuffers/flatbuffers.mk
+++ b/package/flatbuffers/flatbuffers.mk
@@ -20,4 +20,14 @@  else
 FLATBUFFERS_CONF_OPTS += -DFLATBUFFERS_BUILD_SHAREDLIB=ON
 endif
 
+HOST_FLATBUFFERS_CONF_OPTS += \
+	-DCMAKE_CXX_FLAGS="-std=c++11" \
+	-DFLATBUFFERS_BUILD_FLATLIB=OFF \
+	-DFLATBUFFERS_BUILD_FLATC=ON \
+	-DFLATBUFFERS_BUILD_FLATHASH=OFF \
+	-DFLATBUFFERS_BUILD_GRPCTEST=OFF \
+	-DFLATBUFFERS_BUILD_SHAREDLIB=OFF \
+	-DFLATBUFFERS_BUILD_TESTS=OFF
+
 $(eval $(cmake-package))
+$(eval $(host-cmake-package))