[nameof] Add new port (#7250)

This commit is contained in:
myd7349 2019-07-18 15:15:56 +08:00 committed by Phil Christensen
parent 54b39598e1
commit 584da54a0f
2 changed files with 35 additions and 0 deletions

4
ports/nameof/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: nameof
Version: 2019-07-13
Description: Nameof operator for modern C++
Homepage: https://github.com/Neargye/nameof

View File

@ -0,0 +1,31 @@
# header-only library
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Neargye/nameof
REF 9d335128265e443acf4e12ed40327e166cd8e3da
SHA512 3d4af0069fc3dbf9a4a79ae1bea282cafb69606936a66bf43b5a13ae2f0cbc88e98dbb02a12e9c211afd73d9807b36a6f09635a1922ce5faaeb2a148672a0b13
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DNAMEOF_OPT_BUILD_EXAMPLES=OFF
-DNAMEOF_OPT_BUILD_TESTS=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
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)
# CMake integration test
vcpkg_test_cmake(PACKAGE_NAME ${PORT})