1# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2# file Copyright.txt or https://cmake.org/licensing for details.
3
4#[=======================================================================[.rst:
5FindMotif
6---------
7
8Try to find Motif (or lesstif)
9
10Once done this will define:
11
12::
13
14  MOTIF_FOUND        - system has MOTIF
15  MOTIF_INCLUDE_DIR  - include paths to use Motif
16  MOTIF_LIBRARIES    - Link these to use Motif
17#]=======================================================================]
18
19set(MOTIF_FOUND 0)
20
21if(UNIX)
22  find_path(MOTIF_INCLUDE_DIR
23    Xm/Xm.h
24    /usr/openwin/include
25    )
26
27  find_library(MOTIF_LIBRARIES
28    Xm
29    /usr/openwin/lib
30    )
31
32endif()
33
34include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
35FIND_PACKAGE_HANDLE_STANDARD_ARGS(Motif DEFAULT_MSG MOTIF_LIBRARIES MOTIF_INCLUDE_DIR)
36
37mark_as_advanced(
38  MOTIF_INCLUDE_DIR
39  MOTIF_LIBRARIES
40)
41