You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mba105 edited this page Sep 24, 2014
·
2 revisions
Home > [Scripting Reference](Scripting Reference) > include
include
The include function looks for a file named premake4.lua in a specified directory, and includes it in the current script.
#!lua
include "directory"
This is equivalent to:
#!lua
dofile "directory/premake4.lua"
This allows you to specify each project in its own premake4.lua file, and then easily include them into a solution, or multiple solutions.
Parameters
directory is the path to the included directory, relative to the currently executing script file. The directory must contain a premake4.lua file, or an error will occur. If you wish to call a file other than premake4.lua, use the dofile function instead.
Return Value
Any values returned by the included script are passed through to the caller.
Examples
#!lua
-- runs "src/MyApplication/premake4.lua"
include "src/MyApplication"
-- runs "src/MyLibrary/premake4.lua"
include "src/MyLibrary"