fixup IKA_API os detection
Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
parent
f7b911bef5
commit
124b739bde
1 changed files with 19 additions and 14 deletions
|
|
@ -1,23 +1,28 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define IKA_API
|
#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(__unix__)
|
#if defined(linux)
|
||||||
#define IKA_OS_FAMILY_UNIX
|
#define IKA_OS_LINUX
|
||||||
#define IKA_API __attribute__((visibility("default")))
|
#elif defined(__APPLE__)
|
||||||
|
#define IKA_OS_MAC
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(linux)
|
#ifndef IKA_API
|
||||||
#define IKA_OS_LINUX
|
#define IKA_API
|
||||||
#endif
|
|
||||||
#elif defined(_WIN32)
|
|
||||||
#define IKA_OS_WIN
|
|
||||||
#define IKA_API __declspec(dllexport)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#define IKARUS_BEGIN_HEADER extern "C" {
|
#define IKARUS_BEGIN_HEADER extern "C" {
|
||||||
#define IKARUS_END_HEADER }
|
#define IKARUS_END_HEADER }
|
||||||
#else
|
#else
|
||||||
#define IKARUS_BEGIN_HEADER
|
#define IKARUS_BEGIN_HEADER
|
||||||
#define IKARUS_END_HEADER
|
#define IKARUS_END_HEADER
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue