vcpkg/ports/comms/portfile.cmake

26 lines
869 B
CMake
Raw Normal View History

2020-11-04 12:51:18 +08:00
#header-only library
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO commschamp/comms
REF "v${VERSION}"
SHA512 838b4c90a2c9c6374f0755a694057f60b53898dfdd100d16b0e81d308f6a62f3af9e680307b1782290d71c7c0d067fdf5af364e58f30907246b0fcad962e4ce8
2020-11-04 12:51:18 +08:00
HEAD_REF master
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
2020-11-04 12:51:18 +08:00
OPTIONS
-DCC_COMMS_BUILD_UNIT_TESTS=OFF
-DBUILD_TESTING=OFF
-DCC_COMMS_WARN_AS_ERR=OFF
2020-11-04 12:51:18 +08:00
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME LibComms CONFIG_PATH lib/LibComms/cmake)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
2020-11-04 12:51:18 +08:00
# Handle copyright
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY)