tools.lua 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. --
  2. -- Copyright (c) 2012-2016 Daniele Bartolini and individual contributors.
  3. -- License: https://github.com/taylor001/crown/blob/master/LICENSE
  4. --
  5. local CROWN_DIR = (path.getabsolute("..") .. "/")
  6. local CROWN_BUILD_DIR = (CROWN_DIR .. "build/")
  7. local CROWN_TOOLS_DIR = (CROWN_BUILD_DIR .. "tools/")
  8. solution "tools"
  9. language "Vala"
  10. configurations {
  11. "debug",
  12. "release",
  13. }
  14. -- FIXME: Fix this in GENie
  15. premake.valac.valac = premake.valac.valac .. " --gresources=" .. CROWN_DIR .. "tools/ui/resources.xml" .. " --target-glib=2.38"
  16. location(CROWN_TOOLS_DIR .. "projects/")
  17. targetdir(CROWN_TOOLS_DIR)
  18. configuration { "debug" }
  19. targetsuffix "-debug"
  20. project "level-editor"
  21. kind "ConsoleApp"
  22. configuration { "debug" }
  23. flags {
  24. "Symbols",
  25. }
  26. defines {
  27. "CROWN_DEBUG",
  28. }
  29. configuration { "release" }
  30. flags {
  31. "Optimize"
  32. }
  33. configuration { "linux" }
  34. defines {
  35. "CROWN_PLATFORM_LINUX"
  36. }
  37. configuration { "windows" }
  38. defines {
  39. "CROWN_PLATFORM_WINDOWS"
  40. }
  41. configuration {}
  42. links {
  43. "gdk-3.0",
  44. "gee-0.8",
  45. "gio-2.0",
  46. "glib-2.0",
  47. "gtk+-3.0",
  48. "posix",
  49. }
  50. buildoptions {
  51. "-lm",
  52. "-Wno-deprecated-declarations",
  53. "-Wno-incompatible-pointer-types",
  54. "-Wno-discarded-qualifiers",
  55. }
  56. files {
  57. CROWN_DIR .. "tools/**.vala",
  58. CROWN_DIR .. "tools/ui/resources.c",
  59. }
  60. configuration {}