bgfx.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. if _OPTIONS["with-ovr"] then
  22. defines {
  23. "BGFX_CONFIG_USE_OVR=1",
  24. }
  25. includedirs {
  26. "$(OVR_DIR)/LibOVR/Include",
  27. }
  28. end
  29. configuration { "Debug" }
  30. defines {
  31. "BGFX_CONFIG_DEBUG=1",
  32. }
  33. configuration { "android*" }
  34. links {
  35. "EGL",
  36. "GLESv2",
  37. }
  38. configuration { "mingw* or vs2008" }
  39. includedirs {
  40. "$(DXSDK_DIR)/include",
  41. }
  42. configuration { "xcode4 or osx or ios*" }
  43. files {
  44. BGFX_DIR .. "src/**.mm",
  45. }
  46. configuration { "osx" }
  47. links {
  48. "Cocoa.framework",
  49. }
  50. configuration { "not nacl" }
  51. includedirs {
  52. --nacl has GLES2 headers modified...
  53. BGFX_DIR .. "3rdparty/khronos",
  54. }
  55. configuration { "x64", "vs* or mingw*" }
  56. defines {
  57. "_WIN32_WINNT=0x601",
  58. }
  59. configuration {}
  60. includedirs {
  61. BGFX_DIR .. "include",
  62. }
  63. files {
  64. BGFX_DIR .. "include/**.h",
  65. BGFX_DIR .. "src/**.cpp",
  66. BGFX_DIR .. "src/**.h",
  67. }
  68. excludes {
  69. BGFX_DIR .. "src/**.bin.h",
  70. }
  71. configuration {}
  72. copyLib()
  73. end