vcpkg/ports/nameof/portfile.cmake
2019-10-07 11:02:53 -07:00

32 lines
844 B
CMake

# header-only library
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Neargye/nameof
REF v0.9.1
SHA512 58da89b161f5f3036b78971e4a669dd1efac3eb53499fd2469a568c4623b52679dcfd7ea4f8ed582910e88a137754b1662ff4fe7beb08278f2d3de6af1a1dba6
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})