1 ////////////////////////////////////////////////////////////
\r
3 // Pluma - Plug-in Management Framework
\r
4 // Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com)
\r
6 // This software is provided 'as-is', without any express or implied warranty.
\r
7 // In no event will the authors be held liable for any damages arising from the use of this software.
\r
9 // Permission is granted to anyone to use this software for any purpose,
\r
10 // including commercial applications, and to alter it and redistribute it freely,
\r
11 // subject to the following restrictions:
\r
13 // 1. The origin of this software must not be misrepresented;
\r
14 // you must not claim that you wrote the original software.
\r
15 // If you use this software in a product, an acknowledgment
\r
16 // in the product documentation would be appreciated but is not required.
\r
18 // 2. Altered source versions must be plainly marked as such,
\r
19 // and must not be misrepresented as being the original software.
\r
21 // 3. This notice may not be removed or altered from any source distribution.
\r
23 ////////////////////////////////////////////////////////////
\r
26 ////////////////////////////////////////////////////////////
\r
28 // Based on SFML configuration header
\r
30 // http://www.sfml-dev.org/documentation/2.0/Config_8hpp-source.htm
\r
32 // Acknowledgements to Simple and Fast Multimedia Library
\r
33 // http://www.sfml-dev.org/
\r
35 ////////////////////////////////////////////////////////////
\r
38 #ifndef PLUMA_CONFIG_HPP
\r
39 #define PLUMA_CONFIG_HPP
\r
42 ////////////////////////////////////////////////////////////
\r
43 // Identify the operating system
\r
44 ////////////////////////////////////////////////////////////
\r
45 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
\r
48 #define PLUMA_SYS_WINDOWS
\r
49 #ifndef WIN32_LEAN_AND_MEAN
\r
50 #define WIN32_LEAN_AND_MEAN
\r
56 #elif defined(linux) || defined(__linux)
\r
59 #define PLUMA_SYS_LINUX
\r
61 #elif defined(__APPLE__) || defined(MACOSX) || defined(macintosh) || defined(Macintosh)
\r
64 #define PLUMA_SYS_MACOS
\r
66 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
\r
69 #define PLUMA_SYS_FREEBSD
\r
73 // Unsupported system
\r
74 #error This operating system is not supported by this library
\r
80 ////////////////////////////////////////////////////////////
\r
81 // Define library file extension based on OS
\r
82 ////////////////////////////////////////////////////////////
\r
83 #ifdef PLUMA_SYS_WINDOWS
\r
84 #define PLUMA_LIB_EXTENSION "dll"
\r
85 #elif defined(PLUMA_SYS_MACOS)
\r
86 #define PLUMA_LIB_EXTENSION "dylib"
\r
87 #elif defined(PLUMA_SYS_LINUX) || defined(PLUMA_SYS_FREEBSD)
\r
88 #define PLUMA_LIB_EXTENSION "so"
\r
90 // unknown library file type
\r
91 #error Unknown library file extension for this operating system
\r
95 ////////////////////////////////////////////////////////////
\r
96 // Define portable import / export macros
\r
97 ////////////////////////////////////////////////////////////
\r
99 #include <Pluma/cpPlugins_Pluma_Export.h>
\r
100 #define PLUMA_API cpPlugins_Pluma_EXPORT
\r
102 /* ===================================================================
\r
103 * florez-l@javeriana.edu.co: use dll macro defined from cmake instead
\r
104 * ===================================================================
\r
105 #if defined(PLUMA_SYS_WINDOWS)
\r
107 #ifndef PLUMA_STATIC
\r
109 // Windows platforms
\r
110 #ifdef PLUMA_EXPORTS
\r
112 // From DLL side, we must export
\r
113 #define PLUMA_API __declspec(dllexport)
\r
117 // From client application side, we must import
\r
118 #define PLUMA_API __declspec(dllimport)
\r
122 // For Visual C++ compilers, we also need to turn off this annoying C4251 warning.
\r
123 // You can read lots ot different things about it, but the point is the code will
\r
124 // just work fine, and so the simplest way to get rid of this warning is to disable it
\r
127 #pragma warning(disable : 4251)
\r
133 // No specific directive needed for static build
\r
140 // Other platforms don't need to define anything
\r
146 #endif // PLUMA_CONFIG_HPP
\r