summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-01-03 16:35:10 +0100
committerSlávek Banko <slavek.banko@axis.cz>2020-01-09 16:49:49 +0100
commit1685c8ef3db92abf0ae94d8116dc9fac25145e39 (patch)
tree4ba7728473a242800ec4a24992257d80886068f8
parent9b7f2320aa1fa65983e8a1d921273413e76d51fd (diff)
downloadtqca-1685c8ef3db92abf0ae94d8116dc9fac25145e39.tar.gz
tqca-1685c8ef3db92abf0ae94d8116dc9fac25145e39.zip
Fix support for GCC hidden visibility.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 402204029ea9cf32d4c473a92eb8fd40f079268c)
-rw-r--r--src/tqca.cpp4
-rw-r--r--src/tqca.h18
2 files changed, 12 insertions, 10 deletions
diff --git a/src/tqca.cpp b/src/tqca.cpp
index bfbd78c..a6dfd40 100644
--- a/src/tqca.cpp
+++ b/src/tqca.cpp
@@ -19,6 +19,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "tqca.h"
#include "tqcaprovider.h"
diff --git a/src/tqca.h b/src/tqca.h
index b5591f8..851ecf1 100644
--- a/src/tqca.h
+++ b/src/tqca.h
@@ -29,16 +29,14 @@
#include <tqptrlist.h>
#include <tqobject.h>
-#ifdef Q_OS_WIN32
-# ifndef TQCA_STATIC
-# ifdef TQCA_MAKEDLL
-# define TQCA_EXPORT __declspec(dllexport)
-# else
-# define TQCA_EXPORT __declspec(dllimport)
-# endif
-# endif
-#endif
-#ifndef TQCA_EXPORT
+#if defined(__KDE_HAVE_GCC_VISIBILITY) || defined(G_HAVE_GCC_VISIBILITY)
+#define TQCA_NO_EXPORT __attribute__ ((visibility("hidden")))
+#define TQCA_EXPORT __attribute__ ((visibility("default")))
+#elif defined(_WIN32)
+#define TQCA_NO_EXPORT
+#define TQCA_EXPORT __declspec(dllexport)
+#else
+#define TQCA_NO_EXPORT
#define TQCA_EXPORT
#endif