2022-09-14 07:53:48 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO configcat/cpp-sdk
|
2023-03-16 01:30:16 +08:00
|
|
|
REF "v${VERSION}"
|
2023-12-14 15:27:11 +08:00
|
|
|
SHA512 a71706978b0a4e7b4bce7f194910b75221bc6483d38f7cda9d004abdf41dcdd97aa2754977e641c888065f3aeacd6e7e0893e5de1c9417a3d466a977a1dbb287
|
2022-09-14 07:53:48 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2023-12-14 15:27:11 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
INVERTED_FEATURES
|
|
|
|
network CONFIGCAT_USE_EXTERNAL_NETWORK_ADAPTER
|
|
|
|
)
|
|
|
|
|
2022-09-14 07:53:48 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
-DCONFIGCAT_BUILD_TESTS=OFF
|
2023-12-14 15:27:11 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2022-09-14 07:53:48 +08:00
|
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "share/cmake/configcat")
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|