Skip to content

Commit

Permalink
Set rpath when compiling against SentencePiece
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumekln committed Sep 10, 2018
1 parent 415cede commit f4cdf95
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ else()
list(APPEND INCLUDE_DIRECTORIES ${SP_INCLUDE_DIR})
list(APPEND LINK_LIBRARIES ${SP_LIBRARY})

get_filename_component(SP_LIBRARY_DIR ${SP_LIBRARY} DIRECTORY)
set(CMAKE_INSTALL_RPATH ${SP_LIBRARY_DIR})

find_library(SP_TRAIN_LIBRARY NAMES sentencepiece_train)
if(SP_TRAIN_LIBRARY)
add_definitions(-DWITH_SP_TRAIN)
Expand Down

0 comments on commit f4cdf95

Please sign in to comment.