CMake: check Asciidoctor version availability before using it

On Ubuntu trusty, Asciidoctor 1.4 is installed. This does not satisfy
the minimum version requirement (1.5) and should not be used even if the
binary is available.

Change-Id: Iaffd55a5bcb26510b4b59f209768a61c3116d32f
Fixes: v2.5.1rc0-76-g94a0f7c641 ("Switch from AsciiDoc to Asciidoctor.")
Reviewed-on: https://code.wireshark.org/review/28576
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Peter Wu 2018-07-03 11:42:20 +02:00 committed by Anders Broman
parent c8938f9ceb
commit 8998c91b32
1 changed files with 7 additions and 7 deletions

View File

@ -402,7 +402,7 @@ set( ASCIIDOC_CONF_FILES
# XXX Add macros
)
if(ASCIIDOCTOR_EXECUTABLE)
if(ASCIIDOCTOR_FOUND)
# Generate the DocBook sources of user and developer guides
ASCIIDOCTOR2DOCBOOK(user-guide.asciidoc ${ASCIIDOC_CONF_FILES} ${WSUG_SOURCE} ${WSUG_BUILT_DEPS})
@ -426,7 +426,7 @@ if(ASCIIDOCTOR_EXECUTABLE)
endif()
# User's Guide chain.
if(ASCIIDOCTOR_EXECUTABLE AND XSLTPROC_EXECUTABLE)
if(ASCIIDOCTOR_FOUND AND XSLTPROC_EXECUTABLE)
XML2HTML(
user_guide
wsug
@ -453,7 +453,7 @@ if(ASCIIDOCTOR_EXECUTABLE AND XSLTPROC_EXECUTABLE)
list(APPEND GUIDE_INSTALL_DIRS ${CMAKE_CURRENT_BINARY_DIR}/wsug_html_chunked)
endif()
if(ASCIIDOCTOR_PDF_EXECUTABLE)
if(ASCIIDOCTOR_FOUND AND ASCIIDOCTOR_PDF_EXECUTABLE)
ASCIIDOCTOR2PDF(user-guide.asciidoc ${WSUG_SOURCE} ${WSUG_BUILT_DEPS})
add_custom_target(
@ -465,7 +465,7 @@ if(ASCIIDOCTOR_PDF_EXECUTABLE)
add_dependencies(user_guides user_guide_pdf)
endif()
if(WIN32 AND ASCIIDOCTOR_EXECUTABLE)
if(WIN32 AND ASCIIDOCTOR_FOUND)
XML2HHP(user_guide wsug user-guide.xml)
HHP2CHM(user-guide.hhp)
add_custom_target(
@ -478,7 +478,7 @@ if(WIN32 AND ASCIIDOCTOR_EXECUTABLE)
endif()
# Developer's Guide chain.
if(ASCIIDOCTOR_EXECUTABLE AND XSLTPROC_EXECUTABLE)
if(ASCIIDOCTOR_FOUND AND XSLTPROC_EXECUTABLE)
XML2HTML(
developer_guide
wsdg
@ -505,7 +505,7 @@ if(ASCIIDOCTOR_EXECUTABLE AND XSLTPROC_EXECUTABLE)
list(APPEND GUIDE_INSTALL_DIRS ${CMAKE_CURRENT_BINARY_DIR}/wsdg_html_chunked)
endif()
if(ASCIIDOCTOR_PDF_EXECUTABLE)
if(ASCIIDOCTOR_FOUND AND ASCIIDOCTOR_PDF_EXECUTABLE)
ASCIIDOCTOR2PDF(developer-guide.asciidoc ${WSDG_SOURCE} ${WSDG_BUILT_DEPS})
add_custom_target(
@ -517,7 +517,7 @@ if(ASCIIDOCTOR_PDF_EXECUTABLE)
add_dependencies(developer_guides developer_guide_pdf)
endif()
if(WIN32 AND ASCIIDOCTOR_EXECUTABLE)
if(WIN32 AND ASCIIDOCTOR_FOUND)
XML2HHP(developer_guide wsdg developer-guide.xml)
HHP2CHM(developer-guide.hhp)
add_custom_target(