diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-02-11 14:34:04 -0800 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-02-13 06:18:34 +0000 |
commit | 9cc4a3b9674c2b5b53bd32b54dfe863bb08b81ed (patch) | |
tree | 30618b56beb360764cdc5753e4706411d3697f85 /docbook | |
parent | d1ce1baf63c96f9bddfe8577a82568b21295fd96 (diff) |
CMake: Install the HTML guides.
Add a "FileInstall.cmake" module that installs files and directories.
Use it to install the chunked HTML guides.
Install the guides into CMAKE_INSTALL_FULL_DOCDIR. By default this is
/usr/local/share/doc/Wireshark. Define DOC_DIR to match.
Add explicit file and directory permissions to the default install
targets.
Remove the PDF install target.
Bug: 14258
Change-Id: I4712a4047a54627b7520b5bf5f191e0761d19606
Reviewed-on: https://code.wireshark.org/review/25737
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'docbook')
-rw-r--r-- | docbook/CMakeLists.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/docbook/CMakeLists.txt b/docbook/CMakeLists.txt index 56d0fa0268..cfdeb25a2c 100644 --- a/docbook/CMakeLists.txt +++ b/docbook/CMakeLists.txt @@ -78,6 +78,7 @@ set(WSUG_TOOLS_HELP_COMMANDS # being able to build our documentation. set(WSUG_TOOLS_HELP_FILES) set(WSUG_TOOLS_PHONY_DEPS) +set(GUIDE_INSTALL_DIRS) # General help output foreach(th_command ${WSUG_TOOLS_HELP_COMMANDS}) @@ -424,6 +425,7 @@ if(ASCIIDOCTOR_EXECUTABLE AND XSLTPROC_EXECUTABLE) ) set_docbook_target_properties(user_guide_html) add_dependencies(user_guides user_guide_html) + list(APPEND GUIDE_INSTALL_DIRS ${CMAKE_CURRENT_BINARY_DIR}/wsug_html_chunked) endif() if(ASCIIDOCTOR_EXECUTABLE) @@ -475,6 +477,7 @@ if(ASCIIDOCTOR_EXECUTABLE AND XSLTPROC_EXECUTABLE) ) set_docbook_target_properties(developer_guide_html) add_dependencies(developer_guides developer_guide_html) + list(APPEND GUIDE_INSTALL_DIRS ${CMAKE_CURRENT_BINARY_DIR}/wsdg_html_chunked) endif() if(ASCIIDOCTOR_EXECUTABLE) @@ -501,6 +504,20 @@ if(WIN32 AND ASCIIDOCTOR_EXECUTABLE) add_dependencies(developer_guides developer_guide_chm) endif() +if (GUIDE_INSTALL_DIRS) + # The installation location and DOC_DIR in ui/help_url.c must + # match. + add_custom_target(install_guides + COMMAND ${CMAKE_COMMAND} -P + ${CMAKE_SOURCE_DIR}/cmake/modules/FileInstall.cmake + ${GUIDE_INSTALL_DIRS} + ${CMAKE_INSTALL_FULL_DOCDIR} + DEPENDS + user_guide_html developer_guide_html + ) + set_docbook_target_properties(install_guides) +endif() + # release_notes: release-notes.html release-notes.txt add_custom_target( release_notes_html DEPENDS release-notes.html ) |