Warning, /kdevelop/kdevelop/cmake/modules/FindMeson.cmake is written in an unsupported language. File is not indexed.
0001 # Find the meson executable
0002 #
0003 # Defines the following variables
0004 # Meson_EXECUTABLE - path of the meson executable
0005 # Meson_VERSION - version of the found meson executable
0006
0007 #=============================================================================
0008 # SPDX-FileCopyrightText: 2019 Daniel Mensinger <daniel@mensinger-ka.de>
0009 #
0010 # SPDX-License-Identifier: BSD-3-Clause
0011 #=============================================================================
0012
0013 find_program(Meson_EXECUTABLE NAMES meson meson.py)
0014
0015 set(Meson_VERSION "")
0016
0017 if(Meson_EXECUTABLE)
0018 execute_process(
0019 COMMAND ${Meson_EXECUTABLE} --version
0020 TIMEOUT 5
0021 OUTPUT_VARIABLE Meson_VERSION
0022 OUTPUT_STRIP_TRAILING_WHITESPACE
0023 )
0024 endif()
0025
0026 include(FindPackageHandleStandardArgs)
0027 find_package_handle_standard_args(Meson REQUIRED_VARS Meson_EXECUTABLE VERSION_VAR Meson_VERSION)
0028
0029 mark_as_advanced(Meson_EXECUTABLE)
0030 mark_as_advanced(Meson_VERSION)