forked from osmocom/wireshark
CMake: Fix package requirements for building docs
Make ASCIIDOC and XSLTPROC packages required if building any of the HTML, PDF or CHM guides. Don't attempt to build the release notes if ASCIIDOC isn't found. Change-Id: Id61653a635f91cbaffa32fb26ddbdbc568b74528 Reviewed-on: https://code.wireshark.org/review/24483 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
1097e8020a
commit
ce8f871900
|
@ -8,9 +8,17 @@
|
|||
#
|
||||
|
||||
find_package( LYNX )
|
||||
find_package( XSLTPROC )
|
||||
if(ENABLE_HTML_GUIDES OR ENABLE_PDF_GUIDES OR ENABLE_CHM_GUIDES)
|
||||
find_package( ASCIIDOC REQUIRED )
|
||||
find_package( XSLTPROC REQUIRED )
|
||||
else()
|
||||
# This is an optional add of the packages
|
||||
find_package( ASCIIDOC )
|
||||
find_package( XSLTPROC )
|
||||
endif()
|
||||
|
||||
if(ENABLE_CHM_GUIDES)
|
||||
find_package( HTMLHelp )
|
||||
find_package( HTMLHelp REQUIRED )
|
||||
if(HTML_HELP_COMPILER)
|
||||
# We do not need the HTML Help headers and library, just the
|
||||
# compiler. To avoid confusion, report the package as found.
|
||||
|
@ -21,8 +29,6 @@ if(ENABLE_CHM_GUIDES)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
find_package( ASCIIDOC )
|
||||
|
||||
if(WIN32)
|
||||
macro( HHP2CHM _hhpsource )
|
||||
get_filename_component( _source_base_name ${_hhpsource} NAME_WE )
|
||||
|
@ -347,11 +353,6 @@ set(WSLUA_MODULES
|
|||
${CMAKE_SOURCE_DIR}/epan/wslua/wslua_struct.c
|
||||
)
|
||||
|
||||
if(NOT ASCIIDOC_FOUND)
|
||||
message(WARNING "AsciiDoc not found, cannot build documentation.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Empty file to trigger wsluarm generation.
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT
|
||||
|
@ -568,17 +569,19 @@ add_custom_target(
|
|||
)
|
||||
set_target_properties(news PROPERTIES FOLDER "Docbook")
|
||||
|
||||
ASCIIDOC2HTML(
|
||||
release-notes.html
|
||||
release-notes.asciidoc
|
||||
"${ASCIIDOC_CONF_FILES}"
|
||||
)
|
||||
if( ASCIIDOC_FOUND )
|
||||
ASCIIDOC2HTML(
|
||||
release-notes.html
|
||||
release-notes.asciidoc
|
||||
"${ASCIIDOC_CONF_FILES}"
|
||||
)
|
||||
|
||||
ASCIIDOC2TXT(
|
||||
release-notes.txt
|
||||
release-notes.asciidoc
|
||||
"${ASCIIDOC_CONF_FILES}"
|
||||
)
|
||||
ASCIIDOC2TXT(
|
||||
release-notes.txt
|
||||
release-notes.asciidoc
|
||||
"${ASCIIDOC_CONF_FILES}"
|
||||
)
|
||||
endif()
|
||||
|
||||
#ASCIIDOC2PDF(
|
||||
# release-notes-a4.pdf
|
||||
|
|
Loading…
Reference in New Issue