Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.7KB

  1. //
  2. // ██████ ██  ██  ██████  ██████
  3. // ██      ██  ██ ██    ██ ██       ** Classy Header-Only Classes **
  4. // ██  ███████ ██  ██ ██
  5. // ██  ██   ██ ██  ██ ██ https://github.com/Tracktion/choc
  6. //  ██████ ██  ██  ██████   ██████
  7. //
  8. // CHOC is (C)2022 Tracktion Corporation, and is offered under the terms of the ISC license:
  9. //
  10. // Permission to use, copy, modify, and/or distribute this software for any purpose with or
  11. // without fee is hereby granted, provided that the above copyright notice and this permission
  12. // notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  13. // WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  14. // AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
  15. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  16. // WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  17. // CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  18. #ifndef CHOC_PLATFORM_DETECT_HEADER_INCLUDED
  19. #define CHOC_PLATFORM_DETECT_HEADER_INCLUDED
  20. /*
  21. These conditionals declare the macros
  22. - CHOC_WINDOWS
  23. - CHOC_ANDROID
  24. - CHOC_LINUX
  25. - CHOC_OSX
  26. - CHOC_IOS
  27. ...based on the current operating system.
  28. It also declares a string literal macro CHOC_OPERATING_SYSTEM_NAME
  29. which can be used if you need a text description of the OS.
  30. */
  31. #if defined (_WIN32) || defined (_WIN64)
  32. #define CHOC_WINDOWS 1
  33. #define CHOC_OPERATING_SYSTEM_NAME "Windows"
  34. #elif __ANDROID__
  35. #define CHOC_ANDROID 1
  36. #define CHOC_OPERATING_SYSTEM_NAME "Android"
  37. #elif defined (LINUX) || defined (__linux__)
  38. #define CHOC_LINUX 1
  39. #define CHOC_OPERATING_SYSTEM_NAME "Linux"
  40. #elif __APPLE__
  41. #define CHOC_APPLE 1
  42. #include <TargetConditionals.h>
  43. #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
  44. #define CHOC_IOS 1
  45. #define CHOC_OPERATING_SYSTEM_NAME "iOS"
  46. #else
  47. #define CHOC_OSX 1
  48. #define CHOC_OPERATING_SYSTEM_NAME "OSX"
  49. #endif
  50. #elif defined (__FreeBSD__) || (__OpenBSD__)
  51. #define CHOC_BSD 1
  52. #define CHOC_OPERATING_SYSTEM_NAME "BSD"
  53. #elif defined (_POSIX_VERSION)
  54. #define CHOC_POSIX 1
  55. #define CHOC_OPERATING_SYSTEM_NAME "Posix"
  56. #elif defined (__EMSCRIPTEN__)
  57. #define CHOC_EMSCRIPTEN 1
  58. #define CHOC_OPERATING_SYSTEM_NAME "Emscripten"
  59. #else
  60. #error "Unknown platform!"
  61. #endif
  62. #endif // CHOC_PLATFORM_DETECT_HEADER_INCLUDED