vcpkg/ports/tesseract/fix-depend-libarchive.patch

24 lines
856 B
Diff
Raw Normal View History

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bd2649d..c1801a6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -792,7 +792,8 @@ if(OpenCL_FOUND)
target_link_libraries(libtesseract PUBLIC OpenCL::OpenCL)
endif()
if(LibArchive_FOUND)
- target_link_libraries(libtesseract PUBLIC ${LibArchive_LIBRARIES})
+ find_package(LibArchive REQUIRED)
+ target_link_libraries(libtesseract PRIVATE LibArchive::LibArchive)
endif(LibArchive_FOUND)
if(CURL_FOUND)
if(NOT CURL_LIBRARIES)
@@ -854,7 +855,7 @@ endif()
# ##############################################################################
add_executable(tesseract src/tesseract.cpp)
-target_link_libraries(tesseract libtesseract)
+target_link_libraries(tesseract libtesseract LibArchive::LibArchive)
if(HAVE_TIFFIO_H AND WIN32)
target_link_libraries(tesseract ${TIFF_LIBRARIES})
endif()