2012-12-31 23:52:32 +01:00
|
|
|
# - Find Asciidoc
|
|
|
|
# this module looks for asciidoc and a2x
|
|
|
|
#
|
|
|
|
# ASCIIDOC_EXECUTABLE - the full path to asciidoc
|
|
|
|
# ASCIIDOC_FOUND - If false, don't attempt to use asciidoc.
|
|
|
|
# A2X_EXECUTABLE - the full path to a2x
|
|
|
|
# A2X_FOUND - If false, don't attempt to use a2x.
|
|
|
|
|
2015-03-11 10:35:59 +01:00
|
|
|
set (PROGRAMFILESX86 "PROGRAMFILES(X86)")
|
|
|
|
|
2012-12-31 23:52:32 +01:00
|
|
|
find_program(ASCIIDOC_EXECUTABLE asciidoc asciidoc.py
|
2015-02-12 20:29:09 +01:00
|
|
|
PATHS "$ENV{ASCIIDOC_ROOT}"
|
|
|
|
"$ENV{PROGRAMW6432}/asciidoc"
|
|
|
|
"$ENV{PROGRAMFILES}/asciidoc"
|
2015-03-11 10:35:59 +01:00
|
|
|
"$ENV{${PROGRAMFILESX86}}/asciidoc")
|
2012-12-31 23:52:32 +01:00
|
|
|
|
2013-01-01 08:25:15 +01:00
|
|
|
find_program(A2X_EXECUTABLE a2x
|
2015-02-12 20:29:09 +01:00
|
|
|
PATHS "$ENV{ASCIIDOC_ROOT}"
|
|
|
|
"$ENV{PROGRAMW6432}/asciidoc"
|
|
|
|
"$ENV{PROGRAMFILES}/asciidoc"
|
2015-03-11 10:35:59 +01:00
|
|
|
"$ENV{${PROGRAMFILESX86}}/asciidoc")
|
2015-02-12 20:29:09 +01:00
|
|
|
|
2012-12-31 23:52:32 +01:00
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_ARGS(AsciiDoc REQUIRED_VARS ASCIIDOC_EXECUTABLE)
|
2015-03-11 10:35:59 +01:00
|
|
|
mark_as_advanced(ASCIIDOC_EXECUTABLE A2X_EXECUTABLE)
|