Warning, /sdk/kdesdk-thumbnailers/cmake/modules/FindGettextPO.cmake is written in an unsupported language. File is not indexed.
0001 # - Try to find GettextPO
0002 #
0003 # Once done this will define
0004 #
0005 # GETTEXTPO_FOUND - System has GETTEXTPO
0006 # GETTEXTPO_INCLUDE_DIR - The GETTEXTPO include directory
0007 # GETTEXTPO_LIBRARY - The library needed to use GETTEXTPO
0008
0009 # SPDX-FileCopyrightText: 2012 Ni Hui <shuizhuyuanluo@126.com>
0010 # Based off FindLibXml2.cmake from CMake 2.6.4:
0011 # SPDX-FileCopyrightText: Alexander Neundorf <neundorf@kde.org>
0012 #
0013 # SPDX-License-Identifier: BSD-3-Clause
0014
0015
0016 if(GETTEXTPO_INCLUDE_DIR AND GETTEXTPO_LIBRARY)
0017 # in cache already
0018 set(GETTEXTPO_FIND_QUIETLY TRUE)
0019 endif()
0020
0021 find_path(GETTEXTPO_INCLUDE_DIR gettext-po.h)
0022
0023 find_library(GETTEXTPO_LIBRARY NAMES gettextpo)
0024
0025 include(FindPackageHandleStandardArgs)
0026
0027 # handle the QUIETLY and REQUIRED arguments and set GETTEXTPO_FOUND to TRUE if
0028 # all listed variables are TRUE
0029 find_package_handle_standard_args(GettextPO DEFAULT_MSG GETTEXTPO_LIBRARY GETTEXTPO_INCLUDE_DIR)
0030
0031 mark_as_advanced(GETTEXTPO_INCLUDE_DIR GETTEXTPO_LIBRARY)
0032
0033 if (GETTEXTPO_FOUND AND NOT TARGET GettextPO::GettextPO)
0034 add_library(GettextPO::GettextPO UNKNOWN IMPORTED)
0035 set_target_properties(GettextPO::GettextPO PROPERTIES
0036 IMPORTED_LOCATION "${GETTEXTPO_LIBRARY}"
0037 INTERFACE_INCLUDE_DIRECTORIES "${GETTEXTPO_INCLUDE_DIR}"
0038 )
0039 endif()