aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Facioni <francisco@remyrobotics.com>2020-11-25 19:23:45 +0000
committerGitHub <noreply@github.com>2020-11-25 11:23:45 -0800
commit2534ea40a4f95a297cad65b0ae1ce6547334f721 (patch)
treeb601aef68c1ba606404e6dd03adc695b7ef127f6
parente81a56708035a7612127d6152d16bf863b29df78 (diff)
downloadvcpkg-2534ea40a4f95a297cad65b0ae1ce6547334f721.tar.gz
vcpkg-2534ea40a4f95a297cad65b0ae1ce6547334f721.zip
[toml11] fixes installation (#14723)
* [toml11] fixes installation * Update ports/toml11/CONTROL Co-authored-by: Adam Johnson <AdamJohnso@gmail.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: Adam Johnson <AdamJohnso@gmail.com>
-rw-r--r--ports/toml11/CONTROL1
-rw-r--r--ports/toml11/portfile.cmake21
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