Warning, /frameworks/kdelibs4support/cmake/modules/FindENCHANT.cmake is written in an unsupported language. File is not indexed.
0001 # - Try to find the Enchant spell checker 0002 # Once done this will define 0003 # 0004 # ENCHANT_FOUND - system has ENCHANT 0005 # ENCHANT_INCLUDE_DIR - the ENCHANT include directory 0006 # ENCHANT_LIBRARIES - Link these to use ENCHANT 0007 # ENCHANT_DEFINITIONS - Compiler switches required for using ENCHANT 0008 0009 # Copyright (c) 2006, Zack Rusin, <zack@kde.org> 0010 # 0011 # Redistribution and use is allowed according to the terms of the BSD license. 0012 # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 0013 0014 0015 if (ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES) 0016 0017 # in cache already 0018 set(ENCHANT_FOUND TRUE) 0019 0020 else (ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES) 0021 if (NOT WIN32) 0022 # use pkg-config to get the directories and then use these values 0023 # in the FIND_PATH() and FIND_LIBRARY() calls 0024 find_package(PkgConfig) 0025 pkg_check_modules(PC_ENCHANT QUIET enchant) 0026 set(ENCHANT_DEFINITIONS ${PC_ENCHANT_CFLAGS_OTHER}) 0027 endif (NOT WIN32) 0028 0029 find_path(ENCHANT_INCLUDE_DIR 0030 NAMES enchant++.h 0031 HINTS ${PC_ENCHANT_INCLUDEDIR} 0032 ${PC_ENCHANT_INCLUDE_DIRS} 0033 PATH_SUFFIXES enchant ) 0034 0035 find_library(ENCHANT_LIBRARIES NAMES enchant 0036 HINTS ${PC_ENCHANT_LIBDIR} 0037 ${PC_ENCHANT_LIBRARY_DIRS} ) 0038 0039 include(FindPackageHandleStandardArgs) 0040 find_package_handle_standard_args(ENCHANT DEFAULT_MSG ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES ) 0041 0042 mark_as_advanced(ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES) 0043 0044 endif (ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)