Skip to content

Commit

Permalink
Change target_link_libraries to PUBLIC
Browse files Browse the repository at this point in the history
  • Loading branch information
kpu committed Sep 25, 2020
1 parent 689a25a commit a900efa
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ add_subdirectory(common)

add_library(kenlm ${KENLM_LM_SOURCE} ${KENLM_LM_COMMON_SOURCE})
set_target_properties(kenlm PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_link_libraries(kenlm kenlm_util ${Boost_LIBRARIES} Threads::Threads)
target_link_libraries(kenlm PUBLIC kenlm_util ${Boost_LIBRARIES} Threads::Threads)

set(KENLM_MAX_ORDER 6 CACHE STRING "Maximum supported ngram order")
target_compile_definitions(kenlm PUBLIC -DKENLM_MAX_ORDER=${KENLM_MAX_ORDER})
Expand Down
2 changes: 1 addition & 1 deletion lm/builder/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ set(KENLM_BUILDER_SOURCE
#
add_library(kenlm_builder ${KENLM_BUILDER_SOURCE})

target_link_libraries(kenlm_builder kenlm kenlm_util ${Boost_LIBRARIES} Threads::Threads)
target_link_libraries(kenlm_builder PUBLIC kenlm kenlm_util ${Boost_LIBRARIES} Threads::Threads)

AddExes(EXES lmplz
LIBRARIES kenlm_builder kenlm kenlm_util ${Boost_LIBRARIES} Threads::Threads)
Expand Down
2 changes: 1 addition & 1 deletion lm/filter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set(KENLM_FILTER_SOURCE
# refer to these objects as $<TARGET_OBJECTS:foo>
#
add_library(kenlm_filter ${KENLM_FILTER_SOURCE})
target_link_libraries(kenlm_filter kenlm_util)
target_link_libraries(kenlm_filter PUBLIC kenlm_util)

AddExes(EXES filter phrase_table_vocab
LIBRARIES kenlm_filter kenlm)
Expand Down
2 changes: 1 addition & 1 deletion lm/interpolate/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if(EIGEN3_FOUND)
endif()

add_library(kenlm_interpolate ${KENLM_INTERPOLATE_SOURCE})
target_link_libraries(kenlm_interpolate kenlm)
target_link_libraries(kenlm_interpolate PUBLIC kenlm)

set(KENLM_INTERPOLATE_EXES
interpolate
Expand Down
4 changes: 2 additions & 2 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ elseif(WIN32)
set_target_properties(kenlm_python PROPERTIES SUFFIX ".pyd")
endif()

target_link_libraries(kenlm_python kenlm)
target_link_libraries(kenlm_python PUBLIC kenlm)
if(WIN32)
target_link_libraries(kenlm_python ${PYTHON_LIBRARIES})
target_link_libraries(kenlm_python PUBLIC ${PYTHON_LIBRARIES})
elseif(APPLE)
set_target_properties(kenlm_python PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
endif()
Expand Down
2 changes: 1 addition & 1 deletion util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ endif()
# Group these objects together for later use.
add_library(kenlm_util ${KENLM_UTIL_DOUBLECONVERSION_SOURCE} ${KENLM_UTIL_STREAM_SOURCE} ${KENLM_UTIL_SOURCE})
set_target_properties(kenlm_util PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_link_libraries(kenlm_util ${Boost_LIBRARIES} ${READ_COMPRESSED_LIBS} Threads::Threads ${RT})
target_link_libraries(kenlm_util PUBLIC ${Boost_LIBRARIES} ${READ_COMPRESSED_LIBS} Threads::Threads ${RT})

AddExes(EXES probing_hash_table_benchmark
LIBRARIES kenlm_util ${Boost_LIBRARIES} Threads::Threads)
Expand Down

0 comments on commit a900efa

Please sign in to comment.