-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake - Rename cmake modules for clarity
This also moves the html rules to a separate file
- Loading branch information
Showing
9 changed files
with
50 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# | ||
# Functions to generate xml (docbook) documentation | ||
# | ||
# Paremeters: | ||
# - docname: basename of the main xml file. Will be used to locate | ||
# this primary xml file and for various output files/directories | ||
# - lang: language of the current document | ||
# - entities: list of all xml files this document is composed of | ||
# - figdir: name of the directory holding the images | ||
|
||
# ************** Rules to install xml files for gnome-help *********************** | ||
function (add_xml_target docname lang entities figdir) | ||
|
||
set(xml_files "${entities}") | ||
list(APPEND xml_files "${docname}.xml" "${CMAKE_SOURCE_DIR}/docbook/gnc-docbookx.dtd") | ||
file(GLOB figures "${CMAKE_CURRENT_SOURCE_DIR}/${figdir}/*.png") | ||
|
||
install(FILES ${xml_files} | ||
DESTINATION "${CMAKE_INSTALL_DATADIR}/gnome/help/${docname}/${lang}" | ||
COMPONENT "${lang}-${docname}-xml") | ||
install(FILES ${figures} | ||
DESTINATION "${CMAKE_INSTALL_DATADIR}/gnome/help/${docname}/${lang}/${figdir}" | ||
COMPONENT "${lang}-${docname}-xml") | ||
|
||
add_custom_target("${lang}-${docname}-check" | ||
COMMAND ${XMLLINT} --postvalid | ||
--xinclude | ||
--noout | ||
--path ${CMAKE_SOURCE_DIR}/docbook | ||
${CMAKE_CURRENT_SOURCE_DIR}/${docname}.xml | ||
DEPENDS ${entities} "${docname}.xml" "${CMAKE_SOURCE_DIR}/docbook/gnc-docbookx.dtd") | ||
|
||
add_dependencies(${docname}-check "${lang}-${docname}-check") | ||
|
||
# TODO Uninstall and dist targets | ||
# uninstall-hook: | ||
# rmdir --ignore-fail-on-non-empty "$(DESTDIR)$(gnomehelpfiguresdir)" | ||
# rmdir --ignore-fail-on-non-empty "$(DESTDIR)$(gnomehelpdir)" | ||
# | ||
# EXTRA_DIST = ${xml_files} ${omffile} ${figures} | ||
endfunction() |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters