CMake: test for the presence of txt2tags
This commit is contained in:
parent
f7533fc93f
commit
4bd104d633
1
TODO.t2t
1
TODO.t2t
|
@ -56,7 +56,6 @@ Work to do in OwlPS
|
|||
- handle logo/
|
||||
- use the installation prefix as search prefix for configuration files
|
||||
in Listener, Aggregator and Positioner
|
||||
- make sure txt2tags is available
|
||||
|
||||
- Support string-based positioning requests
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
# This file is part of the Owl Positioning System (OwlPS) project.
|
||||
# It is subject to the copyright notice and license terms in the
|
||||
# COPYRIGHT.t2t file found in the top-level directory of this
|
||||
# distribution and at
|
||||
# http://code.lm7.fr/p/owlps/source/tree/master/COPYRIGHT.t2t
|
||||
# No part of the OwlPS Project, including this file, may be copied,
|
||||
# modified, propagated, or distributed except according to the terms
|
||||
# contained in the COPYRIGHT.t2t file; the COPYRIGHT.t2t file must be
|
||||
# distributed along with this file, either separately or by replacing
|
||||
# this notice by the COPYRIGHT.t2t file's contents.
|
||||
|
||||
# This module tries to find the txt2tags executable and sets the
|
||||
# following variables:
|
||||
# TXT2TAGS_EXECUTABLE
|
||||
# TXT2TAGS_FOUND
|
||||
|
||||
# Search for the executable
|
||||
find_program(TXT2TAGS_EXECUTABLE txt2tags)
|
||||
|
||||
# Did we find it?
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Txt2tags DEFAULT_MSG
|
||||
TXT2TAGS_EXECUTABLE)
|
|
@ -9,6 +9,14 @@
|
|||
# distributed along with this file, either separately or by replacing
|
||||
# this notice by the COPYRIGHT.t2t file's contents.
|
||||
|
||||
# Make sure txt2tags is available
|
||||
find_package(Txt2tags)
|
||||
if (NOT TXT2TAGS_FOUND)
|
||||
message(WARNING
|
||||
"Dependency missing to generate OwlPS' documentation: txt2tags")
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
||||
### Man pages ###
|
||||
|
||||
|
@ -32,7 +40,7 @@ function(add_manpage PAGENAME SECTION)
|
|||
# Command to generate the man page
|
||||
add_custom_command(
|
||||
OUTPUT "${TARGET}"
|
||||
COMMAND "${PREPROC_MAN}" "${SOURCE}" | txt2tags -q --infile=- --outfile="${TARGET}" -t man
|
||||
COMMAND "${PREPROC_MAN}" "${SOURCE}" | "${TXT2TAGS_EXECUTABLE}" -q --infile=- --outfile="${TARGET}" -t man
|
||||
DEPENDS "${SOURCE}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
COMMENT "Generating ${TARGETNAME}")
|
||||
|
|
Loading…
Reference in New Issue