Commit 809ca595 authored by Ben Boeckel's avatar Ben Boeckel Committed by Kitware Robot
Browse files

Merge topic 'plugin-location-properties-backports' into release

efa7a41f paraview-config: don't unset helper variables
510818dc ParaViewClient, ParaViewClient: fix helper inclusion
6bb68865 GenericIOReader: export the LANL_GenericIO target
0700f3cf ParaViewClient: support parallel-installable Qt install trees
91dbd1d3 pvNVIDIAIndeX: only include IndeX usage requirements for the build
51dce8f8 ExplicitStructuredGrid: use plugin API for building modules
b771c88b BatchAxesGrid: don't write the screenshot outside the tempdir
8b9d29c0

 ParaViewPlugin: remove extra indentation
...
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit's avatarUtkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !3504
parents ea1efecc efa7a41f
......@@ -70,7 +70,7 @@ smtesting.ProcessCommandLineArguments()
RenderAllViews()
# alternatively, if you want to write images, you can use SaveScreenshot(...).
imageFile = os.path.splitext(os.path.basename(smtesting.StateXMLFileName))[0]
SaveScreenshot('%s/../../%s.png' % (smtesting.TempDir, imageFile))
SaveScreenshot('%s/%s.png' % (smtesting.TempDir, imageFile))
if not smtesting.DoRegressionTesting(renderView1.SMProxy):
raise smtesting.TestError('Test failed')
......@@ -262,7 +262,7 @@ IDI_ICON1 ICON \"${_paraview_client_APPLICATION_ICON}\"\n")
set(CMAKE_AUTORCC 1)
endif ()
include("${CMAKE_CURRENT_LIST_DIR}/paraview-find-package-helpers.cmake" OPTIONAL)
include("${_ParaViewClient_cmake_dir}/paraview-find-package-helpers.cmake" OPTIONAL)
find_package(Qt5 REQUIRED QUIET COMPONENTS Core Widgets)
# CMake 3.13 started using Qt5's version variables to detect what version
......@@ -455,9 +455,11 @@ function (paraview_client_documentation)
"The `XMLS` argument is required.")
endif ()
include("${_ParaViewClient_cmake_dir}/paraview-find-package-helpers.cmake" OPTIONAL)
find_program(qt_xmlpatterns_executable
NAMES xmlpatterns-qt5 xmlpatterns
HINTS "${Qt5_DIR}/../../../bin"
"${Qt5_DIR}/../../../libexec/qt5/bin"
DOC "Path to xmlpatterns")
mark_as_advanced(qt_xmlpatterns_executable)
......@@ -733,6 +735,7 @@ function (paraview_client_generate_help)
"*.*")
endif ()
include("${_ParaViewClient_cmake_dir}/paraview-find-package-helpers.cmake" OPTIONAL)
find_package(Qt5 QUIET REQUIRED COMPONENTS Help)
set(_paraview_client_help_copy_sources)
......
......@@ -8,7 +8,6 @@ function (_paraview_package_append_variables)
string(APPEND _paraview_package_variables
"if (NOT DEFINED \"${var}\")
set(\"${var}\" \"${${var}}\")
list(APPEND _paraview_find_package_variables \"${var}\")
elseif (NOT ${var})
set(\"${var}\" \"${${var}}\")
endif ()
......
......@@ -253,11 +253,11 @@ paraview_plugin_build(
```
* `PLUGINS`: (Required) The list of plugins to build. May be empty.
* `AUTOLOAD`: A list of plugins to mark for autoloading.
* `TARGET`: (Recommended) The name of an interface target to generate. This
provides. an initialization function `<TARGET>_initialize` which
initializes static plugins. The function is provided, but is a no-op for
shared plugin builds.
* `AUTOLOAD`: A list of plugins to mark for autoloading.
* `RUNTIME_DESTINATION`: (Defaults to `${CMAKE_INSTALL_BINDIR}`) Where to
install runtime files.
* `LIBRARY_DESTINATION`: (Defaults to `${CMAKE_INSTALL_LIBDIR}`) Where to
......@@ -399,7 +399,7 @@ bool ${_paraview_build_TARGET}_static_plugins_func(const char* name, bool load)
{
std::string sname = name;
${_paraview_build_calls}
${_paraview_build_calls}
return false;
}
......@@ -805,7 +805,7 @@ function (paraview_add_plugin name)
endif ()
if (_paraview_add_plugin_with_ui OR _paraview_add_plugin_with_resources)
include("${CMAKE_CURRENT_LIST_DIR}/paraview-find-package-helpers.cmake" OPTIONAL)
include("${_ParaViewPlugin_cmake_dir}/paraview-find-package-helpers.cmake" OPTIONAL)
find_package(Qt5 QUIET REQUIRED COMPONENTS Core ${_paraview_add_plugin_qt_extra_components})
list(APPEND _paraview_add_plugin_required_libraries
Qt5::Core)
......
......@@ -49,17 +49,9 @@ unset(_paraview_use_external_vtk)
include("${CMAKE_CURRENT_LIST_DIR}/${CMAKE_FIND_PACKAGE_NAME}-targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/${CMAKE_FIND_PACKAGE_NAME}-vtk-module-properties.cmake")
set(_paraview_find_package_variables)
include("${CMAKE_CURRENT_LIST_DIR}/paraview-find-package-helpers.cmake" OPTIONAL)
include("${CMAKE_CURRENT_LIST_DIR}/${CMAKE_FIND_PACKAGE_NAME}-vtk-module-find-packages.cmake")
foreach (_paraview_find_package_variable IN LISTS _paraview_find_package_variables)
unset("${_paraview_find_package_variable}")
endforeach ()
unset(_paraview_find_package_variable)
unset(_paraview_find_package_variables)
include("${CMAKE_CURRENT_LIST_DIR}/ParaViewClient.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/ParaViewPlugin.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/ParaViewServerManager.cmake")
......
......@@ -374,8 +374,7 @@ void vtkPVPluginTracker::LoadPluginConfigurationXML(vtkPVXMLElement* root, bool
if (required)
{
vtkErrorMacro("Failed to locate required plugin: "
<< name.c_str() << "\n"
"Application may not work exactly as expected.");
<< name << "\nApplication may not work exactly as expected.");
}
vtkVLogF(
PARAVIEW_LOG_PLUGIN_VERBOSITY(), "Failed to locate file plugin `%s`", name.c_str());
......
......@@ -74,14 +74,14 @@ public:
* form:
* @code
* <Plugins>
* <Plugin name="[plugin name]" filename="[optional file name] auto_load="[bool]" />
* <Plugin name="[plugin name]" filename="[optional file name]" auto_load="[bool]" />
* ...
* </Plugins>
* @endcode
* This method will process the XML, locate the plugin shared library and
* either load the plugin or call RegisterAvailablePlugin based on the status
* of the auto_load flag. auto_load flag is optional and is 0 by default.
* filaname is also optional, if not provided this method will look in
* filename is also optional, if not provided this method will look in
* different place to find the plugin, eg. paraview lib dir. It will NOT look
* in PV_PLUGIN_PATH.
*/
......
vtk_module_scan(
MODULE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/Filter/vtk.module"
REQUEST_MODULES ExplicitStructuredGrid::vtkExplicitStructuredGrid
PROVIDES_MODULES explicitstructuredgrid_modules
REQUIRES_MODULES required_modules
HIDE_MODULES_FROM_CACHE ON
)
if(required_modules)
foreach(module IN LISTS required_modules)
if(NOT TARGET "${module}")
message(FATAL_ERROR
"Failed to find the required module ${module}."
)
endif()
endforeach()
endif()
vtk_module_build(
MODULES ${explicitstructuredgrid_modules}
PACKAGE ExplicitStructuredGrid
INSTALL_HEADERS OFF
LIBRARY_NAME_SUFFIX "pv${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR}"
VERSION "${PARAVIEW_VERSION}"
SOVERSION "1"
)
set(SM_XML_FILES ExplicitStructuredGrid.xml)
if(PARAVIEW_ENABLE_PYTHON)
list(APPEND SM_XML_FILES ExplicitStructuredGridPythonExtractor.xml)
endif()
paraview_add_plugin(ExplicitStructuredGrid
REQUIRED_ON_SERVER
VERSION "1.0"
SERVER_MANAGER_XML ${SM_XML_FILES}
MODULES ExplicitStructuredGrid::vtkExplicitStructuredGrid
MODULE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/Filter/vtk.module"
)
if(BUILD_TESTING)
if (BUILD_TESTING)
add_subdirectory(Testing)
endif()
endif ()
set(classes
vtkExplicitStructuredGridGeneratorSource
)
vtkExplicitStructuredGridGeneratorSource)
set(server_manager_files
ExplicitStructuredGrid.xml)
if(PARAVIEW_ENABLE_PYTHON)
list(APPEND classes vtkExplicitStructuredGridPythonExtractor)
endif()
if (PARAVIEW_ENABLE_PYTHON)
list(APPEND classes
vtkExplicitStructuredGridPythonExtractor)
list(APPEND server_manager_files
ExplicitStructuredGridPythonExtractor.xml)
endif ()
vtk_module_add_module(ExplicitStructuredGrid::vtkExplicitStructuredGrid
CLASSES ${classes}
)
CLASSES ${classes})
paraview_add_server_manager_xmls(
XMLS ${server_manager_files})
......@@ -23,3 +23,6 @@ target_compile_definitions(LANL_GenericIO
set_property(TARGET LANL_GenericIO
PROPERTY
POSITION_INDEPENDENT_CODE ON)
_vtk_module_apply_properties(LANL_GenericIO)
_vtk_module_install(LANL_GenericIO)
......@@ -71,7 +71,7 @@ vtk_module_add_module(pvNVIDIAIndeX::IndeXRepresentations
PRIVATE_HEADERS ${private_headers})
vtk_module_include(pvNVIDIAIndeX::IndeXRepresentations
PUBLIC
${NVINDEX_INCLUDE_DIRS})
$<BUILD_INTERFACE:${NVINDEX_INCLUDE_DIRS}>)
if (NVINDEX_SKIP_BUILD_RPATH)
vtk_module_set_properties(pvNVIDIAIndeX::IndeXRepresentations
......
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