Commit 9bfa29d8 authored by Ben Boeckel's avatar Ben Boeckel

ParaViewPlugin: pass shared build information per client

Instead of asking whether ParaView itself was built shared or static,
use the status of the plugin's build directly.
parent a95c0338
......@@ -907,6 +907,13 @@ function (paraview_add_plugin name)
get_property(_paraview_add_plugin_description GLOBAL
PROPERTY "_paraview_plugin_${_paraview_build_plugin}_description")
set(_paraview_build_plugin_type MODULE)
set(_paraview_add_plugin_built_shared 1)
if (NOT BUILD_SHARED_LIBS OR _paraview_add_plugin_FORCE_STATIC)
set(_paraview_build_plugin_type STATIC)
set(_paraview_add_plugin_built_shared 0)
endif ()
configure_file(
"${_paraview_plugin_source_dir}/paraview_plugin.h.in"
"${_paraview_add_plugin_header}")
......@@ -924,11 +931,6 @@ function (paraview_add_plugin name)
endif ()
string(APPEND CMAKE_LIBRARY_OUTPUT_DIRECTORY "/${_paraview_build_plugin}")
set(_paraview_build_plugin_type MODULE)
if (NOT BUILD_SHARED_LIBS OR _paraview_add_plugin_FORCE_STATIC)
set(_paraview_build_plugin_type STATIC)
endif ()
add_library("${_paraview_build_plugin}" "${_paraview_build_plugin_type}"
${_paraview_add_plugin_header}
${_paraview_add_plugin_source}
......
......@@ -3,7 +3,6 @@
#include "vtkObjectFactory.h"
#include "vtkPVPluginLoader.h"
#cmakedefine BUILD_SHARED_LIBS
#cmakedefine01 _paraview_add_plugin_EULA
#cmakedefine01 _paraview_add_plugin_SERVER_MANAGER_XML
#cmakedefine01 _paraview_add_plugin_MODULES
......@@ -131,11 +130,11 @@ void @_paraview_build_plugin@Plugin::GetPythonSourceList(std::vector<std::string
//-----------------------------------------------------------------------------
@_paraview_build_plugin@Plugin::@_paraview_build_plugin@Plugin()
{
#if !defined(BUILD_SHARED_LIBS) && _paraview_add_plugin_with_resources
#if !_paraview_add_plugin_built_shared && _paraview_add_plugin_with_resources
// For static builds, initialize the Qt resources.
@_paraview_add_plugin_resources_init@
#endif
#if !defined(BUILD_SHARED_LIBS) && _paraview_add_plugin_with_ui
#if !_paraview_add_plugin_built_shared && _paraview_add_plugin_with_ui
// For static builds, initialize the Qt plugin.
Q_IMPORT_PLUGIN(@_paraview_build_plugin@Plugin)
#endif
......
#cmakedefine01 _paraview_add_plugin_built_shared
#cmakedefine01 _paraview_add_plugin_with_python
#cmakedefine01 _paraview_add_plugin_with_ui
#cmakedefine01 _paraview_add_plugin_with_xml
......
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