Warning, /education/labplot/cmake/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-License-Identifier: BSD-3-Clause
0012 
0013 find_package(PkgConfig QUIET)
0014 pkg_check_modules(PC_LIBMARKDOWN libmarkdown QUIET)
0015 
0016 set(Discount_VERSION ${PC_LIBMARKDOWN_VERSION})
0017 
0018 if (Discount_INCLUDE_DIR AND Discount_LIBRARIES)
0019 
0020   # Already in cache
0021   set (Discount_FOUND TRUE)
0022 
0023 else (Discount_INCLUDE_DIR AND Discount_LIBRARIES)
0024 
0025   find_library (Discount_LIBRARIES
0026     NAMES markdown libmarkdown
0027     HINTS ${PC_LIBMARKDOWN_LIBRARY_DIRS}
0028   )
0029 
0030   find_path (Discount_INCLUDE_DIR
0031     NAMES mkdio.h
0032     HINTS ${PC_LIBMARKDOWN_INCLUDE_DIRS}
0033   )
0034 
0035   include (FindPackageHandleStandardArgs)
0036   find_package_handle_standard_args (Discount DEFAULT_MSG Discount_LIBRARIES Discount_INCLUDE_DIR)
0037 
0038 endif (Discount_INCLUDE_DIR AND Discount_LIBRARIES)
0039 
0040 mark_as_advanced(Discount_INCLUDE_DIR Discount_LIBRARIES Discount_VERSION)
0041 
0042 if (Discount_FOUND)
0043    add_library(Discount::Lib UNKNOWN IMPORTED)
0044    set_target_properties(Discount::Lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${Discount_INCLUDE_DIR} IMPORTED_LOCATION ${Discount_LIBRARIES})
0045 endif()