From 2534ea40a4f95a297cad65b0ae1ce6547334f721 Mon Sep 17 00:00:00 2001 From: Francisco Facioni Date: Wed, 25 Nov 2020 19:23:45 +0000 Subject: [toml11] fixes installation (#14723) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [toml11] fixes installation * Update ports/toml11/CONTROL Co-authored-by: Adam Johnson Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: Adam Johnson --- ports/toml11/CONTROL | 1 + ports/toml11/portfile.cmake | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ports/toml11/CONTROL b/ports/toml11/CONTROL index 2dc57462d..ca3483011 100644 --- a/ports/toml11/CONTROL +++ b/ports/toml11/CONTROL @@ -1,4 +1,5 @@ Source: toml11 Version: 3.5.0 +Port-Version: 1 Homepage: https://github.com/ToruNiina/toml11 Description: A C++11 header-only toml parser/encoder depending only on C++ standard library. diff --git a/ports/toml11/portfile.cmake b/ports/toml11/portfile.cmake index bb35b3dc2..46e042e2a 100644 --- a/ports/toml11/portfile.cmake +++ b/ports/toml11/portfile.cmake @@ -6,8 +6,23 @@ vcpkg_from_github( HEAD_REF master ) -file(INSTALL ${SOURCE_PATH}/toml.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/toml DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.hpp") - # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -Dtoml11_BUILD_TEST=OFF +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/toml11 TARGET_PATH share/toml11) + +vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/share/toml11/toml11Config.cmake + "\${PACKAGE_PREFIX_DIR}/lib/cmake/toml11/toml11Targets.cmake" + "\${PACKAGE_PREFIX_DIR}/share/toml11/toml11Targets.cmake" +) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) \ No newline at end of file -- cgit v1.2.3