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}"
|
2024-03-29 03:42:05 +08:00
|
|
|
SHA512 b4214f5bfbe2a0757794c792e87e7c53fda7e65b2511b37fc757f280bf9287ba59b5d630801e17de6058f8292a3c6433211917324cb3446a212a51735402e614
|
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
|
2023-12-01 18:19:27 +08:00
|
|
|
-DSPM_USE_BUILTIN_PROTOBUF=ON
|
|
|
|
-DSPM_USE_EXTERNAL_ABSL=OFF
|
2019-05-20 15:58:10 +08:00
|
|
|
)
|
|
|
|
|
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}/debug/include")
|
2019-05-20 15:58:10 +08:00
|
|
|
|
2023-11-01 03:02:26 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
2019-05-20 15:58:10 +08:00
|
|
|
|
2023-12-01 18:19:27 +08:00
|
|
|
vcpkg_copy_tools(TOOL_NAMES spm_decode spm_encode spm_export_vocab spm_normalize spm_train AUTO_CLEAN)
|
|
|
|
|
2021-08-05 04:27:40 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2021-11-16 08:34:31 +08:00
|
|
|
|
|
|
|
vcpkg_fixup_pkgconfig()
|