Skip to content
mba105 edited this page Sep 24, 2014 · 2 revisions

Home > [Scripting Reference](Scripting Reference) > files


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.

Applies To

Files may be set on the solution, project, and configuration level. However, only project-level file lists are currently supported.

Parameters

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.

Examples

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" }
Clone this wiki locally