Skip to content

Commit

Permalink
install rules
Browse files Browse the repository at this point in the history
  • Loading branch information
kpu committed Sep 27, 2020
1 parent 5c16465 commit 1616289
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions lm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1616289

Please sign in to comment.