Commit 49bb24bb authored by Ben Boeckel's avatar Ben Boeckel
Browse files

ParaViewClient: support an argument for the generated qch path

parent 1a85aa30
......@@ -27,6 +27,7 @@ set(paraview_documentation_qrc
"${CMAKE_CURRENT_BINARY_DIR}/paraview_documentation.qrc")
paraview_client_generate_help(
NAME paraview
OUTPUT_PATH paraview_qch
TARGET paraview_qhp
OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}"
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
......@@ -56,6 +57,6 @@ target_link_libraries(vtkParaViewDocumentation
Qt5::Core)
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/paraview.qch"
FILES "${paraview_qch}"
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
COMPONENT doc)
......@@ -669,6 +669,8 @@ paraview_client_generate_help(
NAME <name>
[TARGET <target>]
OUTPUT_PATH <var>
[OUTPUT_DIR <directory>]
[SOURCE_DIR <directory>]
[PATTERNS <pattern>...]
......@@ -686,6 +688,8 @@ paraview_client_generate_help(
* `NAME`: (Required) The basename of the generated `.qch` file.
* `TARGET`: (Defaults to `<NAME>`) The name of the generated target.
* `OUTPUT_PATH`: (Required) This variable is set to the output path of the
generated `.qch` file.
* `OUTPUT_DIR`: (Defaults to `${CMAKE_CURRENT_BINARY_DIR}`) Where to place
generated files.
* `SOURCE_DIR`: Where to copy input files from.
......@@ -709,7 +713,7 @@ paraview_client_generate_help(
function (paraview_client_generate_help)
cmake_parse_arguments(_paraview_client_help
""
"NAME;TARGET;OUTPUT_DIR;SOURCE_DIR;NAMESPACE;FOLDER;TABLE_OF_CONTENTS;TABLE_OF_CONTENTS_FILE;RESOURCE_FILE;RESOURCE_PREFIX"
"NAME;TARGET;OUTPUT_DIR;SOURCE_DIR;NAMESPACE;FOLDER;TABLE_OF_CONTENTS;TABLE_OF_CONTENTS_FILE;RESOURCE_FILE;RESOURCE_PREFIX;OUTPUT_PATH"
"PATTERNS;DEPENDS"
${ARGN})
......@@ -724,6 +728,11 @@ function (paraview_client_generate_help)
"The `NAME` argument is required.")
endif ()
if (NOT DEFINED _paraview_client_help_OUTPUT_PATH)
message(FATAL_ERROR
"The `OUTPUT_PATH` argument is required.")
endif ()
if (NOT DEFINED _paraview_client_help_TARGET)
set(_paraview_client_help_TARGET
"${_paraview_client_help_NAME}")
......@@ -822,6 +831,10 @@ function (paraview_client_generate_help)
PROPERTY
OBJECT_DEPENDS "${_paraview_client_help_output}")
endif ()
set("${_paraview_client_help_OUTPUT_PATH}"
"${_paraview_client_help_output}"
PARENT_SCOPE)
endfunction ()
# Handle the generation of the help file.
......
......@@ -649,6 +649,7 @@ function (paraview_add_plugin name)
paraview_client_generate_help(
NAME "${_paraview_build_plugin}"
OUTPUT_PATH _paraview_build_plugin_qch_path
TARGET "${_paraview_build_plugin}_qch"
${_paraview_build_plugin_doc_source_args}
DEPENDS "${_paraview_build_plugin}_doc"
......@@ -668,8 +669,8 @@ function (paraview_add_plugin name)
\"\"
"_qch"
"_qch"
"${CMAKE_CURRENT_BINARY_DIR}/${_paraview_build_plugin}.qch"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${_paraview_build_plugin}.qch"
"${_paraview_build_plugin_qch_path}"
DEPENDS "${_paraview_build_plugin_qch_path}"
"${_paraview_build_plugin}_qch"
ParaView::ProcessXML
COMMENT "Generating header for ${_paraview_build_plugin} documentation")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment