Skip to content

Commit f09feca

Browse files
authored
Install the sentencepiece headers and fix include path (#110)
I'm not sure exactly why, but we weren't installing the sentencepiece headers. We also need to set our include path to point at our installed headers.
1 parent 93be043 commit f09feca

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ target_include_directories(
8282
tokenizers
8383
PUBLIC
8484
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
85+
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/pytorch/tokenizers>
8586
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/third-party/sentencepiece>
8687
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/third-party/sentencepiece/src>
8788
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/third-party/re2>
@@ -190,6 +191,12 @@ install(
190191
PATTERN "*.h"
191192
)
192193

194+
install(
195+
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/third-party/sentencepiece/src/
196+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pytorch/tokenizers
197+
FILES_MATCHING
198+
PATTERN "sentencepiece_processor.h"
199+
)
193200
install(
194201
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/third-party/json/single_include/
195202
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}

0 commit comments

Comments
 (0)