LuaIncludes.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (C) 2022 The V-Gears Team
  3. *
  4. * This file is part of V-Gears
  5. *
  6. * V-Gears is free software: you can redistribute it and/or modify it under
  7. * terms of the GNU General Public License as published by the Free Software
  8. * Foundation, version 3.0 (GPLv3) of the License.
  9. *
  10. * V-Gears is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. /**
  16. * This file wraps the LUA includes for platform specific build workarounds.
  17. */
  18. #pragma once
  19. #include <limits>
  20. #ifdef __APPLE__
  21. // Something in the Apple headers seems to #define nil as __NULL,
  22. // which breaks the sol2 binding headers.
  23. #undef nil
  24. // Causes a build error, usually an ICE on g++
  25. #undef check
  26. #endif
  27. // sol2 v2.20.6 single header. It includes <lua.hpp> itself, so the Lua
  28. // headers (lua.h, lualib.h, lauxlib.h) are always available after this.
  29. // Note: on LuaJIT, sol.hpp bundles a compat53 shim that exposes the 5.2-style
  30. // lua_resume(L, from, nargs) signature.
  31. #include <third_party/sol/sol.hpp>