Skip to content

Commit

Permalink
Merge pull request #3712 from stweil/cmake
Browse files Browse the repository at this point in the history
cmake: TIFF is only used for WIN32
  • Loading branch information
egorpugin authored Jan 6, 2022
2 parents 790f3bd + 5113ed1 commit ded6108
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -372,15 +372,17 @@ else()
include_directories(${Leptonica_INCLUDE_DIRS})

# Check for optional libraries.
find_package(TIFF) # for tesseract
if(NOT TIFF_FOUND AND PKG_CONFIG_EXECUTABLE)
# try PKG_CONFIG to find libtiff if cmake failed
pkg_check_modules(TIFF libtiff-4)
endif()
if(TIFF_FOUND)
set(HAVE_TIFFIO_H ON)
include_directories(${TIFF_INCLUDE_DIRS})
endif(TIFF_FOUND)
if(WIN32)
find_package(TIFF) # for tesseract
if(NOT TIFF_FOUND AND PKG_CONFIG_EXECUTABLE)
# try PKG_CONFIG to find libtiff if cmake failed
pkg_check_modules(TIFF libtiff-4)
endif()
if(TIFF_FOUND)
set(HAVE_TIFFIO_H ON)
include_directories(${TIFF_INCLUDE_DIRS})
endif(TIFF_FOUND)
endif(WIN32)
if(DISABLE_ARCHIVE)
set(HAVE_LIBARCHIVE OFF)
else(DISABLE_ARCHIVE)
Expand Down

0 comments on commit ded6108

Please sign in to comment.