diff options
author | fuzzard <fuzzard@kodi.tv> | 2023-06-13 16:32:02 +1000 |
---|---|---|
committer | fuzzard <fuzzard@kodi.tv> | 2023-06-13 16:32:02 +1000 |
commit | 10efd225bd75019e5340d2f8df27dd8fbdaa1395 (patch) | |
tree | 6ea91010f820037309c5bb59f43ee4ac2eef7c25 /tools | |
parent | 5bf464cbc6c518601a00fdfce27261ecba594e26 (diff) |
[tools/depends][native] Flatbuffers add native version use native Toolchain
Use native toolchain for native flatbuffer build
Add VERSION file to native flatbuffers
Diffstat (limited to 'tools')
-rw-r--r-- | tools/depends/native/flatbuffers/FLATBUFFERS-VERSION | 4 | ||||
-rw-r--r-- | tools/depends/native/flatbuffers/Makefile | 31 |
2 files changed, 8 insertions, 27 deletions
diff --git a/tools/depends/native/flatbuffers/FLATBUFFERS-VERSION b/tools/depends/native/flatbuffers/FLATBUFFERS-VERSION new file mode 100644 index 0000000000..5ccaa80c2d --- /dev/null +++ b/tools/depends/native/flatbuffers/FLATBUFFERS-VERSION @@ -0,0 +1,4 @@ +LIBNAME=flatbuffers +VERSION=23.3.3 +ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz +SHA512=4066c94f2473c7ea16917d29a613e16f840a329089c88e0bdbdb999aef3442ba00abfd2aa92266fa9c067e399dc88e6f0ccac40dc151378857e665638e78bbf0 diff --git a/tools/depends/native/flatbuffers/Makefile b/tools/depends/native/flatbuffers/Makefile index 2d55d7e583..4d2f8cec31 100644 --- a/tools/depends/native/flatbuffers/Makefile +++ b/tools/depends/native/flatbuffers/Makefile @@ -1,15 +1,7 @@ -include ../../Makefile.include +include ../../Makefile.include FLATBUFFERS-VERSION ../../download-files.include PREFIX=$(NATIVEPREFIX) PLATFORM=$(NATIVEPLATFORM) -DEPS =../../Makefile.include Makefile ../../download-files.include - -# lib name, version -LIBNAME=flatbuffers -VERSION=23.3.3 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.gz -SHA512=4066c94f2473c7ea16917d29a613e16f840a329089c88e0bdbdb999aef3442ba00abfd2aa92266fa9c067e399dc88e6f0ccac40dc151378857e665638e78bbf0 -include ../../download-files.include +DEPS =../../Makefile.include Makefile FLATBUFFERS-VERSION ../../download-files.include APP=$(PLATFORM)/build-cmake/flatc @@ -17,16 +9,7 @@ APP=$(PLATFORM)/build-cmake/flatc # When we go c++17, flatbuffers has FLATBUFFERS_BUILD_CPP17 to enable # If we bump cmake min req to 3.16, enable FLATBUFFERS_ENABLE_PCH -ifeq ($(USE_CCACHE), yes) - LAUNCHER=-DCMAKE_CXX_COMPILER_LAUNCHER=$(CCACHE) -endif - -# Only this package uses CMake for build on native at the moment, -# so there is no separate toolchain file. Still we have to unset -# the CMAKE_TOOLCHAIN_FILE, which is part of $(CMAKE) and set to -# the target toolchain file. -CMAKE_OPTIONS := -DCMAKE_TOOLCHAIN_FILE= \ - -DCMAKE_BUILD_TYPE=Release \ +CMAKE_OPTIONS := -DCMAKE_BUILD_TYPE=Release \ -DFLATBUFFERS_CODE_COVERAGE=OFF \ -DFLATBUFFERS_BUILD_TESTS=OFF \ -DFLATBUFFERS_INSTALL=ON \ @@ -35,12 +18,6 @@ CMAKE_OPTIONS := -DCMAKE_TOOLCHAIN_FILE= \ -DFLATBUFFERS_BUILD_FLATHASH=OFF \ -DFLATBUFFERS_BUILD_GRPCTEST=OFF \ -DFLATBUFFERS_BUILD_SHAREDLIB=OFF \ - -DCMAKE_C_COMPILER="$(CC_BINARY_FOR_BUILD)" \ - -DCMAKE_CXX_COMPILER="$(CXX_BINARY_FOR_BUILD)" \ - $(LAUNCHER) \ - -DCMAKE_C_FLAGS="$(NATIVE_CFLAGS)" \ - -DCMAKE_CXX_FLAGS="$(NATIVE_CXXFLAGS)" \ - -DCMAKE_EXE_LINKER_FLAGS="$(NATIVE_LDFLAGS)" \ $(CMAKE_OPTIONS) BUILDDIR = $(PLATFORM)/build-cmake # 'build' conflicts with file BUILD on case-insensitive FS @@ -51,7 +28,7 @@ $(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE) rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM) cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) mkdir -p $(BUILDDIR) - cd $(BUILDDIR); $(CMAKE) $(CMAKE_OPTIONS) .. + cd $(BUILDDIR); $(CMAKE_FOR_BUILD) $(CMAKE_OPTIONS) .. $(APP): $(PLATFORM) $(MAKE) -C $(BUILDDIR) |