Changeset View
Changeset View
Standalone View
Standalone View
cmake/FindLibIntl.cmake
1 | #.rst: | 1 | #.rst: | ||
---|---|---|---|---|---|
2 | # FindLibIntl | 2 | # FindLibIntl | ||
3 | # --------- | 3 | # --------- | ||
4 | # | 4 | # | ||
5 | # Find libintl | 5 | # Find libintl | ||
6 | # | 6 | # | ||
7 | # Find the libintl headers and libraries. On platforms that use glibc this is not required | 7 | # Find the libintl headers and libraries. On platforms that use glibc this is not required | ||
8 | # and LibIntl_LIBRARIES will be empty | 8 | # and LibIntl_LIBRARIES will be empty | ||
9 | # | 9 | # | ||
10 | # :: | 10 | # :: | ||
11 | # | 11 | # | ||
12 | # LibIntl_INCLUDE_DIRS - where to find libintl.h | 12 | # LibIntl_INCLUDE_DIRS - where to find libintl.h | ||
13 | # LibIntl_LIBRARIES - The libintl library if the current platform does not use glibc. | 13 | # LibIntl_LIBRARIES - The libintl library if the current platform does not use glibc. | ||
14 | # LibIntl_FOUND - True if libintl was found. | 14 | # LibIntl_FOUND - True if libintl was found. | ||
15 | 15 | | |||
16 | #============================================================================= | 16 | #============================================================================= | ||
17 | # Copyright 2014 Alex Richardson <arichardson.kde@gmail.com> | 17 | # SPDX-FileCopyrightText: 2014 Alex Richardson <arichardson.kde@gmail.com> | ||
18 | # | 18 | # | ||
19 | # Redistribution and use in source and binary forms, with or without | 19 | # SPDX-License-Identifier: BSD-3-Clause | ||
20 | # modification, are permitted provided that the following conditions | | |||
21 | # are met: | | |||
22 | # 1. Redistributions of source code must retain the above copyright | | |||
23 | # notice, this list of conditions and the following disclaimer. | | |||
24 | # 2. Redistributions in binary form must reproduce the above copyright | | |||
25 | # notice, this list of conditions and the following disclaimer in the | | |||
26 | # documentation and/or other materials provided with the distribution. | | |||
27 | # 3. Neither the name of the University nor the names of its contributors | | |||
28 | # may be used to endorse or promote products derived from this software | | |||
29 | # without specific prior written permission. | | |||
30 | # | | |||
31 | # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | | |||
32 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | | |||
33 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | | |||
34 | # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | | |||
35 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | |||
36 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | |||
37 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | |||
38 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | |||
39 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | |||
40 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | |||
41 | # SUCH DAMAGE. | | |||
42 | #============================================================================= | 20 | #============================================================================= | ||
43 | 21 | | |||
44 | find_path(LibIntl_INCLUDE_DIRS NAMES libintl.h) | 22 | find_path(LibIntl_INCLUDE_DIRS NAMES libintl.h) | ||
45 | find_library(LibIntl_LIBRARIES NAMES intl libintl) | 23 | find_library(LibIntl_LIBRARIES NAMES intl libintl) | ||
46 | 24 | | |||
47 | include(CheckCXXSymbolExists) | 25 | include(CheckCXXSymbolExists) | ||
48 | include(CMakePushCheckState) | 26 | include(CMakePushCheckState) | ||
49 | check_cxx_symbol_exists(dngettext libintl.h LibIntl_SYMBOL_FOUND) | 27 | check_cxx_symbol_exists(dngettext libintl.h LibIntl_SYMBOL_FOUND) | ||
Show All 22 Lines |