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