From 8aaccbd84fdaa8fd07a54d9712c1f60746ccb514 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 24 Mar 2022 20:42:53 +0100 Subject: [PATCH] Drawing: include header with export macros --- src/Mod/Drawing/App/DrawingExport.h | 1 + src/Mod/Drawing/App/FeatureClip.h | 1 + src/Mod/Drawing/App/FeaturePage.h | 1 + src/Mod/Drawing/App/FeatureProjection.h | 1 + src/Mod/Drawing/App/FeatureView.h | 1 + src/Mod/Drawing/App/PageGroup.h | 1 + src/Mod/Drawing/App/PreCompiled.h | 13 ------- src/Mod/Drawing/App/ProjectionAlgos.h | 3 +- src/Mod/Drawing/DrawingGlobal.h | 47 +++++++++++++++++++++++++ src/Mod/Drawing/Gui/DrawingView.h | 1 + src/Mod/Drawing/Gui/PreCompiled.h | 18 ++-------- src/Mod/Drawing/Gui/Workbench.h | 2 +- 12 files changed, 59 insertions(+), 31 deletions(-) create mode 100644 src/Mod/Drawing/DrawingGlobal.h diff --git a/src/Mod/Drawing/App/DrawingExport.h b/src/Mod/Drawing/App/DrawingExport.h index e2e295159b..44d578ee5c 100644 --- a/src/Mod/Drawing/App/DrawingExport.h +++ b/src/Mod/Drawing/App/DrawingExport.h @@ -26,6 +26,7 @@ #include #include +#include class TopoDS_Shape; class BRepAdaptor_Curve; diff --git a/src/Mod/Drawing/App/FeatureClip.h b/src/Mod/Drawing/App/FeatureClip.h index b2840bc9dc..b19bb3e988 100644 --- a/src/Mod/Drawing/App/FeatureClip.h +++ b/src/Mod/Drawing/App/FeatureClip.h @@ -27,6 +27,7 @@ #include #include +#include namespace Drawing { diff --git a/src/Mod/Drawing/App/FeaturePage.h b/src/Mod/Drawing/App/FeaturePage.h index 1b8a687f20..a379d96052 100644 --- a/src/Mod/Drawing/App/FeaturePage.h +++ b/src/Mod/Drawing/App/FeaturePage.h @@ -28,6 +28,7 @@ #include #include #include +#include namespace Drawing diff --git a/src/Mod/Drawing/App/FeatureProjection.h b/src/Mod/Drawing/App/FeatureProjection.h index 0394a443cb..06cfb4586d 100644 --- a/src/Mod/Drawing/App/FeatureProjection.h +++ b/src/Mod/Drawing/App/FeatureProjection.h @@ -29,6 +29,7 @@ #include #include #include +#include namespace Drawing diff --git a/src/Mod/Drawing/App/FeatureView.h b/src/Mod/Drawing/App/FeatureView.h index a938bdb111..6a9ffb9bb7 100644 --- a/src/Mod/Drawing/App/FeatureView.h +++ b/src/Mod/Drawing/App/FeatureView.h @@ -31,6 +31,7 @@ #include #include #include +#include namespace Drawing diff --git a/src/Mod/Drawing/App/PageGroup.h b/src/Mod/Drawing/App/PageGroup.h index 527c23b145..4f8c23aac2 100644 --- a/src/Mod/Drawing/App/PageGroup.h +++ b/src/Mod/Drawing/App/PageGroup.h @@ -30,6 +30,7 @@ #include #include #include +#include namespace Drawing diff --git a/src/Mod/Drawing/App/PreCompiled.h b/src/Mod/Drawing/App/PreCompiled.h index a8bde9ce7c..18fba82600 100644 --- a/src/Mod/Drawing/App/PreCompiled.h +++ b/src/Mod/Drawing/App/PreCompiled.h @@ -26,19 +26,6 @@ #include -// Exporting of App classes -#ifdef FC_OS_WIN32 -# define DrawingExport __declspec(dllexport) -# define PartExport __declspec(dllimport) -# define MeshExport __declspec(dllimport) -# define SpreadsheetExport __declspec(dllimport) -#else // for Linux -# define DrawingExport -# define PartExport -# define MeshExport -# define SpreadsheetExport -#endif - #ifdef _PreComp_ // standard diff --git a/src/Mod/Drawing/App/ProjectionAlgos.h b/src/Mod/Drawing/App/ProjectionAlgos.h index 180dd23072..c6f4fd5e46 100644 --- a/src/Mod/Drawing/App/ProjectionAlgos.h +++ b/src/Mod/Drawing/App/ProjectionAlgos.h @@ -24,8 +24,9 @@ #ifndef _ProjectionAlgos_h_ #define _ProjectionAlgos_h_ -#include +#include #include +#include #include class BRepAdaptor_Curve; diff --git a/src/Mod/Drawing/DrawingGlobal.h b/src/Mod/Drawing/DrawingGlobal.h new file mode 100644 index 0000000000..a5bf77fc9e --- /dev/null +++ b/src/Mod/Drawing/DrawingGlobal.h @@ -0,0 +1,47 @@ +/*************************************************************************** + * Copyright (c) 2021 Werner Mayer * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + +#include + +#ifndef DRAWING_GLOBAL_H +#define DRAWING_GLOBAL_H + + +// Drawing +#ifndef DrawingExport +#ifdef Drawing_EXPORTS +# define DrawingExport FREECAD_DECL_EXPORT +#else +# define DrawingExport FREECAD_DECL_IMPORT +#endif +#endif + +// DrawingGui +#ifndef DrawingGuiExport +#ifdef DrawingGui_EXPORTS +# define DrawingGuiExport FREECAD_DECL_EXPORT +#else +# define DrawingGuiExport FREECAD_DECL_IMPORT +#endif +#endif + +#endif //DRAWING_GLOBAL_H diff --git a/src/Mod/Drawing/Gui/DrawingView.h b/src/Mod/Drawing/Gui/DrawingView.h index 94e4b3b1ad..1a37149025 100644 --- a/src/Mod/Drawing/Gui/DrawingView.h +++ b/src/Mod/Drawing/Gui/DrawingView.h @@ -25,6 +25,7 @@ #define DRAWINGGUI_DRAWINGVIEW_H #include +#include #include #include diff --git a/src/Mod/Drawing/Gui/PreCompiled.h b/src/Mod/Drawing/Gui/PreCompiled.h index fe847206b9..59ecb5ec55 100644 --- a/src/Mod/Drawing/Gui/PreCompiled.h +++ b/src/Mod/Drawing/Gui/PreCompiled.h @@ -26,26 +26,12 @@ #include -// Importing of App classes -#ifdef FC_OS_WIN32 -//# define DrawingAppExport __declspec(dllimport) -# define DrawingExport __declspec(dllimport) -# define PartExport __declspec(dllimport) -# define DrawingGuiExport __declspec(dllexport) -# define SpreadsheetExport __declspec(dllimport) -#else // for Linux -# define DrawingExport -# define PartExport -# define DrawingGuiExport -# define SpreadsheetExport -#endif - #ifdef _MSC_VER # pragma warning(disable : 4005) #endif #ifdef _PreComp_ - + // standard #include #include @@ -71,7 +57,7 @@ #ifndef __QtAll__ # include #endif - + #endif //_PreComp_ #endif // DRAWINGGUI_PRECOMPILED_H diff --git a/src/Mod/Drawing/Gui/Workbench.h b/src/Mod/Drawing/Gui/Workbench.h index a50ae8d487..d7a5e1d004 100644 --- a/src/Mod/Drawing/Gui/Workbench.h +++ b/src/Mod/Drawing/Gui/Workbench.h @@ -31,7 +31,7 @@ namespace DrawingGui { /** * @author Werner Mayer */ -class DrawingGuiExport Workbench : public Gui::StdWorkbench +class Workbench : public Gui::StdWorkbench { TYPESYSTEM_HEADER();