summaryrefslogtreecommitdiff
path: root/ui.h
diff options
context:
space:
mode:
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