bgfx.lua 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. --
  2. -- Copyright 2010-2014 Branimir Karadzic. All rights reserved.
  3. -- License: http://www.opensource.org/licenses/BSD-2-Clause
  4. --
  5. function bgfxProject(_name, _kind, _defines)
  6. project ("bgfx" .. _name)
  7. uuid (os.uuid("bgfx" .. _name))
  8. kind (_kind)
  9. if _kind == "SharedLib" then
  10. defines {
  11. "BGFX_SHARED_LIB_BUILD=1",
  12. }
  13. end
  14. includedirs {
  15. BGFX_DIR .. "../bx/include",
  16. }
  17. defines {
  18. _defines,
  19. }
  20. configuration { "Debug" }
  21. defines {
  22. "BGFX_CONFIG_DEBUG=1",
  23. }
  24. configuration { "android*" }
  25. links {
  26. "EGL",
  27. "GLESv2",
  28. }
  29. configuration { "windows", "not vs201*" }
  30. includedirs {
  31. "$(DXSDK_DIR)/include",
  32. }
  33. configuration { "windows" }
  34. links {
  35. "gdi32",
  36. }
  37. configuration { "xcode4 or osx or ios*" }
  38. files {
  39. BGFX_DIR .. "src/**.mm",
  40. }
  41. configuration { "osx" }
  42. links {
  43. "Cocoa.framework",
  44. }
  45. configuration { "vs* or linux or mingw or xcode4 or osx or ios* or rpi" }
  46. includedirs {
  47. --nacl has GLES2 headers modified...
  48. BGFX_DIR .. "3rdparty/khronos",
  49. }
  50. configuration {}
  51. includedirs {
  52. BGFX_DIR .. "include",
  53. }
  54. files {
  55. BGFX_DIR .. "include/**.h",
  56. BGFX_DIR .. "src/**.cpp",
  57. BGFX_DIR .. "src/**.h",
  58. }
  59. excludes {
  60. BGFX_DIR .. "src/**.bin.h",
  61. }
  62. configuration {}
  63. copyLib()
  64. end