genie.lua 1.8 KB

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