From 5f4d94e39514313bedbf7536a178fa80ea482f81 Mon Sep 17 00:00:00 2001 From: Andrew Kornilov Date: Thu, 5 Jan 2023 01:09:33 +0300 Subject: [PATCH] [cpptoml] Add cmake config to the installation (#28625) * [cpptoml] Add cmake config to the installation * Update version database * add homepage * update version Co-authored-by: Jonliu1993 <13720414433@163.com> --- ports/cpptoml/portfile.cmake | 21 +++++++++++++++------ ports/cpptoml/vcpkg.json | 16 ++++++++++++++-- versions/baseline.json | 2 +- versions/c-/cpptoml.json | 5 +++++ 4 files changed, 35 insertions(+), 9 deletions(-) diff --git a/ports/cpptoml/portfile.cmake b/ports/cpptoml/portfile.cmake index 62ea5fdec4..d4242ff074 100644 --- a/ports/cpptoml/portfile.cmake +++ b/ports/cpptoml/portfile.cmake @@ -1,14 +1,23 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO skystrife/cpptoml - + REF fededad7169e538ca47e11a9ee9251bc361a9a65 - SHA512 2ec50f4585bca33bb343170470048a7d7e7902f1ffa5709cf84ddf9f53a899ff1cc9ffa49e059f6dad93d13823c4d2661bc8109e4356078cdbdfef1a2be6a622 - + SHA512 2ec50f4585bca33bb343170470048a7d7e7902f1ffa5709cf84ddf9f53a899ff1cc9ffa49e059f6dad93d13823c4d2661bc8109e4356078cdbdfef1a2be6a622 + HEAD_REF master ) -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h") +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DCPPTOML_BUILD_EXAMPLES=OFF +) -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpptoml RENAME copyright) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/cpptoml/vcpkg.json b/ports/cpptoml/vcpkg.json index 13afe69b4c..fa2d04b577 100644 --- a/ports/cpptoml/vcpkg.json +++ b/ports/cpptoml/vcpkg.json @@ -1,6 +1,18 @@ { "name": "cpptoml", "version-string": "v0.1.1", - "port-version": 1, - "description": "A header-only library for parsing TOML configuration files." + "port-version": 2, + "description": "A header-only library for parsing TOML configuration files.", + "homepage": "https://github.com/skystrife/cpptoml", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] } diff --git a/versions/baseline.json b/versions/baseline.json index 139a0d8bec..3b1cd1db36 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1698,7 +1698,7 @@ }, "cpptoml": { "baseline": "v0.1.1", - "port-version": 1 + "port-version": 2 }, "cppunit": { "baseline": "1.15.1", diff --git a/versions/c-/cpptoml.json b/versions/c-/cpptoml.json index 9f1b406877..dc7f7d13b0 100644 --- a/versions/c-/cpptoml.json +++ b/versions/c-/cpptoml.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "56b510542b03ac901331cc1d074c140ff7aaaad1", + "version-string": "v0.1.1", + "port-version": 2 + }, { "git-tree": "f99a8c54489e45f171c05fa68d75f8cf5f6103cb", "version-string": "v0.1.1",