bgfx.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 .. "3rdparty",
  16. BGFX_DIR .. "../bx/include",
  17. }
  18. defines {
  19. _defines,
  20. }
  21. configuration { "Debug" }
  22. defines {
  23. "BGFX_CONFIG_DEBUG=1",
  24. }
  25. configuration { "android*" }
  26. links {
  27. "EGL",
  28. "GLESv2",
  29. }
  30. configuration { "windows", "not vs201*" }
  31. includedirs {
  32. "$(DXSDK_DIR)/include",
  33. }
  34. configuration { "windows" }
  35. links {
  36. "gdi32",
  37. "psapi",
  38. }
  39. configuration { "xcode4 or osx or ios*" }
  40. files {
  41. BGFX_DIR .. "src/**.mm",
  42. }
  43. configuration { "osx" }
  44. links {
  45. "Cocoa.framework",
  46. }
  47. configuration { "vs* or linux or mingw or xcode4 or osx or ios* or rpi" }
  48. includedirs {
  49. --nacl has GLES2 headers modified...
  50. BGFX_DIR .. "3rdparty/khronos",
  51. }
  52. configuration { "x64", "vs* or mingw" }
  53. defines {
  54. "_WIN32_WINNT=0x601",
  55. }
  56. configuration {}
  57. includedirs {
  58. BGFX_DIR .. "include",
  59. }
  60. files {
  61. BGFX_DIR .. "include/**.h",
  62. BGFX_DIR .. "src/**.cpp",
  63. BGFX_DIR .. "src/**.h",
  64. }
  65. excludes {
  66. BGFX_DIR .. "src/**.bin.h",
  67. }
  68. configuration {}
  69. copyLib()
  70. end