2019-05-20 15:58:10 +08:00
|
|
|
if(NOT VCPKG_CMAKE_SYSTEM_NAME)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_STATIC_CRT)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO google/sentencepiece
|
2023-11-01 03:02:26 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 31dc4dc3f2ff4a7effc1ed2d6ad219bcd5d28c0bac89fdeae0336f23e93f954c597313788529e692a0d694d5fa7c3c285a485dfb84a96921efc4b49bcd465358
|
2019-05-20 15:58:10 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2021-11-16 08:34:31 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-05-20 15:58:10 +08:00
|
|
|
OPTIONS
|
|
|
|
-DSPM_ENABLE_SHARED=OFF
|
|
|
|
)
|
|
|
|
|
2021-11-16 08:34:31 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-05-20 15:58:10 +08:00
|
|
|
|
2021-11-16 08:34:31 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2022-11-08 07:41:58 +08:00
|
|
|
if(NOT VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_BUILD_TYPE)
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/sentencepiece.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/sentencepieced.lib")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/sentencepiece_train.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/sentencepiece_traind.lib")
|
2019-05-20 15:58:10 +08:00
|
|
|
endif()
|
|
|
|
|
2023-11-01 03:02:26 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
2019-05-20 15:58:10 +08:00
|
|
|
|
2021-08-05 04:27:40 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2021-11-16 08:34:31 +08:00
|
|
|
|
|
|
|
vcpkg_fixup_pkgconfig()
|