2021-12-28 05:04:01 +08:00
|
|
|
vcpkg_from_gitlab(
|
|
|
|
GITLAB_URL https://gitlab.freedesktop.org
|
2020-04-29 04:15:57 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2021-12-28 05:04:01 +08:00
|
|
|
REPO uchardet/uchardet
|
2023-02-22 00:08:59 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 8d7a0abe1fcf7e92f9e264252eefa5810176603e3d3d825a23c3f5d23cd4f7cce9a0a9539e84bd70af5b66688394e48af00a00ce759a5a3d69b650f92351b6f2
|
2021-12-28 05:04:01 +08:00
|
|
|
HEAD_REF master
|
2023-02-22 00:08:59 +08:00
|
|
|
PATCHES
|
|
|
|
fix-uwp-build.patch
|
|
|
|
fix-config-error.patch
|
2020-04-29 04:15:57 +08:00
|
|
|
)
|
|
|
|
|
2021-12-28 05:04:01 +08:00
|
|
|
|
2020-04-29 04:15:57 +08:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-09-14 05:58:13 +08:00
|
|
|
FEATURES
|
|
|
|
tool BUILD_BINARY
|
2020-04-29 04:15:57 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
|
|
|
|
|
2021-09-14 05:58:13 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-04-29 04:15:57 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DBUILD_BINARY=OFF
|
|
|
|
OPTIONS_RELEASE
|
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
OPTIONS
|
|
|
|
-DBUILD_STATIC=${BUILD_STATIC}
|
|
|
|
)
|
|
|
|
|
2021-09-14 05:58:13 +08:00
|
|
|
vcpkg_cmake_install()
|
2020-04-29 04:15:57 +08:00
|
|
|
|
2023-02-22 00:08:59 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/uchardet)
|
|
|
|
|
2020-04-29 04:15:57 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2023-02-22 00:08:59 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
2020-04-29 04:15:57 +08:00
|
|
|
if(tool IN_LIST FEATURES)
|
2021-09-14 05:58:13 +08:00
|
|
|
vcpkg_copy_tools(TOOL_NAMES uchardet AUTO_CLEAN)
|
2020-04-29 04:15:57 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE
|
2021-09-14 05:58:13 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/share/man"
|
2020-04-29 04:15:57 +08:00
|
|
|
)
|
|
|
|
|
2023-02-22 00:08:59 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|