mirror of https://github.com/mosra/magnum.git
Browse Source
Reusing macros MAGNUM_EXPORT and friends already used for Windows builds. For exported classes added MAGNUM_LOCAL to private members which are not referenced from any inline function. Added explicit MAGNUM_EXPORT to private members which are referenced. CMake provides its own macro <target>_EXPORTS, using that instead of set_target_properties().pull/279/head
19 changed files with 130 additions and 75 deletions
@ -0,0 +1,28 @@ |
|||||||
|
#ifndef Magnum_MeshTools_MeshToolsVisibility_h |
||||||
|
#define Magnum_MeshTools_MeshToolsVisibility_h |
||||||
|
/*
|
||||||
|
Copyright © 2010, 2011, 2012 Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Magnum is free software: you can redistribute it and/or modify |
||||||
|
it under the terms of the GNU Lesser General Public License version 3 |
||||||
|
only, as published by the Free Software Foundation. |
||||||
|
|
||||||
|
Magnum 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 Lesser General Public License version 3 for more details. |
||||||
|
*/ |
||||||
|
|
||||||
|
#ifdef _WIN32 |
||||||
|
#ifdef MagnumMeshTools_EXPORTS |
||||||
|
#define MESHTOOLS_EXPORT __declspec(dllexport) |
||||||
|
#else |
||||||
|
#define MESHTOOLS_EXPORT __declspec(dllimport) |
||||||
|
#endif |
||||||
|
#else |
||||||
|
#define MESHTOOLS_EXPORT __attribute__ ((visibility ("default"))) |
||||||
|
#endif |
||||||
|
|
||||||
|
#endif |
||||||
@ -0,0 +1,28 @@ |
|||||||
|
#ifndef Magnum_Physics_PhysicsVisibility_h |
||||||
|
#define Magnum_Physics_PhysicsVisibility_h |
||||||
|
/*
|
||||||
|
Copyright © 2010, 2011, 2012 Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Magnum is free software: you can redistribute it and/or modify |
||||||
|
it under the terms of the GNU Lesser General Public License version 3 |
||||||
|
only, as published by the Free Software Foundation. |
||||||
|
|
||||||
|
Magnum 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 Lesser General Public License version 3 for more details. |
||||||
|
*/ |
||||||
|
|
||||||
|
#ifdef _WIN32 |
||||||
|
#ifdef MagnumPhysics_EXPORTS |
||||||
|
#define PHYSICS_EXPORT __declspec(dllexport) |
||||||
|
#else |
||||||
|
#define PHYSICS_EXPORT __declspec(dllimport) |
||||||
|
#endif |
||||||
|
#else |
||||||
|
#define PHYSICS_EXPORT __attribute__ ((visibility ("default"))) |
||||||
|
#endif |
||||||
|
|
||||||
|
#endif |
||||||
@ -0,0 +1,28 @@ |
|||||||
|
#ifndef Magnum_Shaders_ShadersVisibility_h |
||||||
|
#define Magnum_Shaders_ShadersVisibility_h |
||||||
|
/*
|
||||||
|
Copyright © 2010, 2011, 2012 Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Magnum is free software: you can redistribute it and/or modify |
||||||
|
it under the terms of the GNU Lesser General Public License version 3 |
||||||
|
only, as published by the Free Software Foundation. |
||||||
|
|
||||||
|
Magnum 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 Lesser General Public License version 3 for more details. |
||||||
|
*/ |
||||||
|
|
||||||
|
#ifdef _WIN32 |
||||||
|
#ifdef MagnumShaders_EXPORTS |
||||||
|
#define SHADERS_EXPORT __declspec(dllexport) |
||||||
|
#else |
||||||
|
#define SHADERS_EXPORT __declspec(dllimport) |
||||||
|
#endif |
||||||
|
#else |
||||||
|
#define SHADERS_EXPORT __attribute__ ((visibility ("default"))) |
||||||
|
#endif |
||||||
|
|
||||||
|
#endif |
||||||
@ -0,0 +1,30 @@ |
|||||||
|
#ifndef Magnum_Visibility_h |
||||||
|
#define Magnum_Visibility_h |
||||||
|
/*
|
||||||
|
Copyright © 2010, 2011, 2012 Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Magnum is free software: you can redistribute it and/or modify |
||||||
|
it under the terms of the GNU Lesser General Public License version 3 |
||||||
|
only, as published by the Free Software Foundation. |
||||||
|
|
||||||
|
Magnum 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 Lesser General Public License version 3 for more details. |
||||||
|
*/ |
||||||
|
|
||||||
|
#ifdef _WIN32 |
||||||
|
#ifdef Magnum_EXPORTS |
||||||
|
#define MAGNUM_EXPORT __declspec(dllexport) |
||||||
|
#else |
||||||
|
#define MAGNUM_EXPORT __declspec(dllimport) |
||||||
|
#endif |
||||||
|
#define MAGNUM_LOCAL |
||||||
|
#else |
||||||
|
#define MAGNUM_EXPORT __attribute__ ((visibility ("default"))) |
||||||
|
#define MAGNUM_LOCAL __attribute__ ((visibility ("hidden"))) |
||||||
|
#endif |
||||||
|
|
||||||
|
#endif |
||||||
@ -1,48 +0,0 @@ |
|||||||
#ifndef Magnum_utilities_h |
|
||||||
#define Magnum_utilities_h |
|
||||||
/*
|
|
||||||
Copyright © 2010, 2011, 2012 Vladimír Vondruš <mosra@centrum.cz> |
|
||||||
|
|
||||||
This file is part of Magnum. |
|
||||||
|
|
||||||
Magnum is free software: you can redistribute it and/or modify |
|
||||||
it under the terms of the GNU Lesser General Public License version 3 |
|
||||||
only, as published by the Free Software Foundation. |
|
||||||
|
|
||||||
Magnum 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 Lesser General Public License version 3 for more details. |
|
||||||
*/ |
|
||||||
|
|
||||||
/** @file
|
|
||||||
* @brief Various utilities and macros |
|
||||||
*/ |
|
||||||
|
|
||||||
namespace Magnum { |
|
||||||
|
|
||||||
#ifdef _WIN32 |
|
||||||
#ifdef MAGNUM_EXPORTING |
|
||||||
#define MAGNUM_EXPORT __declspec(dllexport) |
|
||||||
#else |
|
||||||
#define MAGNUM_EXPORT __declspec(dllimport) |
|
||||||
#endif |
|
||||||
#ifdef MESHTOOLS_EXPORTING |
|
||||||
#define MESHTOOLS_EXPORT __declspec(dllexport) |
|
||||||
#else |
|
||||||
#define MESHTOOLS_EXPORT __declspec(dllimport) |
|
||||||
#endif |
|
||||||
#ifdef PHYSICS_EXPORTING |
|
||||||
#define PHYSICS_EXPORT __declspec(dllexport) |
|
||||||
#else |
|
||||||
#define PHYSICS_EXPORT __declspec(dllimport) |
|
||||||
#endif |
|
||||||
#else |
|
||||||
#define MAGNUM_EXPORT |
|
||||||
#define MESHTOOLS_EXPORT |
|
||||||
#define PHYSICS_EXPORT |
|
||||||
#endif |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
#endif |
|
||||||
Loading…
Reference in new issue