mirror of
https://github.com/google/sentencepiece.git
synced 2024-12-28 18:54:18 +03:00
Enable iOS builds
This commit is contained in:
parent
460d15b31d
commit
c2c21d4857
1020
cmake/ios.toolchain.cmake
Normal file
1020
cmake/ios.toolchain.cmake
Normal file
File diff suppressed because it is too large
Load Diff
@ -284,10 +284,19 @@ endif()
|
||||
list(APPEND SPM_INSTALLTARGETS
|
||||
spm_encode spm_decode spm_normalize spm_train spm_export_vocab)
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
install(TARGETS ${SPM_INSTALLTARGETS}
|
||||
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
else()
|
||||
install(TARGETS ${SPM_INSTALLTARGETS}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
|
||||
install(FILES sentencepiece_trainer.h sentencepiece_processor.h
|
||||
DESTINATION ${CMAKE_INSTALL_INCDIR})
|
||||
if (NOT SPM_USE_BUILTIN_PROTOBUF)
|
||||
@ -324,3 +333,11 @@ if (SPM_COVERAGE)
|
||||
COMMAND genhtml -o lcov_html coverage.info)
|
||||
add_dependencies(coverage spm_test)
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
set_xcode_property(spm_encode PRODUCT_BUNDLE_IDENTIFIER "SentencePiece" All)
|
||||
set_xcode_property(spm_decode PRODUCT_BUNDLE_IDENTIFIER "SentencePiece" All)
|
||||
set_xcode_property(spm_normalize PRODUCT_BUNDLE_IDENTIFIER "SentencePiece" All)
|
||||
set_xcode_property(spm_train PRODUCT_BUNDLE_IDENTIFIER "SentencePiece" All)
|
||||
set_xcode_property(spm_export_vocab PRODUCT_BUNDLE_IDENTIFIER "SentencePiece" All)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user