2019-07-18 15:15:56 +08:00
|
|
|
# header-only library
|
|
|
|
|
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Neargye/nameof
|
2019-10-22 06:24:13 +08:00
|
|
|
REF v0.9.2
|
|
|
|
SHA512 b83167daf13e1e4f174d723a8aaeb13cb386eb7bd5a74ebf4cdc34c78f5deb537c11d8b5204df26c827de11e10bd9006854c1f898e1fcf6526ad0e41aff6987b
|
2019-07-18 15:15:56 +08:00
|
|
|
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()
|
|
|
|
|
2019-10-22 06:24:13 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nameof)
|
2019-07-18 15:15:56 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
|
|
|
|
|
|
|
|
# Handle copyright
|
2019-10-22 06:24:13 +08:00
|
|
|
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/nameof/copyright COPYONLY)
|
2019-07-18 15:15:56 +08:00
|
|
|
|
|
|
|
# CMake integration test
|
2019-10-22 06:24:13 +08:00
|
|
|
vcpkg_test_cmake(PACKAGE_NAME nameof)
|