LuaIncludes.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. #ifdef __APPLE__
  20. // Something in the Apple headers seems to #define nil as __NULL
  21. // this then causes a build error in luabind:
  22. // luabind/nil.hpp:36:40: error: expected unqualified-id
  23. // extern LUABIND_API detail::nil_type nil;
  24. #undef nil
  25. // Causes a build error, usually an ICE on g++
  26. #undef check
  27. #endif
  28. #include <luabind/luabind.hpp>
  29. #include <luabind/yield_policy.hpp>
  30. extern "C"{
  31. #include "lua.h"
  32. #include <lualib.h>
  33. #include <lauxlib.h>
  34. }