From d08ff1356d74eb3a0f9928c82553e4b6b233ed7c Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Thu, 27 Mar 2025 01:44:36 +0100 Subject: [PATCH] FindMotif: Update documentation This syncs the documentation output with similar find modules. Additionally, setting the MOTIF_FOUND variable to 0 is not needed at the beginning of the module, therefore removed. The find_package_handle_standard_arg() always sets the PackageName_FOUND and PACKAGENAME_FOUND variables based on the required variables, also on consecutive runs. --- Modules/FindMotif.cmake | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/Modules/FindMotif.cmake b/Modules/FindMotif.cmake index 44edfcd51a..d72b19309e 100644 --- a/Modules/FindMotif.cmake +++ b/Modules/FindMotif.cmake @@ -5,19 +5,37 @@ FindMotif --------- -Try to find Motif (or lesstif) +Finds Motif (or LessTif) graphical user interface toolkit. -Once done this will define: +Result Variables +^^^^^^^^^^^^^^^^ -:: +This module defines the following variables: - MOTIF_FOUND - system has MOTIF - MOTIF_INCLUDE_DIR - include paths to use Motif - MOTIF_LIBRARIES - Link these to use Motif +``Motif_FOUND`` + Boolean indicating whether the Motif was found. For backward compatibility, + the ``MOTIF_FOUND`` variable is also set to the same value. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``MOTIF_LIBRARIES`` + Libraries needed to link to Motif. +``MOTIF_INCLUDE_DIR`` + Include directories needed to use Motif. + +Examples +^^^^^^^^ + +Finding Motif: + +.. code-block:: cmake + + find_package(Motif) #]=======================================================================] -set(MOTIF_FOUND 0) - if(UNIX) find_path(MOTIF_INCLUDE_DIR Xm/Xm.h