summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/msvc_libardour.h
diff options
context:
space:
mode:
authorJohn Emmas <johne53@tiscali.co.uk>2013-10-15 17:32:57 +0100
committerJohn Emmas <johne53@tiscali.co.uk>2013-10-15 17:32:57 +0100
commit8ea695c00ab0bdbc6fbb29b33fac6e3dbfcbe9f1 (patch)
treee80d20d07d0369b2d7b45014edad70cc12914a8a /libs/ardour/ardour/msvc_libardour.h
parent69a8fc43e2552d9d3c72f9117131ca6b9392093b (diff)
'libs/ardour' - Add 'LIBARDOUR_API' (initial testing). Ensures that libardour classes can get exported and imported from a Windows DLL.
Diffstat (limited to 'libs/ardour/ardour/msvc_libardour.h')
-rw-r--r--libs/ardour/ardour/msvc_libardour.h30
1 files changed, 1 insertions, 29 deletions
diff --git a/libs/ardour/ardour/msvc_libardour.h b/libs/ardour/ardour/msvc_libardour.h
index 75c932905e..52aa65d95c 100644
--- a/libs/ardour/ardour/msvc_libardour.h
+++ b/libs/ardour/ardour/msvc_libardour.h
@@ -19,37 +19,9 @@
#ifndef __msvc_libardour_h__
#define __msvc_libardour_h__
+#include "ardour/visibility.h"
#include <limits.h>
-#ifdef LIBARDOUR_IS_IN_WIN_STATIC_LIB // #define if your project uses libardour (under Windows) as a static library
-#define LIBARDOUR_IS_IN_WINDLL 0
-#endif
-
-#if !defined(LIBARDOUR_IS_IN_WINDLL)
- #if defined(COMPILER_MSVC) || defined(COMPILER_MINGW)
- // If you need '__declspec' compatibility, add extra compilers to the above as necessary
- #define LIBARDOUR_IS_IN_WINDLL 1
- #else
- #define LIBARDOUR_IS_IN_WINDLL 0
- #endif
-#endif
-
-#if LIBARDOUR_IS_IN_WINDLL && !defined(LIBARDOUR_API)
- #if defined(BUILDING_LIBARDOUR)
- #define LIBARDOUR_API __declspec(dllexport)
- #define LIBARDOUR_APICALLTYPE __stdcall
- #elif defined(COMPILER_MSVC) || defined(COMPILER_MINGW) // Probably needs Cygwin too, at some point
- #define LIBARDOUR_API __declspec(dllimport)
- #define LIBARDOUR_APICALLTYPE __stdcall
- #else
- #error "Attempting to define __declspec with an incompatible compiler !"
- #endif
-#elif !defined(LIBARDOUR_API)
- // Other compilers / platforms could be accommodated here
- #define LIBARDOUR_API
- #define LIBARDOUR_APICALLTYPE
-#endif
-
#ifndef _MAX_PATH
#define _MAX_PATH 260
#endif