SDL_build_config_private.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /**************************************************************************/
  2. /* SDL_build_config_private.h */
  3. /**************************************************************************/
  4. /* This file is part of: */
  5. /* GODOT ENGINE */
  6. /* https://godotengine.org */
  7. /**************************************************************************/
  8. /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
  9. /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
  10. /* */
  11. /* Permission is hereby granted, free of charge, to any person obtaining */
  12. /* a copy of this software and associated documentation files (the */
  13. /* "Software"), to deal in the Software without restriction, including */
  14. /* without limitation the rights to use, copy, modify, merge, publish, */
  15. /* distribute, sublicense, and/or sell copies of the Software, and to */
  16. /* permit persons to whom the Software is furnished to do so, subject to */
  17. /* the following conditions: */
  18. /* */
  19. /* The above copyright notice and this permission notice shall be */
  20. /* included in all copies or substantial portions of the Software. */
  21. /* */
  22. /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
  23. /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
  24. /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
  25. /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
  26. /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
  27. /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
  28. /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
  29. /**************************************************************************/
  30. #pragma once
  31. #define SDL_build_config_h_
  32. #include <SDL3/SDL_platform_defines.h>
  33. #define HAVE_STDARG_H 1
  34. #define HAVE_STDDEF_H 1
  35. // Here we disable SDL subsystems that are not going to be used
  36. #define SDL_CPUINFO_DISABLED 1
  37. #define SDL_AUDIO_DISABLED 1
  38. #define SDL_PROCESS_DUMMY 1
  39. #define SDL_LOADSO_DUMMY 1
  40. #define SDL_VIDEO_DISABLED 1
  41. #define SDL_CAMERA_DISABLED 1
  42. #define SDL_DIALOG_DISABLED 1
  43. #define SDL_FILESYSTEM_DUMMY 1
  44. #define SDL_FSOPS_DUMMY 1
  45. #define SDL_SENSOR_DISABLED 1
  46. #define SDL_GPU_DISABLED 1
  47. #define SDL_RENDER_DISABLED 1
  48. #define SDL_POWER_DISABLED 1
  49. #define SDL_LEAN_AND_MEAN 1
  50. // Windows defines
  51. #if defined(SDL_PLATFORM_WINDOWS)
  52. #define SDL_PLATFORM_PRIVATE_NAME "Windows"
  53. #define HAVE_LIBC 1
  54. #define HAVE_DINPUT_H 1
  55. #define HAVE_XINPUT_H 1
  56. #if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0A00 /* Windows 10 SDK */
  57. #define HAVE_WINDOWS_GAMING_INPUT_H 1
  58. #define SDL_JOYSTICK_WGI 1
  59. #endif
  60. #define SDL_JOYSTICK_DINPUT 1
  61. #define SDL_JOYSTICK_HIDAPI 1
  62. #define SDL_JOYSTICK_RAWINPUT 1
  63. #define SDL_JOYSTICK_XINPUT 1
  64. #define SDL_HAPTIC_DINPUT 1
  65. #define SDL_THREAD_GENERIC_COND_SUFFIX 1
  66. #define SDL_THREAD_GENERIC_RWLOCK_SUFFIX 1
  67. #define SDL_THREAD_WINDOWS 1
  68. #define SDL_TIMER_WINDOWS 1
  69. // Linux defines
  70. #elif defined(SDL_PLATFORM_LINUX)
  71. #define SDL_PLATFORM_PRIVATE_NAME "Linux"
  72. #define SDL_PLATFORM_UNIX 1
  73. #define HAVE_STDIO_H 1
  74. #define HAVE_LINUX_INPUT_H 1
  75. #define HAVE_POLL 1
  76. // TODO: handle dynamic loading with SOWRAP_ENABLED
  77. // (even though DBus can also be loaded with SOWRAP_ENABLED, we load it
  78. // statically regardless of SOWRAP_ENABLED, because otherwise SDL won't compile)
  79. #ifdef DBUS_ENABLED
  80. #define HAVE_DBUS_DBUS_H 1
  81. #endif
  82. #if defined(UDEV_ENABLED) && !defined(SOWRAP_ENABLED)
  83. #define HAVE_LIBUDEV_H 1
  84. #endif
  85. #define SDL_LOADSO_DLOPEN 1
  86. #define SDL_HAPTIC_LINUX 1
  87. #define SDL_TIMER_UNIX 1
  88. #define SDL_JOYSTICK_LINUX 1
  89. #define SDL_INPUT_LINUXEV 1
  90. #define SDL_THREAD_PTHREAD 1
  91. // MacOS defines
  92. #elif defined(SDL_PLATFORM_MACOS)
  93. #define SDL_PLATFORM_PRIVATE_NAME "macOS"
  94. #define SDL_PLATFORM_UNIX 1
  95. #define HAVE_STDIO_H 1
  96. #define HAVE_LIBC 1
  97. #define SDL_HAPTIC_IOKIT 1
  98. #define SDL_JOYSTICK_IOKIT 1
  99. #define SDL_JOYSTICK_MFI 1
  100. #define SDL_TIMER_UNIX 1
  101. #define SDL_THREAD_PTHREAD 1
  102. // Other platforms are not supported (for now)
  103. #else
  104. #error "No SDL build config was found for this platform. Setup one before compiling the engine."
  105. #endif
  106. #if !defined(HAVE_STDINT_H) && !defined(_STDINT_H_)
  107. #define HAVE_STDINT_H 1
  108. #endif /* !_STDINT_H_ && !HAVE_STDINT_H */
  109. #ifdef __GNUC__
  110. #define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1
  111. #endif