vcpkg/ports/argh/portfile.cmake

31 lines
944 B
CMake
Raw Normal View History

2019-02-02 02:04:22 +08:00
# header-only library
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO adishavit/argh
REF v1.3.2
SHA512 66073718ef1fc31fbd0feb9daf366a2e28c759de44fb1882dc46a6d10f7a44635ae1155882dff916f55c51fad88bedebdfe361418f7669fac241feead68f2b5b
2019-02-02 02:04:22 +08:00
HEAD_REF master
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
2019-02-02 02:04:22 +08:00
OPTIONS
-DBUILD_TESTS=OFF
-DBUILD_EXAMPLES=OFF
)
vcpkg_cmake_install()
2019-02-02 02:04:22 +08:00
if(EXISTS "${CURRENT_PACKAGES_DIR}/CMake")
vcpkg_cmake_config_fixup(CONFIG_PATH CMake)
elseif(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/${PORT}")
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
2019-02-02 02:04:22 +08:00
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
2019-02-02 02:04:22 +08:00
# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)