Warning, /frameworks/sonnet/cmake/FindENCHANT.cmake is written in an unsupported language. File is not indexed.

0001 # SPDX-FileCopyrightText: 2006 Zack Rusin <zack@kde.org>
0002 # SPDX-License-Identifier: BSD-3-Clause
0003 #
0004 # - Try to find the Enchant spell checker
0005 # Once done this will define
0006 #
0007 #  ENCHANT_FOUND - system has ENCHANT
0008 #  ENCHANT_INCLUDE_DIR - the ENCHANT include directory
0009 #  ENCHANT_LIBRARIES - Link these to use ENCHANT
0010 #  ENCHANT_DEFINITIONS - Compiler switches required for using ENCHANT
0011 
0012 if (ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
0013 
0014   # in cache already
0015   set(ENCHANT_FOUND TRUE)
0016 
0017 else (ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
0018   if (NOT WIN32)
0019     # use pkg-config to get the directories and then use these values
0020     # in the FIND_PATH() and FIND_LIBRARY() calls
0021     find_package(PkgConfig)
0022     pkg_check_modules(PC_ENCHANT QUIET enchant)
0023     set(ENCHANT_DEFINITIONS ${PC_ENCHANT_CFLAGS_OTHER})
0024   endif (NOT WIN32)
0025 
0026   find_path(ENCHANT_INCLUDE_DIR
0027             NAMES enchant++.h
0028             HINTS ${PC_ENCHANT_INCLUDEDIR}
0029                   ${PC_ENCHANT_INCLUDE_DIRS}
0030             PATH_SUFFIXES enchant )
0031 
0032   find_library(ENCHANT_LIBRARIES NAMES enchant
0033                HINTS ${PC_ENCHANT_LIBDIR}
0034                       ${PC_ENCHANT_LIBRARY_DIRS} )
0035 
0036   include(FindPackageHandleStandardArgs)
0037   find_package_handle_standard_args(ENCHANT  DEFAULT_MSG  ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES )
0038 
0039   mark_as_advanced(ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES)
0040 
0041 endif (ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)