Groups multiple Configuration and source files with their compile and link flags. More...
#include <Build.h>
Public Member Functions | |
Project (TargetType::Type targetType, StringView name) | |
bool | setRootDirectory (StringView file) |
Set root directory for this project (all relative paths will be relative to this one) | |
bool | addPresetConfiguration (Configuration::Preset preset, const Parameters ¶meters, StringView configurationName=StringView()) |
Add a configuration with a given name, started by cloning options of a specific Preset. | |
Configuration * | getConfiguration (StringView configurationName) |
Get Configuration with the matching configurationName | |
const Configuration * | getConfiguration (StringView configurationName) const |
Get Configuration with the matching configurationName | |
bool | addFiles (StringView subdirectory, StringView filter) |
Add all source or header/inline files from a subdirectory (relative to project root) matching the given filter. | |
bool | addFile (StringView singleFile) |
Add a single source or header/inline file to the project, relative to project root. | |
bool | addSpecificFileFlags (SourceFiles selection) |
Add a set of flags that apply to some files only. | |
bool | addIncludePaths (Span< const StringView > includePaths) |
Adds paths to include paths list. | |
bool | addLinkLibraryPaths (Span< const StringView > libraryPaths) |
Adds paths to libraries paths list. | |
bool | addLinkLibraries (Span< const StringView > linkLibraries) |
Adds libraries to be linked. | |
bool | addLinkFrameworks (Span< const StringView > frameworks) |
Add frameworks shared with all apple os. | |
bool | addLinkFrameworksMacOS (Span< const StringView > frameworks) |
Add frameworks only for macOS. | |
bool | addLinkFrameworksIOS (Span< const StringView > frameworks) |
Add frameworks only for iOS. | |
bool | addDefines (Span< const StringView > defines) |
Adds some pre-processor defines. | |
bool | removeFiles (StringView subdirectory, StringView filter) |
Remove files matching a filter, to remove only a specific file type after Project::addDirectory. | |
Result | validate () const |
Validates this project for it to contain a valid combination of flags. | |
Public Attributes | |
TargetType::Type | targetType = TargetType::ConsoleExecutable |
Type of build artifact. | |
String | name |
Project name. | |
String | rootDirectory |
Project root directory. | |
String | targetName |
Project target name. | |
String | iconPath |
Icon location. | |
SourceFiles | files |
Project source files with their associated compile flags. | |
LinkFlags | link |
Linker flags applied to all files in the project. | |
Vector< SourceFiles > | filesWithSpecificFlags |
List of files with specific flags different from project/config. | |
Vector< Configuration > | configurations |
Build configurations created inside the project. | |
Groups multiple Configuration and source files with their compile and link flags.
|
nodiscard |
Adds some pre-processor defines.
|
nodiscard |
Add a single source or header/inline file to the project, relative to project root.
|
nodiscard |
Add all source or header/inline files from a subdirectory (relative to project root) matching the given filter.
subdirectory | The subdirectory to search files from, absolute or relative to project root. No * allowed. |
filter | The suffix filter that is appended to subdirectory (can contain * ) |
.h
, .hpp
, .inl
) will be considered non-source files.
|
nodiscard |
Adds paths to include paths list.
|
nodiscard |
Add frameworks shared with all apple os.
|
nodiscard |
Add frameworks only for iOS.
|
nodiscard |
Add frameworks only for macOS.
|
nodiscard |
Adds libraries to be linked.
|
nodiscard |
Adds paths to libraries paths list.
|
nodiscard |
Add a configuration with a given name, started by cloning options of a specific Preset.
|
nodiscard |
Add a set of flags that apply to some files only.
|
nodiscard |
Get Configuration with the matching configurationName
|
nodiscard |
Get Configuration with the matching configurationName
|
nodiscard |
Remove files matching a filter, to remove only a specific file type after Project::addDirectory.
subdirectory | The subdirectory to search files into, absolute or relative to project root. No * allowed. |
filter | The suffix filter that is appended to subdirectory (can contain * ) |
|
nodiscard |
Set root directory for this project (all relative paths will be relative to this one)
|
nodiscard |
Validates this project for it to contain a valid combination of flags.
Vector<Configuration> SC::Build::Project::configurations |
Build configurations created inside the project.
SourceFiles SC::Build::Project::files |
Project source files with their associated compile flags.
Vector<SourceFiles> SC::Build::Project::filesWithSpecificFlags |
List of files with specific flags different from project/config.
String SC::Build::Project::iconPath |
Icon location.
LinkFlags SC::Build::Project::link |
Linker flags applied to all files in the project.
TargetType::Type SC::Build::Project::targetType = TargetType::ConsoleExecutable |
Type of build artifact.