genie.lua 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. --
  2. -- Copyright (c) 2012-2017 Daniele Bartolini and individual contributors.
  3. -- License: https://github.com/taylor001/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. BX_DIR = (CROWN_DIR .. "3rdparty/bx/")
  10. function copyLib()
  11. end
  12. newoption {
  13. trigger = "with-openal",
  14. description = "Build with OpenAL support."
  15. }
  16. newoption {
  17. trigger = "with-luajit",
  18. description = "Build with luajit support."
  19. }
  20. newoption {
  21. trigger = "with-bullet",
  22. description = "Build with Bullet support."
  23. }
  24. newoption {
  25. trigger = "with-tools",
  26. description = "Build with tools."
  27. }
  28. newoption {
  29. trigger = "no-level-editor",
  30. description = "Do not build Level Editor."
  31. }
  32. solution "crown"
  33. configurations {
  34. "debug",
  35. "development",
  36. "release",
  37. }
  38. platforms {
  39. "x32",
  40. "x64",
  41. "native"
  42. }
  43. language "C++"
  44. configuration {}
  45. dofile ("toolchain.lua")
  46. dofile (BGFX_DIR .. "scripts/bgfx.lua")
  47. dofile ("crown.lua")
  48. toolchain(CROWN_BUILD_DIR, CROWN_THIRD_DIR)
  49. group "libs"
  50. bgfxProject("", "StaticLib", os.is("windows") and { "BGFX_CONFIG_RENDERER_DIRECT3D9=1" } or {})
  51. if _OPTIONS["with-openal"] then
  52. dofile ("openal.lua")
  53. openal_project(os.is("windows") and "SharedLib" or "StaticLib")
  54. end
  55. if _OPTIONS["with-bullet"] then
  56. dofile ("bullet.lua")
  57. end
  58. group "engine"
  59. crown_project("", "ConsoleApp", {})
  60. if _OPTIONS["with-tools"] then
  61. group "tools"
  62. if not _OPTIONS["no-level-editor"] then
  63. dofile ("level-editor.lua")
  64. end
  65. dofile ("shaderc.lua")
  66. dofile ("texturec.lua")
  67. end