summaryrefslogtreecommitdiff
path: root/libs/surfaces/control_protocol/control_protocol
diff options
context:
space:
mode:
authorJohn Emmas <johne53@tiscali.co.uk>2013-10-18 10:03:22 +0100
committerJohn Emmas <johne53@tiscali.co.uk>2013-10-18 10:03:22 +0100
commitb855e5f3220027502a3c88f189d511fe2a5a3c2b (patch)
treeb106fabe68c471cb95688e151e8466dac3e0ea4c /libs/surfaces/control_protocol/control_protocol
parent75b933eadbe8f90a73a29bb207ff26eebcd4121a (diff)
parent5ba369918b07a4c0859f0e94537da7b5a11bb49f (diff)
Merge remote-tracking branch 'remotes/origin/exportvis' into windows+cc
Conflicts (hopefully resolved): gtk2_ardour/wscript libs/ardour/ardour/audioregion.h libs/ardour/ardour/debug.h libs/ardour/ardour/directory_names.h libs/ardour/ardour/filesystem_paths.h libs/ardour/ardour/session_event.h libs/gtkmm2ext/gtkmm2ext/utils.h libs/panners/1in2out/wscript libs/panners/2in2out/wscript libs/panners/vbap/wscript libs/pbd/pbd/debug.h libs/pbd/pbd/file_utils.h libs/pbd/pbd/pathexpand.h libs/pbd/pbd/ringbuffer.h libs/pbd/pbd/ringbufferNPT.h libs/pbd/pbd/search_path.h libs/pbd/pbd/stacktrace.h libs/pbd/pbd/uuid.h libs/pbd/pbd/uuid_boost.h libs/surfaces/control_protocol/control_protocol/basic_ui.h libs/surfaces/control_protocol/control_protocol/control_protocol.h
Diffstat (limited to 'libs/surfaces/control_protocol/control_protocol')
-rw-r--r--libs/surfaces/control_protocol/control_protocol/basic_ui.h11
-rw-r--r--libs/surfaces/control_protocol/control_protocol/control_protocol.h3
-rw-r--r--libs/surfaces/control_protocol/control_protocol/visibility.h56
3 files changed, 60 insertions, 10 deletions
diff --git a/libs/surfaces/control_protocol/control_protocol/basic_ui.h b/libs/surfaces/control_protocol/control_protocol/basic_ui.h
index 9bbfe65979..180688e616 100644
--- a/libs/surfaces/control_protocol/control_protocol/basic_ui.h
+++ b/libs/surfaces/control_protocol/control_protocol/basic_ui.h
@@ -32,21 +32,14 @@
#include "timecode/time.h"
-#include "ardour/visibility.h"
+#include "control_protocol/visibility.h"
namespace ARDOUR {
class Session;
class SessionEvent;
}
-#ifdef ARDOURCP_DLL_EXPORTS // defined if we are building the ARDOUR Control Protocol DLL (instead of using it)
- #define ARDOURCP_API LIBARDOUR_HELPER_DLL_EXPORT
-#else
- #define ARDOURCP_API LIBARDOUR_HELPER_DLL_IMPORT
-#endif
-#define ARDOURCP_LOCAL LIBARDOUR_HELPER_DLL_LOCAL
-
-class ARDOURCP_API BasicUI {
+class LIBCONTROLCP_API BasicUI {
public:
BasicUI (ARDOUR::Session&);
virtual ~BasicUI ();
diff --git a/libs/surfaces/control_protocol/control_protocol/control_protocol.h b/libs/surfaces/control_protocol/control_protocol/control_protocol.h
index 37322530e4..05315fc40a 100644
--- a/libs/surfaces/control_protocol/control_protocol/control_protocol.h
+++ b/libs/surfaces/control_protocol/control_protocol/control_protocol.h
@@ -30,6 +30,7 @@
#include "pbd/stateful.h"
#include "pbd/signals.h"
+#include "control_protocol/visibility.h"
#include "control_protocol/basic_ui.h"
#include "control_protocol/types.h"
@@ -46,7 +47,7 @@ class Route;
class Session;
class Bundle;
-class ARDOURCP_API ControlProtocol : public PBD::Stateful, public PBD::ScopedConnectionList, public BasicUI
+class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::ScopedConnectionList, public BasicUI
{
public:
ControlProtocol (Session&, std::string name);
diff --git a/libs/surfaces/control_protocol/control_protocol/visibility.h b/libs/surfaces/control_protocol/control_protocol/visibility.h
new file mode 100644
index 0000000000..40c83b8580
--- /dev/null
+++ b/libs/surfaces/control_protocol/control_protocol/visibility.h
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2013 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __libcontrolcp_visibility_h__
+#define __libcontrolcp_visibility_h__
+
+/* _WIN32 is defined by most compilers targetting Windows, but within the
+ * controlcp source tree, we also define COMPILER_MSVC or COMPILER_MINGW depending
+ * on how a Windows build is built.
+ */
+
+#if defined _WIN32 || defined __CYGWIN__ || defined(COMPILER_MSVC) || defined(COMPILER_MINGW)
+ #define LIBCONTROLCP_DLL_IMPORT __declspec(dllimport)
+ #define LIBCONTROLCP_DLL_EXPORT __declspec(dllexport)
+ #define LIBCONTROLCP_DLL_LOCAL
+#else
+ #if __GNUC__ >= 4
+ #define LIBCONTROLCP_DLL_IMPORT __attribute__ ((visibility ("default")))
+ #define LIBCONTROLCP_DLL_EXPORT __attribute__ ((visibility ("default")))
+ #define LIBCONTROLCP_DLL_LOCAL __attribute__ ((visibility ("hidden")))
+ #else
+ #define LIBCONTROLCP_DLL_IMPORT
+ #define LIBCONTROLCP_DLL_EXPORT
+ #define LIBCONTROLCP_DLL_LOCAL
+ #endif
+#endif
+
+#ifdef LIBCONTROLCP_DLL // libcontrolcp is a DLL
+#ifdef LIBCONTROLCP_DLL_EXPORTS // defined if we are building the libcontrolcp DLL (instead of using it)
+ #define LIBCONTROLCP_API LIBCONTROLCP_DLL_EXPORT
+#else
+ #define LIBCONTROLCP_API LIBCONTROLCP_DLL_IMPORT
+#endif
+#define LIBCONTROLCP_LOCAL LIBCONTROLCP_DLL_LOCAL
+#else /* static lib, not DLL */
+#define LIBCONTROLCP_API
+#define LIBCONTROLCP_LOCAL
+#endif
+
+#endif /* __libcontrolcp_visibility_h__ */