Commit d16b28b9 authored by Ben Boeckel's avatar Ben Boeckel

Qt/initializers: pass shared build information to sources directly

parent 7f123f0b
......@@ -196,6 +196,14 @@ set(classes
pqWelcomeDialog
pqYoungsMaterialPropertyWidget)
set(built_shared 0)
if (BUILD_SHARED_LIBS)
set(built_shared 1)
endif ()
set_property(SOURCE pqApplicationComponentsInit.cxx APPEND
PROPERTY
COMPILE_DEFINITIONS "BUILD_SHARED_LIBS=${built_shared}")
set(headers
pqCatalystContinueReaction.h)
......
......@@ -32,18 +32,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "pqApplicationComponentsInit.h"
#include "pqComponentsInit.h"
#include "vtkPVConfig.h"
#include <QObject> // for Q_INIT_RESOURCE
#include <QtPlugin>
void pqApplicationComponentsInit()
{
#ifndef PARAVIEW_BUILD_SHARED_LIBS
#if !BUILD_SHARED_LIBS
// init dependents
pqComponentsInit();
// init resources
Q_INIT_RESOURCE(pqApplicationComponents);
#endif
}
......@@ -176,6 +176,14 @@ set(classes
pqViewManager
pqWidgetRangeDomain)
set(built_shared 0)
if (BUILD_SHARED_LIBS)
set(built_shared 1)
endif ()
set_property(SOURCE pqComponentsInit.cxx APPEND
PROPERTY
COMPILE_DEFINITIONS "BUILD_SHARED_LIBS=${built_shared}")
set(headers
pqPluginTreeWidget.h)
......
......@@ -32,17 +32,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "pqComponentsInit.h"
#include "pqCoreInit.h"
#include "vtkPVConfig.h"
#include <QObject> // for Q_INIT_RESOURCE
void pqComponentsInit()
{
#ifndef PARAVIEW_BUILD_SHARED_LIBS
#if !BUILD_SHARED_LIBS
// init dependents
pqCoreInit();
// init resources
Q_INIT_RESOURCE(pqComponents);
#endif
}
......@@ -125,6 +125,14 @@ if (NOT VTK_LEGACY_REMOVE)
pqDebug)
endif()
set(built_shared 0)
if (BUILD_SHARED_LIBS)
set(built_shared 1)
endif ()
set_property(SOURCE pqCoreInit.cxx APPEND
PROPERTY
COMPILE_DEFINITIONS "BUILD_SHARED_LIBS=${built_shared}")
set(ui_files
Resources/UI/pqFileDialog.ui
Resources/UI/pqOutputWidget.ui
......
......@@ -31,13 +31,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
========================================================================*/
#include "pqCoreInit.h"
#include "vtkPVConfig.h"
#include <QObject>
#include <QtPlugin>
void pqCoreInit()
{
#ifndef BUILD_SHARED_LIBS
#if !BUILD_SHARED_LIBS
Q_INIT_RESOURCE(pqCore);
Q_INIT_RESOURCE(QtWidgets);
#endif
......
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