[64efc22] | 1 | #.rst: |
---|
| 2 | # FindUtf8Proc |
---|
| 3 | # -------- |
---|
| 4 | # |
---|
| 5 | # Find utf8proc |
---|
| 6 | # |
---|
| 7 | # Find the UTF-8 processing library |
---|
| 8 | # |
---|
| 9 | # :: |
---|
| 10 | # |
---|
| 11 | # This module defines the following variables: |
---|
| 12 | # UTF8PROC_FOUND - True if UTF8PROC_INCLUDE_DIR & UTF8PROC_LIBRARY are found |
---|
| 13 | # UTF8PROC_LIBRARIES - Set when UTF8PROC_LIBRARY is found |
---|
| 14 | # UTF8PROC_INCLUDE_DIRS - Set when UTF8PROC_INCLUDE_DIR is found |
---|
| 15 | # |
---|
| 16 | # |
---|
| 17 | # |
---|
| 18 | # :: |
---|
| 19 | # |
---|
| 20 | # UTF8PROC_INCLUDE_DIR - where to find utf8proc.h |
---|
| 21 | # UTF8PROC_LIBRARY - the utf8proc library |
---|
| 22 | |
---|
| 23 | #============================================================================= |
---|
| 24 | # This module is adapted from FindALSA.cmake. Below are the original license |
---|
| 25 | # header. |
---|
| 26 | #============================================================================= |
---|
| 27 | # Copyright 2009-2011 Kitware, Inc. |
---|
| 28 | # Copyright 2009-2011 Philip Lowman <philip@yhbt.com> |
---|
| 29 | # |
---|
| 30 | # Distributed under the OSI-approved BSD License (the "License"); |
---|
| 31 | # see accompanying file Copyright.txt for details. |
---|
| 32 | # |
---|
| 33 | # This software is distributed WITHOUT ANY WARRANTY; without even the |
---|
| 34 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
---|
| 35 | # See the License for more information. |
---|
| 36 | #============================================================================= |
---|
| 37 | |
---|
| 38 | find_path( |
---|
| 39 | UTF8PROC_INCLUDE_DIR NAMES utf8proc.h DOC "The utf8proc include directory" |
---|
| 40 | ) |
---|
| 41 | |
---|
| 42 | find_library( |
---|
| 43 | UTF8PROC_LIBRARY NAMES utf8proc DOC "The utf8proc library" |
---|
| 44 | ) |
---|
| 45 | |
---|
| 46 | # handle the QUIETLY and REQUIRED arguments and set UTF8PROC_FOUND to TRUE if |
---|
| 47 | # all listed variables are TRUE |
---|
| 48 | include(FindPackageHandleStandardArgs) |
---|
| 49 | FIND_PACKAGE_HANDLE_STANDARD_ARGS( |
---|
| 50 | Utf8Proc |
---|
| 51 | FOUND_VAR Utf8Proc_FOUND |
---|
| 52 | REQUIRED_VARS UTF8PROC_LIBRARY UTF8PROC_INCLUDE_DIR |
---|
| 53 | ) |
---|
| 54 | |
---|
| 55 | if(Utf8Proc_FOUND) |
---|
| 56 | set( UTF8PROC_LIBRARIES ${UTF8PROC_LIBRARY} ) |
---|
| 57 | set( UTF8PROC_INCLUDE_DIRS ${UTF8PROC_INCLUDE_DIR} ) |
---|
| 58 | endif() |
---|
| 59 | |
---|
| 60 | mark_as_advanced(UTF8PROC_INCLUDE_DIR UTF8PROC_LIBRARY) |
---|