-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The lib still doesn't produce a CMake config file i.e. https://gitlab.kitware.com/cmake/community/-/wikis/doc/tutorials/How-to-create-a-ProjectConfig.cmake-file. This change creates one and lets KenLM interact with modern CMake projects without a ton of Findkenlm.cmake cruft. Other improvements include: - Remove duplicative linking of `${Boost_LIBRARIES}` and instead link to kenlm_util once then transitively to other targets - Do the same for Threads::Threads - Both of the above libraries are handled for transitive linking via CMake's `find_dependency(...)` in the genreated `kenlmConfig.cmake` - Wrap libraries in `BUILD_INTERFACE` so that libraries that find KenLM don't transitively compile with lib and include paths that are the same as the machines KenLM was compiled in
- Loading branch information
Showing
5 changed files
with
55 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@PACKAGE_INIT@ | ||
|
||
include(CMakeFindDependencyMacro) | ||
|
||
find_dependency(Boost) | ||
find_dependency(Threads) | ||
find_dependency(ZLIB) | ||
find_dependency(BZip2) | ||
find_dependency(LibLZMA) | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/kenlmTargets.cmake") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters