microsoft/onnxruntime-extensions
Publicmirrored from https://github.com/microsoft/onnxruntime-extensionsAvailable
cmake/externals/sentencepieceproject.cmake
19lines · modecode
| 1 | FetchContent_Declare( |
| 2 | spm |
| 3 | GIT_REPOSITORY https://github.com/google/sentencepiece.git |
| 4 | GIT_TAG v0.1.96 |
| 5 | ) |
| 6 | # spm is abbr. of sentencepiece to meet the MAX_PATH compiling requirement on Windows |
| 7 | FetchContent_GetProperties(spm) |
| 8 | |
| 9 | if(NOT spm_POPULATED) |
| 10 | FetchContent_Populate(spm) |
| 11 | add_subdirectory(${spm_SOURCE_DIR} ${spm_BINARY_DIR} EXCLUDE_FROM_ALL) |
| 12 | endif() |
| 13 | |
| 14 | set(spm_INCLUDE_DIRS |
| 15 | ${spm_SOURCE_DIR}/third_party/protobuf-lite |
| 16 | ${spm_SOURCE_DIR}/src/builtin_pb |
| 17 | ${spm_SOURCE_DIR}/third_party |
| 18 | ${spm_SOURCE_DIR}/src |
| 19 | ) |
| 20 | |