aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindHtmlViewer.cmake
blob: 40cd03d4b26b75c6f82cc15c80a2a3894d0131f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#
# $Id$
#
# - Find an html viewer program
#
#  HTML_VIEWER_EXECUTABLE - the full path to perl
#  HTML_VIEWER_FOUND      - If false, don't attempt to use perl.

INCLUDE(FindCygwin)

FIND_PROGRAM(HTML_VIEWER_EXECUTABLE
  NAMES
    xdg-open
    mozilla
    htmlview
    ENV{HTML_VIEWER}
  PATHS
    ${CYGWIN_INSTALL_PATH}/bin
    /bin
    /usr/bin
    /usr/local/bin
    /sbin
)

IF (NOT HTML_VIEWER_EXECUTABLE)
  MESSAGE(FATAL_ERROR "HTML_VIEWER not found - aborting")
ELSE ()
  SET (HTML_VIEWER_FOUND "YES")
  MESSAGE(STATUS "Found HTML_VIEWER: ${HTML_VIEWER_EXECUTABLE}")
ENDIF ()


# For compat with configure
SET(HTML_VIEWER ${HTML_VIEWER_EXECUTABLE})


MARK_AS_ADVANCED(HTML_VIEWER_EXECUTABLE)