vcpkg/ports/co/portfile.cmake

37 lines
1.0 KiB
CMake
Raw Normal View History

if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
vcpkg_fail_port_install(ON_ARCH "arm" ON_TAREGT "uwp")
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO idealvin/co
REF 3fd22601de4d7a06548ca4d24ac36b4f82cde8c5 #v2.0.3
SHA512 fc3188355d3d4a8d56ebcca1cb4285be5bb4769328536f140d4ff6fc58f1e5ffe426f8a95506dfbc617acdd88c13d9b0420a03900bf63f83aeec090d4099c199
HEAD_REF master
)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
libcurl WITH_LIBCURL
openssl WITH_OPENSSL
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DSTATIC_VS_CRT=${STATIC_CRT}
DISABLE_PARALLEL_CONFIGURE
)
vcpkg_cmake_install()
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)