diff options
| -rw-r--r-- | ports/toml11/CONTROL | 1 | ||||
| -rw-r--r-- | 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 |
