Commit 0cc81917 authored by Ben Boeckel's avatar Ben Boeckel

plugins: use per-source build type information

parent d16b28b9
......@@ -79,6 +79,17 @@ set(classes
vtkSessionIterator
vtkTCPNetworkAccessManager)
set(built_shared 0)
if (BUILD_SHARED_LIBS)
set(built_shared 1)
endif ()
set_property(SOURCE
vtkPVPluginLoader.cxx
vtkPVPluginTracker.cxx
APPEND
PROPERTY
COMPILE_DEFINITIONS "BUILD_SHARED_LIBS=${built_shared}")
if (TARGET VTK::PythonInterpreter)
# TODO: Split these into a separate module so that there isn't a public
# optional dependency.
......
......@@ -291,7 +291,7 @@ vtkPVPluginLoader::~vtkPVPluginLoader()
//-----------------------------------------------------------------------------
void vtkPVPluginLoader::LoadPluginsFromPluginSearchPath()
{
#ifdef BUILD_SHARED_LIBS
#if BUILD_SHARED_LIBS
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(), "Loading Plugins from standard PLUGIN_PATHS\n%s",
(this->SearchPaths ? this->SearchPaths : "(nullptr)"));
......@@ -314,7 +314,7 @@ void vtkPVPluginLoader::LoadPluginsFromPluginSearchPath()
//-----------------------------------------------------------------------------
void vtkPVPluginLoader::LoadPluginsFromPluginConfigFile()
{
#ifdef BUILD_SHARED_LIBS
#if BUILD_SHARED_LIBS
const char* configFiles = vtksys::SystemTools::GetEnv("PV_PLUGIN_CONFIG_FILE");
if (configFiles != NULL)
{
......@@ -399,7 +399,7 @@ bool vtkPVPluginLoader::LoadPluginInternal(const char* file, bool no_errors)
return false;
}
#ifndef BUILD_SHARED_LIBS
#if !BUILD_SHARED_LIBS
vtkPVPluginLoaderErrorMacro("Could not find the plugin statically linked in, and "
"cannot load dynamic plugins in static builds.");
return false;
......
......@@ -98,7 +98,7 @@ std::string vtkLocatePluginOrConfigFile(
return std::string();
}
#ifndef BUILD_SHARED_LIBS
#if !BUILD_SHARED_LIBS
bool debug_plugin = vtksys::SystemTools::GetEnv("PV_PLUGIN_DEBUG") != NULL;
if (isPlugin)
{
......@@ -121,7 +121,7 @@ std::string vtkLocatePluginOrConfigFile(
vtkVLogF(PARAVIEW_LOG_PLUGIN_VERBOSITY(), "VTK libraries location is '%s'", vtklib.c_str());
std::vector<std::string> prefixes = {
#if defined(BUILD_SHARED_LIBS)
#if BUILD_SHARED_LIBS
std::string("paraview-" PARAVIEW_VERSION "/plugins/") + plugin,
std::string("paraview-" PARAVIEW_VERSION "/plugins/"),
#else
......
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