example-common.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. --
  2. -- Copyright 2010-2017 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(BIMG_DIR, "include"),
  11. path.join(BGFX_DIR, "include"),
  12. path.join(BGFX_DIR, "3rdparty"),
  13. }
  14. files {
  15. path.join(BGFX_DIR, "3rdparty/ib-compress/**.cpp"),
  16. path.join(BGFX_DIR, "3rdparty/ib-compress/**.h"),
  17. path.join(BGFX_DIR, "3rdparty/ocornut-imgui/**.cpp"),
  18. path.join(BGFX_DIR, "3rdparty/ocornut-imgui/**.h"),
  19. path.join(BGFX_DIR, "examples/common/**.cpp"),
  20. path.join(BGFX_DIR, "examples/common/**.cpp"),
  21. path.join(BGFX_DIR, "examples/common/**.h"),
  22. }
  23. if _OPTIONS["with-scintilla"] then
  24. defines {
  25. "SCI_NAMESPACE",
  26. "SCI_LEXER",
  27. }
  28. buildoptions {
  29. -- "-Wno-missing-field-initializers",
  30. }
  31. includedirs {
  32. path.join(BGFX_DIR, "3rdparty/scintilla/include"),
  33. path.join(BGFX_DIR, "3rdparty/scintilla/lexlib"),
  34. }
  35. files {
  36. path.join(BGFX_DIR, "3rdparty/scintilla/src/**.cxx"),
  37. path.join(BGFX_DIR, "3rdparty/scintilla/src/**.h"),
  38. path.join(BGFX_DIR, "3rdparty/scintilla/lexlib/**.cxx"),
  39. path.join(BGFX_DIR, "3rdparty/scintilla/lexlib/**.h"),
  40. path.join(BGFX_DIR, "3rdparty/scintilla/lexers/**.cxx"),
  41. }
  42. end
  43. if _OPTIONS["with-sdl"] then
  44. defines {
  45. "ENTRY_CONFIG_USE_SDL=1",
  46. }
  47. includedirs {
  48. "$(SDL2_DIR)/include",
  49. }
  50. end
  51. if _OPTIONS["with-glfw"] then
  52. defines {
  53. "ENTRY_CONFIG_USE_GLFW=1",
  54. }
  55. end
  56. configuration { "linux-steamlink" }
  57. defines {
  58. "EGL_API_FB",
  59. }
  60. configuration { "osx or ios* or tvos*" }
  61. files {
  62. path.join(BGFX_DIR, "examples/common/**.mm"),
  63. }
  64. configuration { "winphone8* or winstore8* or durango"}
  65. files {
  66. path.join(BGFX_DIR, "examples/common/**.cx"),
  67. }
  68. linkoptions {
  69. "/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
  70. }
  71. premake.vstudio.splashpath = "../../../examples/runtime/images/SplashScreen.png"