Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kpu/kenlm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2020-09-27 22:16:33 +0300
committerKenneth Heafield <github@kheafield.com>2020-09-27 22:16:33 +0300
commit1616289e5cd514d4c226127b03687bab0b227f4c (patch)
treeb4c8ca4c4ba127f9d8ab151cfba62160c27e0356
parent5c164652b490ddbd06f9c753d3ca85a88229757f (diff)
install rules
-rw-r--r--CMakeLists.txt5
-rw-r--r--lm/CMakeLists.txt6
-rw-r--r--util/CMakeLists.txt7
3 files changed, 18 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f5576ee..9d9ed21 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -96,6 +96,11 @@ find_package(Threads REQUIRED)
add_subdirectory(util)
add_subdirectory(lm)
+foreach(SUBDIR IN ITEMS util util/double-conversion util/stream lm lm/builder lm/common lm/filter lm/interpolate)
+ file(GLOB HEADERS ${CMAKE_CURRENT_LIST_DIR}/${SUBDIR}/*.h ${CMAKE_CURRENT_LIST_DIR}/${SUBDIR}/*.hh)
+ install(FILES ${HEADERS} DESTINATION include/kenlm/${SUBDIR})
+endforeach(SUBDIR)
+
option (ENABLE_PYTHON "python bindings" OFF)
if(ENABLE_PYTHON)
add_subdirectory(python)
diff --git a/lm/CMakeLists.txt b/lm/CMakeLists.txt
index e82cdc8..25d22c3 100644
--- a/lm/CMakeLists.txt
+++ b/lm/CMakeLists.txt
@@ -37,6 +37,12 @@ target_link_libraries(kenlm PUBLIC kenlm_util ${Boost_LIBRARIES} Threads::Thread
set(KENLM_MAX_ORDER 6 CACHE STRING "Maximum supported ngram order")
target_compile_definitions(kenlm PUBLIC -DKENLM_MAX_ORDER=${KENLM_MAX_ORDER})
+install(TARGETS kenlm
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
# This directory has children that need to be processed
add_subdirectory(builder)
add_subdirectory(filter)
diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt
index cffa4db..b0a06b1 100644
--- a/util/CMakeLists.txt
+++ b/util/CMakeLists.txt
@@ -72,6 +72,13 @@ add_library(kenlm_util ${KENLM_UTIL_DOUBLECONVERSION_SOURCE} ${KENLM_UTIL_STREAM
set_target_properties(kenlm_util PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_link_libraries(kenlm_util PUBLIC ${Boost_LIBRARIES} ${READ_COMPRESSED_LIBS} Threads::Threads ${RT})
+install(TARGETS kenlm_util
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+
if (NOT WIN32)
AddExes(EXES probing_hash_table_benchmark
LIBRARIES kenlm_util ${Boost_LIBRARIES} Threads::Threads)