fix cross-build to iOS/tvOS/watchOS

On these OS, executables are bundle, and they need a BUNDLE DESTINATION, otherwise CMake configuration fails.
See https://cmake.org/cmake/help/latest/policy/CMP0006.html
This commit is contained in:
SpaceIm 2021-07-17 01:45:32 +02:00 committed by Stefan Weil
parent 7fe0624838
commit b2fea77a27

View File

@ -717,7 +717,7 @@ get_target_property(tesseract_VERSION libtesseract VERSION)
get_target_property(tesseract_OUTPUT_NAME libtesseract OUTPUT_NAME)
configure_file(tesseract.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/tesseract.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tesseract.pc DESTINATION lib/pkgconfig)
install(TARGETS tesseract RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
install(TARGETS tesseract DESTINATION bin)
install(TARGETS libtesseract EXPORT TesseractTargets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
install(EXPORT TesseractTargets NAMESPACE Tesseract:: DESTINATION lib/cmake/tesseract)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cmake DESTINATION lib)