genie.lua 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. --
  2. -- Copyright (c) 2012-2018 Daniele Bartolini and individual contributors.
  3. -- License: https://github.com/dbartolini/crown/blob/master/LICENSE
  4. --
  5. CROWN_DIR = (path.getabsolute("..") .. "/")
  6. local CROWN_THIRD_DIR = (CROWN_DIR .. "3rdparty/")
  7. local CROWN_BUILD_DIR = (CROWN_DIR .. "build/")
  8. BGFX_DIR = (CROWN_DIR .. "3rdparty/bgfx/")
  9. BIMG_DIR = (CROWN_DIR .. "3rdparty/bimg/")
  10. BX_DIR = (CROWN_DIR .. "3rdparty/bx/")
  11. function copyLib()
  12. end
  13. newoption {
  14. trigger = "with-luajit",
  15. description = "Build with luajit support."
  16. }
  17. newoption {
  18. trigger = "with-tools",
  19. description = "Build with tools."
  20. }
  21. newoption {
  22. trigger = "no-level-editor",
  23. description = "Do not build Level Editor."
  24. }
  25. solution "crown"
  26. configurations {
  27. "debug",
  28. "development",
  29. "release",
  30. }
  31. platforms {
  32. "x32",
  33. "x64",
  34. "native"
  35. }
  36. language "C++"
  37. configuration {}
  38. dofile ("toolchain.lua")
  39. toolchain(CROWN_BUILD_DIR, CROWN_THIRD_DIR)
  40. dofile ("crown.lua")
  41. group "engine"
  42. crown_project("", "WindowedApp", {})
  43. group "libs"
  44. dofile (BGFX_DIR .. "scripts/bgfx.lua")
  45. bgfxProject("", "StaticLib")
  46. dofile (BX_DIR .. "scripts/bx.lua")
  47. dofile (BIMG_DIR .. "scripts/bimg.lua")
  48. dofile (BIMG_DIR .. "scripts/bimg_encode.lua")
  49. dofile (BIMG_DIR .. "scripts/bimg_decode.lua")
  50. dofile ("openal.lua")
  51. openal_project(os.is("windows") and "SharedLib" or "StaticLib")
  52. dofile ("bullet.lua")
  53. if _OPTIONS["with-tools"] then
  54. group "tools"
  55. dofile (BGFX_DIR .. "scripts/shaderc.lua")
  56. dofile (BGFX_DIR .. "scripts/texturec.lua")
  57. if not _OPTIONS["no-level-editor"] then
  58. dofile ("level-editor.lua")
  59. end
  60. dofile ("level-editor-imgui.lua")
  61. end