early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,25 @@
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index b4f43f9..c90968f 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -137,4 +137,20 @@ add_library(table INTERFACE)
target_link_libraries(table INTERFACE
port)
+add_library(all_libs INTERFACE)
+target_link_libraries(all_libs
+ INTERFACE
+ upb
+ fastdecode
+ utf8_range
+ json
+ port
+ table
+ descriptor_upb_proto
+ reflection
+ textformat
+)
+set_target_properties(reflection PROPERTIES OUTPUT_NAME upb_reflection)
+set_target_properties(fastdecode PROPERTIES OUTPUT_NAME upb_fastdecode)
+set_target_properties(textformat PROPERTIES OUTPUT_NAME upb_textformat)

View File

@@ -0,0 +1,41 @@
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index c90968f..50637ec 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -8,7 +8,7 @@ else()
cmake_policy(VERSION 3.12)
endif()
-cmake_minimum_required (VERSION 3.0)
+cmake_minimum_required (VERSION 3.14)
cmake_policy(SET CMP0048 NEW)
project(upb)
@@ -154,3 +154,27 @@ set_target_properties(reflection PROPERTIES OUTPUT_NAME upb_reflection)
set_target_properties(fastdecode PROPERTIES OUTPUT_NAME upb_fastdecode)
set_target_properties(textformat PROPERTIES OUTPUT_NAME upb_textformat)
+install(
+ DIRECTORY ../upb
+ DESTINATION include
+ FILES_MATCHING
+ PATTERN "*.h"
+ PATTERN "*.hpp"
+ PATTERN "*.inc"
+ PATTERN "*.int.h"
+)
+target_include_directories(upb PUBLIC $<INSTALL_INTERFACE:include>)
+install(TARGETS
+ upb
+ utf8_range
+ fastdecode
+ json
+ port
+ table
+ descriptor_upb_proto
+ reflection
+ textformat
+ all_libs
+ EXPORT upb-config
+)
+install(EXPORT upb-config NAMESPACE upb:: DESTINATION share/upb)

View File

@@ -0,0 +1,33 @@
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 6b4c50d..b4f43f9 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -66,6 +66,10 @@ endif()
enable_testing()
add_library(port INTERFACE)
+add_library(descriptor_upb_proto INTERFACE)
+add_library(utf8_range
+ ../third_party/utf8_range/utf8_range.c
+ ../third_party/utf8_range/utf8_range.h)
add_library(upb
../upb/decode.c
../upb/decode_internal.h
@@ -84,7 +88,7 @@ add_library(upb
target_link_libraries(upb
fastdecode
port
- /third_party/utf8_range)
+ utf8_range)
add_library(fastdecode
../upb/decode.h
../upb/decode_internal.h
@@ -96,7 +100,7 @@ add_library(fastdecode
target_link_libraries(fastdecode
port
table
- /third_party/utf8_range)
+ utf8_range)
add_library(generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE)
target_link_libraries(generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE
table

28
externals/vcpkg/ports/upb/fix-uwp.patch vendored Executable file
View File

@@ -0,0 +1,28 @@
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index a6b432f..003615e 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -59,6 +59,10 @@ elseif(UNIX)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id")
endif()
+if (MSVC)
+ add_compile_options(/wd4146 /wd4703 -D_CRT_SECURE_NO_WARNINGS)
+endif()
+
enable_testing()
add_library(port INTERFACE)
diff --git a/upb/json_decode.c b/upb/json_decode.c
index bb33744..1fadd26 100644
--- a/upb/json_decode.c
+++ b/upb/json_decode.c
@@ -1160,7 +1160,7 @@ static void jsondec_struct(jsondec *d, upb_msg *msg, const upb_msgdef *m) {
static void jsondec_wellknownvalue(jsondec *d, upb_msg *msg,
const upb_msgdef *m) {
upb_msgval val;
- const upb_fielddef *f;
+ const upb_fielddef *f = NULL;
upb_msg *submsg;
switch (jsondec_peek(d)) {

26
externals/vcpkg/ports/upb/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,26 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO protocolbuffers/upb
REF 160625a9728b4031a21ad1e1c0146ea2c3a851eb # 2021-10-19
SHA512 13b205dd4278600e6ec05c829dc6c7e449747cccb118a3b83abc0ab5ef0ab180feb364ac84da8075471697fbba798ed3d9d763934d7fe9a64ac0560f5f9d3e83
HEAD_REF master
PATCHES
fix-uwp.patch
fix-cmakelists.patch
add-all-libs-target.patch
add-cmake-install.patch
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}/cmake"
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

16
externals/vcpkg/ports/upb/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,16 @@
{
"name": "upb",
"version-date": "2021-10-19",
"description": "μpb (often written 'upb') is a small protobuf implementation written in C.",
"homepage": "https://github.com/protocolbuffers/upb/",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}