-
Notifications
You must be signed in to change notification settings - Fork 21
include
mba105 edited this page Sep 24, 2014
·
2 revisions
Home > [Scripting Reference](Scripting Reference) > 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.
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.
Any values returned by the included script are passed through to the caller.
#!lua
-- runs "src/MyApplication/premake4.lua"
include "src/MyApplication"
-- runs "src/MyLibrary/premake4.lua"
include "src/MyLibrary"