example-common.lua 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. --
  2. -- Copyright 2010-2016 Branimir Karadzic. All rights reserved.
  3. -- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
  4. --
  5. project ("example-common")
  6. uuid ("21cc0e26-bf62-11e2-a01e-0291bd4c8125")
  7. kind "StaticLib"
  8. includedirs {
  9. path.join(BX_DIR, "include"),
  10. path.join(BGFX_DIR, "include"),
  11. path.join(BGFX_DIR, "3rdparty"),
  12. }
  13. files {
  14. path.join(BGFX_DIR, "3rdparty/ib-compress/**.cpp"),
  15. path.join(BGFX_DIR, "3rdparty/ib-compress/**.h"),
  16. path.join(BGFX_DIR, "3rdparty/ocornut-imgui/**.cpp"),
  17. path.join(BGFX_DIR, "3rdparty/ocornut-imgui/**.h"),
  18. path.join(BGFX_DIR, "examples/common/**.cpp"),
  19. path.join(BGFX_DIR, "examples/common/**.cpp"),
  20. path.join(BGFX_DIR, "examples/common/**.h"),
  21. }
  22. if _OPTIONS["with-scintilla"] then
  23. defines {
  24. "SCI_NAMESPACE",
  25. "SCI_LEXER",
  26. }
  27. buildoptions {
  28. -- "-Wno-missing-field-initializers",
  29. }
  30. includedirs {
  31. path.join(BGFX_DIR, "3rdparty/scintilla/include"),
  32. path.join(BGFX_DIR, "3rdparty/scintilla/lexlib"),
  33. }
  34. files {
  35. path.join(BGFX_DIR, "3rdparty/scintilla/src/**.cxx"),
  36. path.join(BGFX_DIR, "3rdparty/scintilla/src/**.h"),
  37. path.join(BGFX_DIR, "3rdparty/scintilla/lexlib/**.cxx"),
  38. path.join(BGFX_DIR, "3rdparty/scintilla/lexlib/**.h"),
  39. path.join(BGFX_DIR, "3rdparty/scintilla/lexers/**.cxx"),
  40. }
  41. end
  42. if _OPTIONS["with-sdl"] then
  43. defines {
  44. "ENTRY_CONFIG_USE_SDL=1",
  45. }
  46. includedirs {
  47. "$(SDL2_DIR)/include",
  48. }
  49. end
  50. if _OPTIONS["with-glfw"] then
  51. defines {
  52. "ENTRY_CONFIG_USE_GLFW=1",
  53. }
  54. end
  55. configuration { "linux-steamlink" }
  56. defines {
  57. "EGL_API_FB",
  58. }
  59. configuration { "osx or ios* or tvos*" }
  60. files {
  61. path.join(BGFX_DIR, "examples/common/**.mm"),
  62. }
  63. configuration { "winphone8* or winstore8* or durango"}
  64. files {
  65. path.join(BGFX_DIR, "examples/common/**.cx"),
  66. }
  67. linkoptions {
  68. "/ignore:4264" -- LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata
  69. }
  70. premake.vstudio.splashpath = "../../../examples/runtime/images/SplashScreen.png"