_preload.lua 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. --
  2. -- Name: codelite/_preload.lua
  3. -- Purpose: Define the CodeLite action.
  4. -- Author: Ryan Pusztai
  5. -- Modified by: Andrea Zanellato
  6. -- Andrew Gough
  7. -- Manu Evans
  8. -- Created: 2013/05/06
  9. -- Copyright: (c) 2008-2015 Jason Perkins and the Premake project
  10. --
  11. local p = premake
  12. newaction
  13. {
  14. -- Metadata for the command line and help system
  15. trigger = "codelite",
  16. shortname = "CodeLite",
  17. description = "Generate CodeLite project files",
  18. toolset = "clang",
  19. -- The capabilities of this action
  20. valid_kinds = { "ConsoleApp", "WindowedApp", "Makefile", "SharedLib", "StaticLib", "Utility" },
  21. valid_languages = { "C", "C++" },
  22. valid_tools = {
  23. cc = { "gcc", "clang", "msc" }
  24. },
  25. -- Workspace and project generation logic
  26. onWorkspace = function(wks)
  27. p.modules.codelite.generateWorkspace(wks)
  28. end,
  29. onProject = function(prj)
  30. p.modules.codelite.generateProject(prj)
  31. end,
  32. onCleanWorkspace = function(wks)
  33. p.modules.codelite.cleanWorkspace(wks)
  34. end,
  35. onCleanProject = function(prj)
  36. p.modules.codelite.cleanProject(prj)
  37. end,
  38. onCleanTarget = function(prj)
  39. p.modules.codelite.cleanTarget(prj)
  40. end,
  41. }
  42. --
  43. -- Decide when the full module should be loaded.
  44. --
  45. return function(cfg)
  46. return (_ACTION == "codelite")
  47. end