2020-10-21 02:31:46 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO kpu/kenlm
|
2023-06-08 00:34:22 +08:00
|
|
|
REF 5bf7b46558e1c5595bf3b8c9b0b1f9d8d257040a
|
|
|
|
SHA512 04b645d09e60b65cb1e5065a1623ad01737f0dd9415cf620288ace0db10b1c424d72f304b34c52fa08684f3fecdaad9db91088134f34ed374cb1eb9d58c635b5
|
2020-10-21 02:31:46 +08:00
|
|
|
HEAD_REF master
|
2020-11-04 15:10:51 +08:00
|
|
|
PATCHES
|
|
|
|
fix-boost.patch
|
2023-06-08 00:34:22 +08:00
|
|
|
fix-boost-imported-targets.patch
|
2020-10-21 02:31:46 +08:00
|
|
|
)
|
|
|
|
|
2023-04-22 05:48:12 +08:00
|
|
|
file(REMOVE "${SOURCE_PATH}/cmake/modules/FindEigen3.cmake")
|
2020-10-21 02:31:46 +08:00
|
|
|
|
2023-04-27 12:05:37 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
interpolate ENABLE_INTERPOLATE
|
2020-10-21 02:31:46 +08:00
|
|
|
)
|
|
|
|
|
2023-04-14 00:13:15 +08:00
|
|
|
vcpkg_cmake_configure(
|
2023-04-22 05:48:12 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-10-21 02:31:46 +08:00
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
-DFORCE_STATIC=OFF #already handled by vcpkg
|
|
|
|
-DENABLE_PYTHON=OFF # kenlm.lib(bhiksha.cc.obj) : fatal error LNK1000: Internal error during IMAGE::Pass2
|
|
|
|
-DCOMPILE_TESTS=OFF
|
|
|
|
)
|
2023-04-14 00:13:15 +08:00
|
|
|
vcpkg_cmake_install()
|
2023-06-08 00:34:22 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH share/${PORT}/cmake)
|
2020-10-21 02:31:46 +08:00
|
|
|
|
|
|
|
set(KENLM_TOOLS count_ngrams filter fragment kenlm_benchmark lmplz phrase_table_vocab query build_binary)
|
|
|
|
if (NOT VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
list(APPEND KENLM_TOOLS probing_hash_table_benchmark)
|
|
|
|
if ("interpolate" IN_LIST FEATURES)
|
|
|
|
list(APPEND KENLM_TOOLS interpolate)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES ${KENLM_TOOLS} AUTO_CLEAN)
|
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2023-06-08 00:34:22 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2020-10-21 02:31:46 +08:00
|
|
|
|
|
|
|
# Copyright and License
|
2023-04-27 12:05:37 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING" "${SOURCE_PATH}/LICENSE")
|