Lugdunum  0.1.0
Config.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 // Info about Lugdunum
4 #define LUG_NAME "Lugdunum3D"
5 
6 #define LUG_VERSION_MAJOR 0
7 #define LUG_VERSION_MINOR 1
8 #define LUG_VERSION_PATCH 0
9 
10 // Detect the operating system
11 #if defined(_WIN32)
12  #define LUG_SYSTEM_WINDOWS
13 #elif defined(__unix__)
14  #if defined(__ANDROID__)
15  #define LUG_SYSTEM_ANDROID
16  #elif defined(__linux__)
17  #define LUG_SYSTEM_LINUX
18  #else
19  #error This UNIX operating system is not supported yet
20  #endif
21 #else
22  #error This operating system is not supported yet
23 #endif
24 
25 // Define a portable debug macro
26 #if !defined(NDEBUG)
27  #define LUG_DEBUG
28 #endif
29 
30 #if defined(__clang__)
31  #define LUG_COMPILER_CLANG
32 #elif defined(__GNUC__)
33  #define LUG_COMPILER_GCC
34 #elif defined(_MSC_VER)
35  #define LUG_COMPILER_MSVC
36 #endif
37 
38 
39 // Define macros for import / export
40 #if defined(LUG_SYSTEM_WINDOWS)
41  #define LUG_API_EXPORT __declspec(dllexport)
42  #define LUG_API_IMPORT __declspec(dllimport)
43 
44  // Disable C4201, C4251 and C4275 warnings for Visual C++ compilers
45  #if defined(LUG_COMPILER_MSVC)
46  #pragma warning(disable:4201) // Anonymous struct/union
47  #pragma warning(disable:4251)
48  #pragma warning(disable:4275)
49  #endif
50 #else
51  #define LUG_API_EXPORT __attribute__ ((__visibility__ ("default")))
52  #define LUG_API_IMPORT __attribute__ ((__visibility__ ("default")))
53 #endif
54