Commit abef9c74 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

plugins: make libraries as modules

CMake stops you from linking to a plugin. Static plugins are static
libraries and can still be linked to.
parent d3937414
...@@ -1085,15 +1085,15 @@ FUNCTION(ADD_PARAVIEW_PLUGIN NAME VERSION) ...@@ -1085,15 +1085,15 @@ FUNCTION(ADD_PARAVIEW_PLUGIN NAME VERSION)
IF (PARAVIEW_BUILD_SHARED_LIBS) IF (PARAVIEW_BUILD_SHARED_LIBS)
IF (PLUGIN_EXCLUDE_FROM_DEFAULT_TARGET) IF (PLUGIN_EXCLUDE_FROM_DEFAULT_TARGET)
ADD_LIBRARY(${NAME} SHARED EXCLUDE_FROM_ALL ${GUI_SRCS} ${SM_SRCS} ${ARG_SOURCES} ${plugin_sources}) ADD_LIBRARY(${NAME} MODULE EXCLUDE_FROM_ALL ${GUI_SRCS} ${SM_SRCS} ${ARG_SOURCES} ${plugin_sources})
ELSE () ELSE ()
ADD_LIBRARY(${NAME} SHARED ${GUI_SRCS} ${SM_SRCS} ${ARG_SOURCES} ${plugin_sources}) ADD_LIBRARY(${NAME} MODULE ${GUI_SRCS} ${SM_SRCS} ${ARG_SOURCES} ${plugin_sources})
ENDIF() ENDIF()
ELSE () ELSE ()
IF (PLUGIN_EXCLUDE_FROM_DEFAULT_TARGET) IF (PLUGIN_EXCLUDE_FROM_DEFAULT_TARGET)
ADD_LIBRARY(${NAME} EXCLUDE_FROM_ALL ${GUI_SRCS} ${SM_SRCS} ${ARG_SOURCES} ${plugin_sources}) ADD_LIBRARY(${NAME} STATIC EXCLUDE_FROM_ALL ${GUI_SRCS} ${SM_SRCS} ${ARG_SOURCES} ${plugin_sources})
ELSE() ELSE()
ADD_LIBRARY(${NAME} ${GUI_SRCS} ${SM_SRCS} ${ARG_SOURCES} ${plugin_sources}) ADD_LIBRARY(${NAME} STATIC ${GUI_SRCS} ${SM_SRCS} ${ARG_SOURCES} ${plugin_sources})
ENDIF() ENDIF()
# When building plugins for static builds, Qt requires this flag to be # When building plugins for static builds, Qt requires this flag to be
# defined. If not defined, when we link the executable against all the # defined. If not defined, when we link the executable against all the
...@@ -1359,4 +1359,4 @@ macro(pv_setup_module_environment _name) ...@@ -1359,4 +1359,4 @@ macro(pv_setup_module_environment _name)
# of the ParaView build, in that case pv-plugin is set when processing the # of the ParaView build, in that case pv-plugin is set when processing the
# plugin.cmake file, and hence this logic still works! # plugin.cmake file, and hence this logic still works!
set (pv-plugin "${_name}") set (pv-plugin "${_name}")
endmacro() endmacro()
\ No newline at end of file
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