2016-11-09 19:29:33 +00:00
|
|
|
--
|
|
|
|
-- Name: codelite/_preload.lua
|
|
|
|
-- Purpose: Define the CodeLite action.
|
|
|
|
-- Author: Ryan Pusztai
|
|
|
|
-- Modified by: Andrea Zanellato
|
|
|
|
-- Andrew Gough
|
|
|
|
-- Manu Evans
|
|
|
|
-- Created: 2013/05/06
|
|
|
|
-- Copyright: (c) 2008-2015 Jason Perkins and the Premake project
|
|
|
|
--
|
|
|
|
|
|
|
|
local p = premake
|
|
|
|
|
|
|
|
newaction
|
|
|
|
{
|
|
|
|
-- Metadata for the command line and help system
|
|
|
|
|
|
|
|
trigger = "codelite",
|
|
|
|
shortname = "CodeLite",
|
|
|
|
description = "Generate CodeLite project files",
|
2017-05-02 17:21:11 +00:00
|
|
|
toolset = "clang",
|
2016-11-09 19:29:33 +00:00
|
|
|
|
|
|
|
-- The capabilities of this action
|
|
|
|
|
|
|
|
valid_kinds = { "ConsoleApp", "WindowedApp", "Makefile", "SharedLib", "StaticLib", "Utility" },
|
2017-05-04 00:01:33 +00:00
|
|
|
valid_languages = { "C", "C++" },
|
2016-11-09 19:29:33 +00:00
|
|
|
valid_tools = {
|
2017-04-25 17:15:33 +00:00
|
|
|
cc = { "gcc", "clang", "msc" }
|
2016-11-09 19:29:33 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
-- Workspace and project generation logic
|
|
|
|
|
|
|
|
onWorkspace = function(wks)
|
|
|
|
p.modules.codelite.generateWorkspace(wks)
|
|
|
|
end,
|
|
|
|
onProject = function(prj)
|
|
|
|
p.modules.codelite.generateProject(prj)
|
|
|
|
end,
|
|
|
|
|
|
|
|
onCleanWorkspace = function(wks)
|
|
|
|
p.modules.codelite.cleanWorkspace(wks)
|
|
|
|
end,
|
|
|
|
onCleanProject = function(prj)
|
|
|
|
p.modules.codelite.cleanProject(prj)
|
|
|
|
end,
|
|
|
|
onCleanTarget = function(prj)
|
|
|
|
p.modules.codelite.cleanTarget(prj)
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Decide when the full module should be loaded.
|
|
|
|
--
|
|
|
|
|
|
|
|
return function(cfg)
|
|
|
|
return (_ACTION == "codelite")
|
|
|
|
end
|