early-access version 2853
This commit is contained in:
20
externals/vcpkg/ports/flatbuffers/fix-uwp-build.patch
vendored
Executable file
20
externals/vcpkg/ports/flatbuffers/fix-uwp-build.patch
vendored
Executable file
@@ -0,0 +1,20 @@
|
||||
diff --git a/src/util.cpp b/src/util.cpp
|
||||
index 3670a019..fb5d884f 100644
|
||||
--- a/src/util.cpp
|
||||
+++ b/src/util.cpp
|
||||
@@ -255,9 +255,15 @@ bool ReadEnvironmentVariable(const char *var_name, std::string *_value) {
|
||||
#ifdef _MSC_VER
|
||||
__pragma(warning(disable : 4996)); // _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
+#if _WIN32_WINNT < 0x0A00
|
||||
auto env_str = std::getenv(var_name);
|
||||
if (!env_str) return false;
|
||||
if (_value) *_value = std::string(env_str);
|
||||
+#else
|
||||
+ //There is no support for environment variables in UWP
|
||||
+ var_name; // Do nothing
|
||||
+ *_value = std::string("");
|
||||
+#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
13
externals/vcpkg/ports/flatbuffers/ignore_use_of_cmake_toolchain_file.patch
vendored
Executable file
13
externals/vcpkg/ports/flatbuffers/ignore_use_of_cmake_toolchain_file.patch
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ec782239..f163b64d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -216,7 +216,7 @@ set(FlatBuffers_GRPCTest_SRCS
|
||||
# source_group(Compiler FILES ${FlatBuffers_Compiler_SRCS})
|
||||
# source_group(Tests FILES ${FlatBuffers_Tests_SRCS})
|
||||
|
||||
-if(EXISTS "${CMAKE_TOOLCHAIN_FILE}")
|
||||
+if(EXISTS "${CMAKE_TOOLCHAIN_FILE}" AND NOT DEFINED VCPKG_TOOLCHAIN)
|
||||
# do not apply any global settings if the toolchain
|
||||
# is being configured externally
|
||||
message(STATUS "Using toolchain file: ${CMAKE_TOOLCHAIN_FILE}.")
|
||||
23
externals/vcpkg/ports/flatbuffers/no-werror.patch
vendored
Executable file
23
externals/vcpkg/ports/flatbuffers/no-werror.patch
vendored
Executable file
@@ -0,0 +1,23 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ec782239..57566c5a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -233,13 +233,17 @@ elseif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
"${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
endif(CYGWIN)
|
||||
set(CMAKE_CXX_FLAGS
|
||||
- "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror -Wextra -Werror=shadow")
|
||||
+ "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Werror=shadow")
|
||||
set(FLATBUFFERS_PRIVATE_CXX_FLAGS "-Wold-style-cast")
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.4)
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
|
||||
set(CMAKE_CXX_FLAGS
|
||||
"${CMAKE_CXX_FLAGS} -faligned-new -Werror=implicit-fallthrough=2")
|
||||
endif()
|
||||
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
|
||||
+ set(CMAKE_CXX_FLAGS
|
||||
+ "${CMAKE_CXX_FLAGS} -Wextra")
|
||||
+ endif()
|
||||
set(CMAKE_CXX_FLAGS
|
||||
"${CMAKE_CXX_FLAGS} -Wunused-result -Werror=unused-result -Wunused-parameter -Werror=unused-parameter")
|
||||
endif()
|
||||
51
externals/vcpkg/ports/flatbuffers/portfile.cmake
vendored
Executable file
51
externals/vcpkg/ports/flatbuffers/portfile.cmake
vendored
Executable file
@@ -0,0 +1,51 @@
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO google/flatbuffers
|
||||
REF v2.0.6
|
||||
SHA512 be631f34064c28d81876bf137c796e9736623cf2cc4f2a05dd45372e7195729c99fad1fa795f8ce71a408756a842edbdc0c3bc714a7cf63203a1de8681d86fb6
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
ignore_use_of_cmake_toolchain_file.patch
|
||||
no-werror.patch
|
||||
fix-uwp-build.patch
|
||||
)
|
||||
|
||||
set(options "")
|
||||
if(VCPKG_CROSSCOMPILING)
|
||||
list(APPEND options -DFLATBUFFERS_BUILD_FLATC=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF)
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DFLATBUFFERS_BUILD_TESTS=OFF
|
||||
-DFLATBUFFERS_BUILD_GRPCTEST=OFF
|
||||
${options}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/flatbuffers)
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(GLOB flatc_path ${CURRENT_PACKAGES_DIR}/bin/flatc*)
|
||||
if(flatc_path)
|
||||
make_directory("${CURRENT_PACKAGES_DIR}/tools/flatbuffers")
|
||||
get_filename_component(flatc_executable ${flatc_path} NAME)
|
||||
file(
|
||||
RENAME
|
||||
${flatc_path}
|
||||
${CURRENT_PACKAGES_DIR}/tools/flatbuffers/${flatc_executable}
|
||||
)
|
||||
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/flatbuffers")
|
||||
else()
|
||||
file(APPEND "${CURRENT_PACKAGES_DIR}/share/flatbuffers/FlatbuffersConfig.cmake"
|
||||
"include(\"\${CMAKE_CURRENT_LIST_DIR}/../../../${HOST_TRIPLET}/share/flatbuffers/FlatcTargets.cmake\")\n")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
24
externals/vcpkg/ports/flatbuffers/vcpkg.json
vendored
Executable file
24
externals/vcpkg/ports/flatbuffers/vcpkg.json
vendored
Executable file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "flatbuffers",
|
||||
"version": "2.0.6",
|
||||
"description": [
|
||||
"Memory Efficient Serialization Library",
|
||||
"FlatBuffers is an efficient cross platform serialization library for games and other memory constrained apps. It allows you to directly access serialized data without unpacking/parsing it first, while still having great forwards/backwards compatibility."
|
||||
],
|
||||
"homepage": "https://google.github.io/flatbuffers/",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "flatbuffers",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user