From e2e62f74c0268b9bf95f2a6b3838a902e5b7e547 Mon Sep 17 00:00:00 2001 From: Andrew Gough Date: Fri, 17 May 2013 21:13:34 +1000 Subject: [PATCH] Add standard package paths to allow for extension mechanism --- src/_premake_main.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/_premake_main.lua b/src/_premake_main.lua index 0c5b3932..9c6c71bf 100644 --- a/src/_premake_main.lua +++ b/src/_premake_main.lua @@ -35,6 +35,16 @@ _PREMAKE_COMMAND = path.getabsolute(_PREMAKE_COMMAND) + -- Enable extensions - the '?' character is replaced with the extension + -- name so the extension directory name _must_ be the same as the + -- extension Lua file. eg. .../d/d.lua, .../codelite/codelite.lua etc + local extdirs = { + path.getdirectory( _PREMAKE_COMMAND ) .. "/ext/?/?.lua", + "./premake/?/?.lua", + "/usr/share/premake/?/?.lua" } + for _,v in ipairs(extdirs) do + package.path = package.path .. ";" .. v + end -- The "next-gen" actions have now replaced their deprecated counterparts. -- Provide a warning for a little while before I remove them entirely.