Skip to content

Commit

Permalink
[toml11] fixes installation (#14723)
Browse files Browse the repository at this point in the history
* [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>
  • Loading branch information
3 people committed Nov 25, 2020
1 parent e81a567 commit 2534ea4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions ports/toml11/CONTROL
Original file line number Diff line number Diff line change
@@ -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.
21 changes: 18 additions & 3 deletions ports/toml11/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 2534ea4

Please sign in to comment.