30 lines
772 B
C
30 lines
772 B
C
#pragma once
|
||
|
||
/// 命名空间宏
|
||
#define VULKANBASE_NAMESPACE_BEGIN namespace VulkanBase {
|
||
#define VULKANBASE_NAMESPACE_END }
|
||
|
||
/// windows 导入导出宏,GLTFLOADER_EXPORTS将在cmake中定义
|
||
/// unix-like 下提供符号可见性控制
|
||
#ifdef VULKANBASE_STATIC_BUILD
|
||
#define VULKANBASE_API
|
||
#define VULKANBASE_LOCAL
|
||
#else
|
||
#ifdef _WIN32
|
||
#ifdef VULKANBASE_EXPORTS
|
||
#define VULKANBASE_API __declspec(dllexport)
|
||
#define VULKANBASE_LOCAL
|
||
#else
|
||
#define VULKANBASE_API __declspec(dllimport)
|
||
#define VULKANBASE_LOCAL
|
||
#endif
|
||
#else
|
||
#if __GNUC__ >= 4 || defined(__clang__)
|
||
#define VULKANBASE_API __attribute__ ((visibility ("default")))
|
||
#define VULKANBASE_LOCAL __attribute__ ((visibility ("hidden")))
|
||
#else
|
||
#define VULKANBASE_API
|
||
#define VULKANBASE_LOCAL
|
||
#endif
|
||
#endif
|
||
#endif |