summaryrefslogtreecommitdiff
path: root/ui.h
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2016-06-05 18:11:26 -0400
committerPietro Gagliardi <[email protected]>2016-06-05 18:11:26 -0400
commitbcef74047371ffe8721060ef19933a0aaa238fb0 (patch)
tree30c561e0f0098980064b61991e79fc7b19500691 /ui.h
parent80e7d83b77785aacc671f2327ccf135b6bcb0f09 (diff)
Updated everything to alpha3.1.
Diffstat (limited to 'ui.h')
-rw-r--r--ui.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/ui.h b/ui.h
index 3452791..c7a8858 100644
--- a/ui.h
+++ b/ui.h
@@ -12,8 +12,15 @@
extern "C" {
#endif
-// TODO add __declspec(dllimport) on windows
-#ifndef _UI_EXTERN
+// this macro is generated by cmake
+#ifdef libui_EXPORTS
+#ifdef _WIN32
+#define _UI_EXTERN __declspec(dllexport) extern
+#else
+#define _UI_EXTERN __attribute__((visibility("default"))) extern
+#endif
+#else
+// TODO add __declspec(dllimport) on windows, but only if not static
#define _UI_EXTERN extern
#endif