Commit e148010e authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Added mechanism to bring in xmls from optional modules.

Added a mchanism to bring in xmls from optional modules. In module.cmake files,
modules can set global properties named ${vtk-module}_SERVERMANAGER_XMLS and
${vtk-module}_PARAVIEW_GUI_XMLS to servermanager and gui xmls respectively.
SMApplication and Applications/ParaView both look at these properties for all
enabled modules to see if any modules provide xmls and then bring those in.

VisItBridge has been updated to use this mechanism. This fixes the issue with
VisItBridge xmls always being included even with VisItBridge was not enabled
causing dashboard issues.
parent 81cf6195
......@@ -36,6 +36,21 @@ if (PARAVIEW_ENABLE_PYTHON)
python_dependencies)
endif()
#------------------------------------------------------------------------------
# ParaView applications provides a mechanism to add gui xmls from modules.
# This is done by defining variables named ${vtk-module}_PARAVIEW_GUI_XMLS in
# the module.cmake file for the modules pointing to the paths for the
# GUI-xmls. We process those here.
set (module_gui_xmls)
foreach (module IN LISTS VTK_MODULES_ENABLED)
get_property(gui_xml GLOBAL PROPERTY ${module}_PARAVIEW_GUI_XMLS)
if (gui_xml)
foreach(xml IN LISTS gui_xml)
list(APPEND module_gui_xmls ${xml})
endforeach()
endif()
endforeach()
#------------------------------------------------------------------------------
# Build the client
build_paraview_client(paraview
......@@ -55,7 +70,7 @@ build_paraview_client(paraview
${CMAKE_CURRENT_SOURCE_DIR}/ParaViewFilters.xml
${CMAKE_CURRENT_SOURCE_DIR}/ParaViewReaders.xml
${CMAKE_CURRENT_SOURCE_DIR}/ParaViewWriters.xml
${PARAVIEW_EXTRA_GUI_RESOURCES} # Add any compiled in GUI configuration xmls
${module_gui_xmls} # Add any compiled in GUI configuration xmls
COMPRESSED_HELP_FILE "${ParaView_BINARY_DIR}/Documentation/paraview.qch"
SOURCES ${ParaView_SOURCE_FILES}
INSTALL_BIN_DIR "${VTK_INSTALL_RUNTIME_DIR}"
......
......@@ -363,6 +363,8 @@ else()
Utilities/ProcessXML
ThirdParty/protobuf
ThirdParty/QtTesting
Utilities/VisItBridge/Library
Utilities/VisItBridge/databases
ParaViewCore/ClientServerStream
ParaViewCore/PythonSupport
......
......@@ -45,6 +45,8 @@ vtk_module_library(vtkPVServerManagerApplication ${Module_SRCS})
set(vtk-module-init-functions)
set(vtk-module-init-calls)
set(_dependencies)
set(module_sm_xmls)
foreach (_module ${VTK_MODULES_ENABLED})
if (NOT ${_module}_EXCLUDE_FROM_WRAPPING AND
NOT ${_module}_IS_TEST AND
......@@ -58,6 +60,14 @@ foreach (_module ${VTK_MODULES_ENABLED})
list(APPEND _dependencies ${_module}CS)
endif()
# if module provides server manager xmls, process them.
get_property(module_xmls GLOBAL PROPERTY ${_module}_SERVERMANAGER_XMLS)
if (module_xmls)
foreach(xml_path IN LISTS module_xmls)
list(APPEND module_sm_xmls ${xml_path})
endforeach()
endif()
endforeach()
# Add link-dependencies on all wrapping classes.
......@@ -78,6 +88,7 @@ SET(resourceFiles
${CMAKE_CURRENT_SOURCE_DIR}/Resources/3d_widgets.xml
${CMAKE_CURRENT_SOURCE_DIR}/Resources/internal_writers.xml
${CMAKE_CURRENT_SOURCE_DIR}/Resources/writers.xml
${module_sm_xmls}
)
if (PARAVIEW_ENABLE_PYTHON)
......
VisItBridge @ 7d2f5988
Subproject commit dcc564da018288eb03041f312805bf28d96b3751
Subproject commit 7d2f59888dbd8b09c48e8d0e3226a94ae75f9b32
Markdown is supported
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