2
0

bgfx.lua 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. }
  38. configuration { "xcode4 or osx or ios*" }
  39. files {
  40. BGFX_DIR .. "src/**.mm",
  41. }
  42. configuration { "osx" }
  43. links {
  44. "Cocoa.framework",
  45. }
  46. configuration { "vs* or linux or mingw or xcode4 or osx or ios* or rpi" }
  47. includedirs {
  48. --nacl has GLES2 headers modified...
  49. BGFX_DIR .. "3rdparty/khronos",
  50. }
  51. configuration { "x64", "vs* or mingw" }
  52. defines {
  53. "_WIN32_WINNT=0x601",
  54. }
  55. configuration {}
  56. includedirs {
  57. BGFX_DIR .. "include",
  58. }
  59. files {
  60. BGFX_DIR .. "include/**.h",
  61. BGFX_DIR .. "src/**.cpp",
  62. BGFX_DIR .. "src/**.h",
  63. }
  64. excludes {
  65. BGFX_DIR .. "src/**.bin.h",
  66. }
  67. configuration {}
  68. copyLib()
  69. end