2
0

genie.lua 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. if not _OPTIONS["no-level-editor"] then
  56. dofile ("level-editor.lua")
  57. end
  58. dofile ("level-editor-imgui.lua")
  59. end