Warning, /utilities/skanpage/cmake/FindLeptonica.cmake is written in an unsupported language. File is not indexed.
0001 # SPDX-FileCopyrightText: 2021 Alexander Stippich <a.stippich@gmx.net>
0002 #
0003 # SPDX-License-Identifier: BSD-2-Clause
0004 #
0005 # Leptonica_FOUND - system has Leptonica
0006 # Leptonica_INCLUDE_DIR - the Leptonica include directory
0007 # Leptonica_LIBRARIES - The libraries needed to use Leptonica
0008
0009 find_path(Leptonica_INCLUDE_DIRS leptonica/allheaders.h
0010 /usr/include
0011 /usr/local/include
0012 /opt/local/include
0013 )
0014
0015 find_library(Leptonica_LIBRARIES NAMES leptonica lept libleptonica liblept
0016 PATHS
0017 /usr/lib
0018 /usr/local/lib
0019 /opt/local/lib
0020 )
0021
0022 include(FindPackageHandleStandardArgs)
0023 find_package_handle_standard_args(Leptonica
0024 FOUND_VAR
0025 Leptonica_FOUND
0026 REQUIRED_VARS
0027 Leptonica_LIBRARIES
0028 Leptonica_INCLUDE_DIRS
0029 )
0030
0031 if(Leptonica_FOUND AND NOT TARGET Leptonica::Leptonica)
0032 add_library(Leptonica::Leptonica UNKNOWN IMPORTED)
0033 set_target_properties(Leptonica::Leptonica PROPERTIES
0034 IMPORTED_LOCATION "${Leptonica_LIBRARIES}"
0035 INTERFACE_INCLUDE_DIRECTORIES "${Leptonica_INCLUDE_DIRS}"
0036 )
0037 endif()
0038
0039 mark_as_advanced(Leptonica_LIBRARIES Leptonica_INCLUDE_DIRS Leptonica_VERSION)
0040
0041 include(FeatureSummary)
0042 set_package_properties(Leptonica PROPERTIES
0043 DESCRIPTION "Image processing library"
0044 URL "http://leptonica.org/"
0045 )