2009-11-11 16:20:37 +00:00
|
|
|
#
|
2019-01-08 18:12:43 +00:00
|
|
|
# - Find pod2man and pod2html.
|
2009-11-11 16:20:37 +00:00
|
|
|
#
|
|
|
|
|
2016-10-19 10:19:38 +00:00
|
|
|
find_program(POD2MAN_EXECUTABLE
|
2009-11-11 16:20:37 +00:00
|
|
|
NAMES
|
|
|
|
pod2man
|
2017-10-14 23:12:53 +00:00
|
|
|
pod2man.bat
|
2009-11-11 16:20:37 +00:00
|
|
|
PATHS
|
|
|
|
/bin
|
|
|
|
/usr/bin
|
|
|
|
/usr/local/bin
|
|
|
|
/sbin
|
|
|
|
)
|
|
|
|
|
2016-10-19 10:19:38 +00:00
|
|
|
find_program(POD2HTML_EXECUTABLE
|
2009-11-11 16:20:37 +00:00
|
|
|
NAMES
|
|
|
|
pod2html
|
2017-04-26 13:44:29 +00:00
|
|
|
pod2html.bat
|
2009-11-11 16:20:37 +00:00
|
|
|
PATHS
|
|
|
|
/bin
|
|
|
|
/usr/bin
|
|
|
|
/usr/local/bin
|
|
|
|
/sbin
|
|
|
|
)
|
|
|
|
|
2009-12-29 12:12:26 +00:00
|
|
|
# handle the QUIETLY and REQUIRED arguments and set POD2HTML_FOUND to TRUE if
|
|
|
|
# all listed variables are TRUE
|
2016-10-19 10:19:38 +00:00
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(POD DEFAULT_MSG POD2MAN_EXECUTABLE POD2HTML_EXECUTABLE)
|
2009-11-11 16:20:37 +00:00
|
|
|
|
2016-10-19 10:19:38 +00:00
|
|
|
mark_as_advanced(
|
2009-12-29 12:12:26 +00:00
|
|
|
POD2MAN_EXECUTABLE
|
|
|
|
POD2HTML_EXECUTABLE
|
|
|
|
)
|
2009-11-11 16:20:37 +00:00
|
|
|
|
|
|
|
# run pod2man and pod2html
|
2016-10-19 10:19:38 +00:00
|
|
|
macro(pod2manhtml _sourcefile _manext)
|
|
|
|
get_filename_component(_basefile ${_sourcefile} NAME)
|
2009-11-11 16:20:37 +00:00
|
|
|
set(_outman ${_basefile}.${_manext})
|
|
|
|
set(_outhtml ${_basefile}.html)
|
2016-10-19 10:19:38 +00:00
|
|
|
|
|
|
|
add_custom_command(
|
2009-11-11 16:20:37 +00:00
|
|
|
OUTPUT
|
|
|
|
${_outman}
|
|
|
|
COMMAND
|
2013-10-04 16:55:04 +00:00
|
|
|
${PERL_EXECUTABLE} ${POD2MAN_EXECUTABLE}
|
2009-11-11 16:20:37 +00:00
|
|
|
--section=${_manext}
|
2017-07-20 16:37:15 +00:00
|
|
|
--center=\"The Wireshark Network Analyzer\"
|
2009-11-11 16:20:37 +00:00
|
|
|
--release=${CPACK_PACKAGE_VERSION}
|
|
|
|
${_sourcefile}.pod
|
|
|
|
> ${_outman}
|
2016-10-19 10:19:02 +00:00
|
|
|
DEPENDS
|
|
|
|
${_sourcefile}.pod
|
|
|
|
)
|
|
|
|
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT
|
|
|
|
${_outhtml}
|
2009-11-11 16:20:37 +00:00
|
|
|
COMMAND
|
2013-10-04 16:55:04 +00:00
|
|
|
${PERL_EXECUTABLE} ${POD2HTML_EXECUTABLE}
|
2017-07-20 16:37:15 +00:00
|
|
|
--title=\"${_basefile} - The Wireshark Network Analyzer ${CPACK_PACKAGE_VERSION}\"
|
2015-03-02 10:32:51 +00:00
|
|
|
--css=ws.css
|
2009-11-11 16:20:37 +00:00
|
|
|
--noindex
|
|
|
|
${_sourcefile}.pod
|
|
|
|
> ${_outhtml}
|
|
|
|
DEPENDS
|
|
|
|
${_sourcefile}.pod
|
|
|
|
${CMAKE_SOURCE_DIR}/docbook/ws.css
|
|
|
|
)
|
2016-10-19 10:19:38 +00:00
|
|
|
endmacro(pod2manhtml)
|
2009-11-11 16:20:37 +00:00
|
|
|
|
2016-10-19 10:19:38 +00:00
|
|
|
#
|
|
|
|
# Editor modelines - http://www.wireshark.org/tools/modelines.html
|
|
|
|
#
|
|
|
|
# Local variables:
|
|
|
|
# c-basic-offset: 8
|
|
|
|
# tab-width: 8
|
|
|
|
# indent-tabs-mode: t
|
|
|
|
# End:
|
|
|
|
#
|
|
|
|
# vi: set shiftwidth=8 tabstop=8 noexpandtab:
|
|
|
|
# :indentSize=8:tabSize=8:noTabs=false:
|
|
|
|
#
|