diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/reflectcpp | |
Diffstat (limited to 'vcpkg/ports/reflectcpp')
| -rw-r--r-- | vcpkg/ports/reflectcpp/portfile.cmake | 50 | ||||
| -rw-r--r-- | vcpkg/ports/reflectcpp/usage | 4 | ||||
| -rw-r--r-- | vcpkg/ports/reflectcpp/vcpkg.json | 132 |
3 files changed, 186 insertions, 0 deletions
diff --git a/vcpkg/ports/reflectcpp/portfile.cmake b/vcpkg/ports/reflectcpp/portfile.cmake new file mode 100644 index 0000000..9465fb8 --- /dev/null +++ b/vcpkg/ports/reflectcpp/portfile.cmake @@ -0,0 +1,50 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO getml/reflect-cpp + REF "v${VERSION}" + SHA512 ef157de2426c2961a04cfc3bef6c6dd86b76b44e18f1c7b76cbe7d1bd78efa1b2e236fe4fdefbd2ae4a1d876231916b2338d062d0837d1c1cb8e29f14110bb2c + HEAD_REF main +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" REFLECTCPP_BUILD_SHARED) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + bson REFLECTCPP_BSON + capnproto REFLECTCPP_CAPNPROTO + cbor REFLECTCPP_CBOR + csv REFLECTCPP_CSV + flexbuffers REFLECTCPP_FLEXBUFFERS + msgpack REFLECTCPP_MSGPACK + parquet REFLECTCPP_PARQUET + toml REFLECTCPP_TOML + ubjson REFLECTCPP_UBJSON + xml REFLECTCPP_XML + yaml REFLECTCPP_YAML +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${FEATURE_OPTIONS} + -DREFLECTCPP_BUILD_TESTS=OFF + -DREFLECTCPP_BUILD_SHARED=${REFLECTCPP_BUILD_SHARED} + -DREFLECTCPP_USE_BUNDLED_DEPENDENCIES=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup( + CONFIG_PATH "lib/cmake/${PORT}" +) + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") +configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY) diff --git a/vcpkg/ports/reflectcpp/usage b/vcpkg/ports/reflectcpp/usage new file mode 100644 index 0000000..ebc57e4 --- /dev/null +++ b/vcpkg/ports/reflectcpp/usage @@ -0,0 +1,4 @@ +reflect-cpp provides CMake targets: + + find_package(reflectcpp CONFIG REQUIRED) + target_link_libraries(main PRIVATE reflectcpp::reflectcpp) diff --git a/vcpkg/ports/reflectcpp/vcpkg.json b/vcpkg/ports/reflectcpp/vcpkg.json new file mode 100644 index 0000000..f8fb0f9 --- /dev/null +++ b/vcpkg/ports/reflectcpp/vcpkg.json @@ -0,0 +1,132 @@ +{ + "name": "reflectcpp", + "version": "0.22.0", + "description": "A C++ library for serialization and deserialization using reflection. Supports JSON, Avro, BSON, Cap'n Proto, CBOR, CSV, flexbuffers, msgpack, parquet, TOML, UBJSON, XML, YAML.", + "homepage": "https://github.com/getml/reflect-cpp/", + "license": "MIT", + "dependencies": [ + { + "name": "ctre", + "version>=": "3.10.0" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + { + "name": "yyjson", + "version>=": "0.10.0" + } + ], + "features": { + "bson": { + "description": "Support for the BSON format", + "dependencies": [ + { + "name": "libbson", + "version>=": "1.25.1" + } + ] + }, + "capnproto": { + "description": "Support for the Cap'n Proto format", + "dependencies": [ + { + "name": "capnproto", + "version>=": "1.0.2#1" + } + ] + }, + "cbor": { + "description": "Support for the CBOR format", + "dependencies": [ + { + "name": "jsoncons", + "version>=": "1.4.0" + } + ] + }, + "csv": { + "description": "Enable CSV support", + "dependencies": [ + { + "name": "arrow", + "features": [ + "csv" + ], + "version>=": "21.0.0" + } + ] + }, + "flexbuffers": { + "description": "Support for the flexbuffers format (part of flatbuffers)", + "dependencies": [ + { + "name": "flatbuffers", + "version>=": "23.5.26#1" + } + ] + }, + "msgpack": { + "description": "Support for the msgpack format", + "dependencies": [ + { + "name": "msgpack-c", + "version>=": "6.0.0" + } + ] + }, + "parquet": { + "description": "Enable parquet support", + "dependencies": [ + { + "name": "arrow", + "features": [ + "parquet" + ], + "version>=": "21.0.0" + } + ] + }, + "toml": { + "description": "Support for the TOML format", + "dependencies": [ + { + "name": "tomlplusplus", + "version>=": "3.4.0#1" + } + ] + }, + "ubjson": { + "description": "Support for the UBJSON format", + "dependencies": [ + { + "name": "jsoncons", + "version>=": "1.4.0" + } + ] + }, + "xml": { + "description": "Support for the XML format", + "dependencies": [ + { + "name": "pugixml", + "version>=": "1.15" + } + ] + }, + "yaml": { + "description": "Support for the YAML format", + "dependencies": [ + { + "name": "yaml-cpp", + "version>=": "0.8.0#1" + } + ] + } + } +} |