vcpkg/ports/comms/portfile.cmake

26 lines
902 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 v4.0
SHA512 ec83bef647dd6c32e6ba98ce51970c48befaa2b0ff9c26f538fb0ce72e46da14cd592a0c652af5f9f10906f7058ff623dcf13ac4b81c96c0aea1fd8a31551bb7
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_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
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY)