Warning, /frameworks/extra-cmake-modules/find-modules/Findgzip.cmake is written in an unsupported language. File is not indexed.
0001 # SPDX-FileCopyrightText: 2019, 2021 Friedrich W. H. Kossebau <kossebau@kde.org>
0002 #
0003 # SPDX-License-Identifier: BSD-3-Clause
0004
0005 #[=======================================================================[.rst:
0006 Findgzip
0007 --------
0008
0009 Try to find gzip.
0010
0011 If the gzip executable is not in your PATH, you can provide
0012 an alternative name or full path location with the ``gzip_EXECUTABLE``
0013 variable.
0014
0015 This will define the following variables:
0016
0017 ``gzip_FOUND``
0018 TRUE if gzip is available
0019
0020 ``gzip_EXECUTABLE``
0021 Path to gzip executable
0022
0023 If ``gzip_FOUND`` is TRUE, it will also define the following imported
0024 target:
0025
0026 ``gzip::gzip``
0027 Path to gzip executable
0028
0029 Since 5.85.0.
0030 #]=======================================================================]
0031
0032 find_program(gzip_EXECUTABLE NAMES gzip)
0033
0034 include(FindPackageHandleStandardArgs)
0035 find_package_handle_standard_args(gzip
0036 FOUND_VAR
0037 gzip_FOUND
0038 REQUIRED_VARS
0039 gzip_EXECUTABLE
0040 )
0041 mark_as_advanced(gzip_EXECUTABLE)
0042
0043 if(NOT TARGET gzip::gzip AND gzip_FOUND)
0044 add_executable(gzip::gzip IMPORTED)
0045 set_target_properties(gzip::gzip PROPERTIES
0046 IMPORTED_LOCATION "${gzip_EXECUTABLE}"
0047 )
0048 endif()
0049
0050 include(FeatureSummary)
0051 set_package_properties(gzip PROPERTIES
0052 URL "https://www.gnu.org/software/gzip"
0053 DESCRIPTION "Data compression program for the gzip format"
0054 )