diff --git a/ports/reflectcpp/portfile.cmake b/ports/reflectcpp/portfile.cmake new file mode 100644 index 00000000000000..4f572a5e5b4ee1 --- /dev/null +++ b/ports/reflectcpp/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO getml/reflect-cpp + REF "v${VERSION}" + SHA512 755f1474f3c58a950c6db010eeea388a11cf1caca66fbb75b1e03c86794fb3a9c6fa1509e0e78401d31055f43bcaddcd138da06d54e1e3507b2ea08d3a2d05b1 + 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_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/ports/reflectcpp/usage b/ports/reflectcpp/usage new file mode 100644 index 00000000000000..ebc57e43aa46cf --- /dev/null +++ b/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/ports/reflectcpp/vcpkg.json b/ports/reflectcpp/vcpkg.json new file mode 100644 index 00000000000000..a8da95833f2e82 --- /dev/null +++ b/ports/reflectcpp/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "reflectcpp", + "version": "0.13.0", + "description": "A C++ library for serialization and deserialization using reflection.", + "homepage": "https://github.com/getml/reflect-cpp/", + "license": "MIT", + "dependencies": [ + { + "name": "ctre", + "version>=": "3.9.0" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + { + "name": "yyjson", + "version>=": "0.9.0" + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 37049564d9e903..6a96ed0aff0bff 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7668,6 +7668,10 @@ "baseline": "0.12.4", "port-version": 0 }, + "reflectcpp": { + "baseline": "0.13.0", + "port-version": 0 + }, "refprop-headers": { "baseline": "2022-12-07", "port-version": 0 diff --git a/versions/r-/reflectcpp.json b/versions/r-/reflectcpp.json new file mode 100644 index 00000000000000..78acc6b826f313 --- /dev/null +++ b/versions/r-/reflectcpp.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "08d112d4bab3b16cfb10d1af5876dd192448be15", + "version": "0.13.0", + "port-version": 0 + } + ] +}