flashlight / text

Text utilities, including beam search decoding, tokenizing, and more, built for use in Flashlight.
MIT License
64 stars 14 forks source link

Fix KenLM CMake module installation/usage #59

Closed jacobkahn closed 1 year ago

jacobkahn commented 1 year ago

Summary

Change how Findkenlm.cmake is installed -- only install if it it was required to find KenLM in the first place (i.e. the KenLM CONFIG) didn't exist. Never install Findkenlm.cmake, since it relies on a deprecated install flow. Only use it if building Python bindings which require libkenlm.so (and the Windows implib) from site-packages.

This also changes the exported CMake config to only use the CMake config version when finding KenLM for downstream project linking.

Checklist

Test plan: CI, local tests

facebook-github-bot commented 1 year ago

@jacobkahn has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 year ago

@jacobkahn has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 year ago

@jacobkahn merged this pull request in flashlight/text@5758306352993c21bb50ebbc5bd65c77d78a66fc.