Warning, /pim/kdepim-addons/cmake/modules/FindDiscount.cmake is written in an unsupported language. File is not indexed.
0001 # - Find Discount 0002 # Find the discount markdown library. 0003 # 0004 # This module defines 0005 # discount_FOUND - whether the discount library was found 0006 # discount_LIBRARIES - the discount library 0007 # discount_INCLUDE_DIR - the include path of the discount library 0008 0009 # SPDX-FileCopyrightText: 2017 Julian Wolff <wolff@julianwolff.de> 0010 # SPDX-FileCopyrightText: 2018 Sune Vuorela <sune@kde.org> 0011 # SPDX-FileCopyrightText: 2018-2024 Laurent Montel <montel@kde.org> 0012 # 0013 # SPDX-License-Identifier: BSD-3-Clause 0014 0015 0016 if (discount_INCLUDE_DIRS AND discount_LIBRARIES) 0017 # Already in cache 0018 set (discount_FOUND TRUE) 0019 else () 0020 if (NOT WIN32) 0021 find_package(PkgConfig QUIET) 0022 PKG_CHECK_MODULES(PC_LIBMARKDOWN QUIET libmarkdown) 0023 set(PC_LIBMARKDOWN_VERSION_STRING ${PC_LIBMARKDOWN_VERSION}) 0024 MESSAGE(STATUS "VERSION ${PC_LIBMARKDOWN_VERSION_STRING}") 0025 endif () 0026 find_library (discount_LIBRARY 0027 NAMES markdown libmarkdown 0028 ) 0029 0030 find_path (discount_INCLUDE_DIR 0031 NAMES mkdio.h 0032 ) 0033 0034 set(discount_LIBRARIES ${discount_LIBRARY}) 0035 set(discount_INCLUDE_DIRS ${discount_INCLUDE_DIR}) 0036 0037 include (FindPackageHandleStandardArgs) 0038 find_package_handle_standard_args (discount DEFAULT_MSG discount_LIBRARIES discount_INCLUDE_DIR) 0039 0040 endif() 0041 0042 mark_as_advanced(discount_INCLUDE_DIRS discount_LIBRARIES) 0043 if (discount_FOUND) 0044 add_library(discount::Lib UNKNOWN IMPORTED) 0045 set_target_properties(discount::Lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${discount_INCLUDE_DIRS} IMPORTED_LOCATION ${discount_LIBRARIES}) 0046 endif()