Only install the packages you actually need (#409)

This commit is contained in:
Dr. Patrick Urbanke (劉自成)
2025-04-18 08:35:40 +08:00
committed by GitHub
parent a70b4ecc7a
commit 70a047d597
2 changed files with 197 additions and 65 deletions
+56
View File
@@ -61,6 +61,62 @@ endif()
option(REFLECTCPP_USE_VCPKG "Use VCPKG to download and build dependencies" ${REFLECTCPP_USE_VCPKG_DEFAULT})
if (REFLECTCPP_USE_VCPKG)
if (REFLECTCPP_AVRO)
list(APPEND VCPKG_MANIFEST_FEATURES "avro")
endif()
if (REFLECTCPP_BSON)
list(APPEND VCPKG_MANIFEST_FEATURES "bson")
endif()
if (REFLECTCPP_BUILD_BENCHMARKS)
list(APPEND VCPKG_MANIFEST_FEATURES "benchmarks")
endif()
if (REFLECTCPP_BUILD_TESTS)
list(APPEND VCPKG_MANIFEST_FEATURES "tests")
endif()
if (REFLECTCPP_CAPNPROTO)
list(APPEND VCPKG_MANIFEST_FEATURES "capnproto")
endif()
if (REFLECTCPP_CBOR)
list(APPEND VCPKG_MANIFEST_FEATURES "cbor")
endif()
if (NOT REFLECTCPP_USE_BUNDLED_DEPENDENCIES)
list(APPEND VCPKG_MANIFEST_FEATURES "ctre")
endif()
if (REFLECTCPP_FLEXBUFFERS)
list(APPEND VCPKG_MANIFEST_FEATURES "flexbuffers")
endif()
if (REFLECTCPP_JSON AND NOT REFLECTCPP_USE_BUNDLED_DEPENDENCIES)
list(APPEND VCPKG_MANIFEST_FEATURES "json")
endif()
if (REFLECTCPP_MSGPACK)
list(APPEND VCPKG_MANIFEST_FEATURES "msgpack")
endif()
if (REFLECTCPP_TOML)
list(APPEND VCPKG_MANIFEST_FEATURES "toml")
endif()
if (REFLECTCPP_UBJSON)
list(APPEND VCPKG_MANIFEST_FEATURES "ubjson")
endif()
if (REFLECTCPP_XML)
list(APPEND VCPKG_MANIFEST_FEATURES "xml")
endif()
if (REFLECTCPP_YAML)
list(APPEND VCPKG_MANIFEST_FEATURES "yaml")
endif()
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake CACHE STRING "Vcpkg toolchain file")
endif ()
+141 -65
View File
@@ -3,70 +3,6 @@
"version-string": "0.19.0",
"builtin-baseline": "cd124b84feb0c02a24a2d90981e8358fdee0e077",
"dependencies": [
{
"name": "avro-c",
"version>=": "1.11.3"
},
{
"name": "capnproto",
"version>=": "1.0.2#1"
},
{
"name": "ctre",
"version>=": "3.8"
},
{
"name": "flatbuffers",
"version>=": "23.5.26#1"
},
{
"name": "libbson",
"version>=": "1.25.1"
},
{
"name": "jsoncons",
"version>=": "0.176.0"
},
{
"name": "msgpack-c",
"version>=": "6.0.0"
},
{
"name": "nlohmann-json",
"version>=": "3.11.3"
},
{
"name": "pugixml",
"version>=": "1.14"
},
{
"name": "rapidjson",
"version>=": "2023-07-17"
},
{
"name": "simdjson",
"version>=": "3.9.3"
},
{
"name": "tomlplusplus",
"version>=": "3.4.0#1"
},
{
"name": "yaml-cpp",
"version>=": "0.8.0#1"
},
{
"name": "yyjson",
"version>=": "0.10.0"
},
{
"name": "benchmark",
"version>=": "1.8.3"
},
{
"name": "gtest",
"version>=": "1.14.0"
},
{
"name": "vcpkg-cmake",
"version>=": "2023-05-04"
@@ -79,5 +15,145 @@
"name": "vcpkg-pkgconfig-get-modules",
"version>=": "2024-04-03"
}
]
],
"features": {
"avro": {
"description": "Enable Avro support",
"dependencies": [
{
"name": "avro-c",
"version>=": "1.11.3"
}
]
},
"benchmarks": {
"description": "Compile the benchmarks",
"dependencies": [
{
"name": "benchmark",
"version>=": "1.8.3"
},
{
"name": "nlohmann-json",
"version>=": "3.11.3"
},
{
"name": "rapidjson",
"version>=": "2023-07-17"
},
{
"name": "simdjson",
"version>=": "3.9.3"
}
]
},
"bson": {
"description": "Enable BSON support",
"dependencies": [
{
"name": "libbson",
"version>=": "1.25.1"
}
]
},
"capnproto": {
"description": "Enable Cap'n Proto support",
"dependencies": [
{
"name": "capnproto",
"version>=": "1.0.2#1"
}
]
},
"cbor": {
"description": "Enable CBOR support",
"dependencies": [
{
"name": "jsoncons",
"version>=": "0.176.0"
}
]
},
"ctre": {
"description": "Install CTRE using vcpkg instead of using the bundled version",
"dependencies": [
{
"name": "ctre",
"version>=": "3.8"
}
]
},
"flexbuffers": {
"description": "Enable flexbuffers support",
"dependencies": [
{
"name": "flatbuffers",
"version>=": "23.5.26#1"
}
]
},
"json": {
"description": "Enable JSON support",
"dependencies": [
{
"name": "yyjson",
"version>=": "0.10.0"
}
]
},
"msgpack": {
"description": "Enable msgpack support",
"dependencies": [
{
"name": "msgpack-c",
"version>=": "6.0.0"
}
]
},
"tests": {
"description": "Compile the tests",
"dependencies": [
{
"name": "gtest",
"version>=": "1.14.0"
}
]
},
"toml": {
"description": "Enable TOML support",
"dependencies": [
{
"name": "tomlplusplus",
"version>=": "3.4.0#1"
}
]
},
"ubjson": {
"description": "Enable UBJSON support",
"dependencies": [
{
"name": "jsoncons",
"version>=": "0.176.0"
}
]
},
"xml": {
"description": "Enable XML support",
"dependencies": [
{
"name": "pugixml",
"version>=": "1.14"
}
]
},
"yaml": {
"description": "Enable YAML support",
"dependencies": [
{
"name": "yaml-cpp",
"version>=": "0.8.0#1"
}
]
}
}
}