FindMotif.cmake 917 Bytes
Newer Older
1 2 3
# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.

4 5 6 7 8 9 10 11 12 13 14 15 16 17
#[=======================================================================[.rst:
FindMotif
---------

Try to find Motif (or lesstif)

Once done this will define:

::

  MOTIF_FOUND        - system has MOTIF
  MOTIF_INCLUDE_DIR  - include paths to use Motif
  MOTIF_LIBRARIES    - Link these to use Motif
#]=======================================================================]
Bill Hoffman's avatar
Bill Hoffman committed
18

19
set(MOTIF_FOUND 0)
20

21 22
if(UNIX)
  find_path(MOTIF_INCLUDE_DIR
Bill Hoffman's avatar
Bill Hoffman committed
23 24 25 26
    Xm/Xm.h
    /usr/openwin/include
    )

27
  find_library(MOTIF_LIBRARIES
Bill Hoffman's avatar
Bill Hoffman committed
28 29 30 31
    Xm
    /usr/openwin/lib
    )

32
endif()
Bill Hoffman's avatar
Bill Hoffman committed
33

34
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
35
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Motif DEFAULT_MSG MOTIF_LIBRARIES MOTIF_INCLUDE_DIR)
36

37
mark_as_advanced(
Bill Hoffman's avatar
Bill Hoffman committed
38 39 40
  MOTIF_INCLUDE_DIR
  MOTIF_LIBRARIES
)