Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fixed-string] Add library #14770

Merged
merged 2 commits into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ports/fixed-string/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Source: fixed-string
Version: 0.1.0
Description: Header-only C++17 library provides a string class with std::array fixed-size semantic.
Homepage: https://github.com/unterumarmung/fixed_string
27 changes: 27 additions & 0 deletions ports/fixed-string/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# header-only library

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO unterumarmung/fixed_string
REF v0.1.0
SHA512 759c228e3bc4bc06d58b59bc19756ceb27a6f6104cb0c58288bf3156ca0958e6099741870fa09ba88a5572d17988529992cc5198faab30847118665e626c2ea4
HEAD_REF master
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DFIXED_STRING_OPT_BUILD_EXAMPLES=OFF
-DFIXED_STRING_OPT_BUILD_TESTS=OFF
-DFIXED_STRING_OPT_INSTALL=ON
)

vcpkg_install_cmake()

vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/fixed_string TARGET_PATH share/fixed_string)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)

# Handle copyright
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)