Make man filename into a cmake variable
This commit is contained in:
parent
b39a953f69
commit
3f8a95601e
|
@ -175,9 +175,10 @@ endif ()
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
find_program( XSLTPROC_FOUND xsltproc )
|
find_program( XSLTPROC_FOUND xsltproc )
|
||||||
if (XSLTPROC_FOUND)
|
if (XSLTPROC_FOUND)
|
||||||
## NOTE: man name must match exe ie currently `tidy5.`` not `tidy.1`
|
## NOTE: man name must match exe ie currently `tidy5.1` not `tidy.1`
|
||||||
## also could use `manpath` command output to determine target install path
|
## also could use `manpath` command output to determine target install path
|
||||||
message("*** Generating man ***")
|
message("*** Generating man ***")
|
||||||
|
set(TIDY1_MANFILE tidy5.1)
|
||||||
set(TIDY1XSL ../documentation/tidy1.xsl)
|
set(TIDY1XSL ../documentation/tidy1.xsl)
|
||||||
set(TIDYHELP ${CMAKE_BINARY_DIR}/tidy-help.xml)
|
set(TIDYHELP ${CMAKE_BINARY_DIR}/tidy-help.xml)
|
||||||
add_custom_target(man ALL)
|
add_custom_target(man ALL)
|
||||||
|
@ -194,17 +195,17 @@ if (UNIX)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET man
|
TARGET man
|
||||||
SOURCE ${TIDYHELP}
|
SOURCE ${TIDYHELP}
|
||||||
COMMAND xsltproc ARGS ${TIDY1XSL} ${TIDYHELP} > ${CMAKE_BINARY_DIR}/tidy5.1
|
COMMAND xsltproc ARGS ${TIDY1XSL} ${TIDYHELP} > ${CMAKE_BINARY_DIR}/${TIDY1_MANFILE}
|
||||||
OUTPUTS ${CMAKE_BINARY_DIR}/tidy5.1
|
OUTPUTS ${CMAKE_BINARY_DIR}/${TIDY1_MANFILE}
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET man
|
TARGET man
|
||||||
SOURCE man
|
SOURCE man
|
||||||
DEPENDS ${CMAKE_BINARY_DIR}/tidy5.1
|
DEPENDS ${CMAKE_BINARY_DIR}/${TIDY1_MANFILE}
|
||||||
)
|
)
|
||||||
# repeated for quickref.html - may need different targets...
|
# repeated for quickref.html - may need different targets...
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/tidy5.1 DESTINATION local/man/man1)
|
install(FILES ${CMAKE_BINARY_DIR}/${TIDY1_MANFILE} DESTINATION local/man/man1)
|
||||||
# add the quickref.html install
|
# add the quickref.html install
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
Loading…
Reference in a new issue