1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
#.rst:
# FindQRencode
# ------------
#
# Try to find the qrencode library.
#
# This will define the following variables:
#
# ``QRencode_FOUND``
# True if the QRencode library is available.
#
# ``QRencode_INCLUDE_DIRS``
# the QRencode library include dirs.
# This variable shall be passed to target_include_libraries() calls if
# the target is not used for linking.
#
# ``QRencode_LIBRARIES``
# the libraries used to link QRencode.
# This can be passed to target_link_libraries instead of
# the ``QRencode::QRencode`` target.
#
# If ``QRencode_FOUND`` is TRUE, the following imported target
# will be available:
#
# ``QRencode::QRencode``
# The QRencode library.
#
# Imported target since 5.27.0
#
#=============================================================================
# SPDX-FileCopyrightText: 2010 Sune Vuorela <sune@debian.org>
# SPDX-License-Identifier: BSD-3-Clause
#=============================================================================
find_library(QRencode_LIBRARIES NAMES qrencode qrencoded)
find_path(QRencode_INCLUDE_DIRS qrencode.h)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(QRencode
FOUND_VAR QRencode_FOUND
REQUIRED_VARS QRencode_LIBRARIES QRencode_INCLUDE_DIRS
)
if(QRencode_FOUND AND NOT TARGET QRencode::QRencode)
add_library(QRencode::QRencode UNKNOWN IMPORTED)
set_target_properties(QRencode::QRencode PROPERTIES
IMPORTED_LOCATION "${QRencode_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${QRencode_INCLUDE_DIRS}")
endif()
mark_as_advanced(QRencode_LIBRARIES QRencode_INCLUDE_DIRS)
include(FeatureSummary)
set_package_properties(QRencode PROPERTIES
URL "https://fukuchi.org/works/qrencode/"
DESCRIPTION "The QRencode library"
)
|