1# 2# Arm SCP/MCP Software 3# Copyright (c) 2021, Arm Limited and Contributors. All rights reserved. 4# 5# SPDX-License-Identifier: BSD-3-Clause 6# 7 8include_guard() 9 10#[=======================================================================[.rst: 11------------ 12FindMarkdownlint 13 14Find markdownlint, the Markdown linter. 15 16Use this module by invoking ``find_package`` with the form:: 17 18 find_package(Markdownlint [REQUIRED]) 19 20Imported Targets 21^^^^^^^^^^^^^^^^ 22 23``Markdownlint`` 24 ``mdl``. Target defined if markdownlint is found. 25 26Result Variables 27^^^^^^^^^^^^^^^^ 28 29``Markdownlint_FOUND`` 30 If false, ``mdl`` was not found. 31 32``Markdownlint_EXECUTABLE`` 33 The full path to ``mdl``. 34#]=======================================================================] 35 36# cmake-lint: disable=C0103 37 38find_program(Markdownlint_EXECUTABLE "mdl") 39 40if(Markdownlint_EXECUTABLE) 41 mark_as_advanced(Markdownlint_EXECUTABLE) 42 43 add_executable(Markdownlint IMPORTED) 44 45 set_target_properties( 46 Markdownlint PROPERTIES IMPORTED_LOCATION "${Markdownlint_EXECUTABLE}") 47endif() 48 49include(FindPackageHandleStandardArgs) 50 51find_package_handle_standard_args(Markdownlint DEFAULT_MSG 52 Markdownlint_EXECUTABLE) 53