-
-
Notifications
You must be signed in to change notification settings - Fork 617
files
The files function adds files to a project.
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.
file_list specifies one or more file patterns. File paths should be specified relative to the currently executing 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 results using the removefiles() function.
Files may be specified at the solution, project, or configuration level. Not all exporters currently support per-configuration file lists however.
Add two files from to the current project, from the same directory that contains the script.
files { "hello.cpp", "goodbye.cpp" }
Add all C++ files from the src/ directory to the project.
files { "src/*.cpp" }
Add all C++ files from the src/ directory and any subdirectories.
files { "src/**.cpp" }
Add files for specific systems; might not work with all exporters.
filter "system:Windows"
files { "src/windows/*.h", src/windows/*.cpp" }
filter "system:MacOSX"
files { "src/mac/*.h", src/mac/*.cpp" }