mirror of
https://github.com/google/sentencepiece.git
synced 2024-12-28 02:34:25 +03:00
Fix pkg-config file to avoid overlinking
When configured to use external protobuf, remove -lprotobuf-lite from pkg-config file's Libs section. The sentencepiece libraries link with libprotobuf-lite; it is not necessary for users of the sentencepiece libraries to link with protobuf unless they are using static linking so this should have been in Libs.private. Use Requires.private so that we use protobuf's pkg-config file to get the flags.
This commit is contained in:
parent
e081c671b2
commit
41835971b7
@ -75,7 +75,7 @@ endif()
|
||||
if (SPM_USE_BUILTIN_PROTOBUF)
|
||||
set(libprotobuf_lite "")
|
||||
else()
|
||||
set(libprotobuf_lite "-lprotobuf-lite")
|
||||
set(libprotobuf_lite "protobuf-lite")
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
|
@ -6,5 +6,6 @@ includedir=@includedir_for_pc_file@
|
||||
Name: @PROJECT_NAME@
|
||||
Description: Unsupervised text tokenizer and detokenizer for Neural Network-based text generation.
|
||||
Version: @PROJECT_VERSION@
|
||||
Libs: -L${libdir} -lsentencepiece -lsentencepiece_train @libprotobuf_lite@
|
||||
Libs: -L${libdir} -lsentencepiece -lsentencepiece_train
|
||||
Cflags: -I${includedir}
|
||||
Requires.private: @libprotobuf_lite@
|
||||
|
Loading…
Reference in New Issue
Block a user