example-common.lua 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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/**.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 { "linux-steamlink" }
  55. defines {
  56. "EGL_API_FB",
  57. }
  58. configuration { "osx or ios* or tvos*" }
  59. files {
  60. path.join(BGFX_DIR, "examples/common/**.mm"),
  61. }
  62. configuration { "winphone8* or winstore8*"}
  63. linkoptions {
  64. "/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
  65. }
  66. premake.vstudio.splashpath = "../../../examples/runtime/images/SplashScreen.png"