libikarus/include/ikarus/macros.h
Folling 1990c950d9
fixup IKA_API os detection
Signed-off-by: Folling <mail@folling.io>
2025-04-15 12:08:11 +02:00

28 lines
521 B
C

#pragma once
#if defined(_WIN32)
#define IKA_OS_FAMILY_WINDOWS
#define IKA_OS_WIN
#define IKA_API __declspec(dllexport)
#else
#define IKA_OS_FAMILY_UNIX
#define IKA_API __attribute__((visibility("default")))
#if defined(linux)
#define IKA_OS_LINUX
#elif defined(__APPLE__)
#define IKA_OS_MAC
#endif
#endif
#ifndef IKA_API
#define IKA_API
#endif
#ifdef __cplusplus
#define IKARUS_BEGIN_HEADER extern "C" {
#define IKARUS_END_HEADER }
#else
#define IKARUS_BEGIN_HEADER
#define IKARUS_END_HEADER
#endif