summaryrefslogtreecommitdiffstats
path: root/tools/platform/platform-api.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-04-16 10:34:26 -0700
committerGitHub <noreply@github.com>2021-04-16 10:34:26 -0700
commit79e92395f8ce3d92c446e3bb3250d19ce33decd5 (patch)
tree2ac277fa299200da72cf03a2b5b96338f66aee5d /tools/platform/platform-api.h
parentbad484d838590d0a2aaf1b5b8ac820634af2decb (diff)
Update `model-viewer` example and fixing compiler bugs. (#1795)
Diffstat (limited to 'tools/platform/platform-api.h')
-rw-r--r--tools/platform/platform-api.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/platform/platform-api.h b/tools/platform/platform-api.h
new file mode 100644
index 000000000..b04e5ffce
--- /dev/null
+++ b/tools/platform/platform-api.h
@@ -0,0 +1,23 @@
+#ifndef SLANG_PLATFORM_API_H
+#define SLANG_PLATFORM_API_H
+
+#if defined(SLANG_PLATFORM_DYNAMIC)
+# if defined(_MSC_VER)
+# ifdef SLANG_PLATFORM_DYNAMIC_EXPORT
+# define SLANG_PLATFORM_API SLANG_DLL_EXPORT
+# else
+# define SLANG_PLATFORM_API __declspec(dllimport)
+# endif
+# else
+// TODO: need to consider compiler capabilities
+//# ifdef SLANG_DYNAMIC_EXPORT
+# define SLANG_PLATFORM_API SLANG_DLL_EXPORT
+//# endif
+# endif
+#endif
+
+#ifndef SLANG_PLATFORM_API
+# define SLANG_PLATFORM_API
+#endif
+
+#endif