-
Notifications
You must be signed in to change notification settings - Fork 20
files
Home > [Scripting Reference](Scripting Reference) > files
The files function adds files to a project.
#!lua
files { "file_list" }
If a project includes multiple calls to files the lists are concatenated, in the order in which they appear in the script.
Files may be set on the solution, project, and configuration level. However, only project-level file lists are currently supported.
file_list specifies one or more file patterns, separated by commas. File paths should be specified relative to the location of the script file. File patterns may contain the * wildcard to match against files in the current directory, or the ** wildcard to perform a recursive match.
If a wildcard matches more files than you would like, you may filter the list using the excludes function.
Add two files to the current project.
#!lua
files { "hello.cpp", "goodbye.cpp" }
Add all C++ files from the src/ directory to the project.
#!lua
files { "src/*.cpp" }
Add all C++ files from the src/ directory, and any subdirectories.
#!lua
files { "src/**.cpp" }