diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-06-14 19:00:52 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-06-14 19:00:52 +0000 |
commit | 393664dfb259cb9acb6c98816304f164bd553659 (patch) | |
tree | d82c84c3120751035aebc6fd5151e0ebdb2bd385 /share/cmake-3.22/Modules/FindHSPELL.cmake | |
parent | de5fa1c66d3bdcbf2bbc62d2504ec6b0b0fb74e1 (diff) | |
parent | 001ed46e3703c78cbc3838adfe4c14ba279f9ff7 (diff) | |
download | linux-x86-393664dfb259cb9acb6c98816304f164bd553659.tar.gz |
Snap for 8997548 from 001ed46e3703c78cbc3838adfe4c14ba279f9ff7 to androidx-paging-releaseandroidx-paging-release
Change-Id: I16c4afe8c8418013ba71465e1a6aa39006d6a233
Diffstat (limited to 'share/cmake-3.22/Modules/FindHSPELL.cmake')
-rw-r--r-- | share/cmake-3.22/Modules/FindHSPELL.cmake | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/share/cmake-3.22/Modules/FindHSPELL.cmake b/share/cmake-3.22/Modules/FindHSPELL.cmake new file mode 100644 index 0000000..9724d2c --- /dev/null +++ b/share/cmake-3.22/Modules/FindHSPELL.cmake @@ -0,0 +1,45 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindHSPELL +---------- + +Try to find Hebrew spell-checker (Hspell) and morphology engine. + +Once done this will define + +:: + + HSPELL_FOUND - system has Hspell + HSPELL_INCLUDE_DIR - the Hspell include directory + HSPELL_LIBRARIES - The libraries needed to use Hspell + HSPELL_DEFINITIONS - Compiler switches required for using Hspell + + + +:: + + HSPELL_VERSION_STRING - The version of Hspell found (x.y) + HSPELL_MAJOR_VERSION - the major version of Hspell + HSPELL_MINOR_VERSION - The minor version of Hspell +#]=======================================================================] + +find_path(HSPELL_INCLUDE_DIR hspell.h) + +find_library(HSPELL_LIBRARIES NAMES hspell) + +if (HSPELL_INCLUDE_DIR) + file(STRINGS "${HSPELL_INCLUDE_DIR}/hspell.h" HSPELL_H REGEX "#define HSPELL_VERSION_M(AJO|INO)R [0-9]+") + string(REGEX REPLACE ".*#define HSPELL_VERSION_MAJOR ([0-9]+).*" "\\1" HSPELL_VERSION_MAJOR "${HSPELL_H}") + string(REGEX REPLACE ".*#define HSPELL_VERSION_MINOR ([0-9]+).*" "\\1" HSPELL_VERSION_MINOR "${HSPELL_H}") + set(HSPELL_VERSION_STRING "${HSPELL_VERSION_MAJOR}.${HSPELL_VERSION_MINOR}") + unset(HSPELL_H) +endif() + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(HSPELL + REQUIRED_VARS HSPELL_LIBRARIES HSPELL_INCLUDE_DIR + VERSION_VAR HSPELL_VERSION_STRING) + +mark_as_advanced(HSPELL_INCLUDE_DIR HSPELL_LIBRARIES) |