example-common.lua 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. --
  2. -- Copyright 2010-2015 Branimir Karadzic. All rights reserved.
  3. -- License: http://www.opensource.org/licenses/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/**.h"),
  20. }
  21. if _OPTIONS["with-scintilla"] then
  22. defines {
  23. "SCI_NAMESPACE",
  24. "SCI_LEXER",
  25. }
  26. buildoptions {
  27. -- "-Wno-missing-field-initializers",
  28. }
  29. includedirs {
  30. path.join(BGFX_DIR, "3rdparty/scintilla/include"),
  31. path.join(BGFX_DIR, "3rdparty/scintilla/lexlib"),
  32. }
  33. files {
  34. path.join(BGFX_DIR, "3rdparty/scintilla/src/**.cxx"),
  35. path.join(BGFX_DIR, "3rdparty/scintilla/src/**.h"),
  36. path.join(BGFX_DIR, "3rdparty/scintilla/lexlib/**.cxx"),
  37. path.join(BGFX_DIR, "3rdparty/scintilla/lexlib/**.h"),
  38. path.join(BGFX_DIR, "3rdparty/scintilla/lexers/**.cxx"),
  39. }
  40. end
  41. if _OPTIONS["with-sdl"] then
  42. defines {
  43. "ENTRY_CONFIG_USE_SDL=1",
  44. }
  45. includedirs {
  46. "$(SDL2_DIR)/include",
  47. }
  48. end
  49. if _OPTIONS["with-glfw"] then
  50. defines {
  51. "ENTRY_CONFIG_USE_GLFW=1",
  52. }
  53. end
  54. configuration { "osx or ios* or tvos*" }
  55. files {
  56. path.join(BGFX_DIR, "examples/common/**.mm"),
  57. }
  58. configuration { "winphone8* or winstore8*"}
  59. linkoptions {
  60. "/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
  61. }
  62. premake.vstudio.splashpath = "../../../examples/runtime/images/SplashScreen.png"