Convenience utilities for module rules.
More...
|
| static AbsolutePath | ModulePath (this ModuleRules self) |
| | - Returns
- Path to the module folder
|
| |
| static AbsolutePath | PluginPath (this ModuleRules self) |
| | - Returns
- Path to the plugin folder to which this module belongs
|
| |
| static AbsolutePath | ProjectPath (this ModuleRules self) |
| | - Returns
- Path to the project folder to which this module belongs
|
| |
| static AbsolutePath | PluginBinaries (this ModuleRules self) |
| | - Returns
- A consistent place for plugin binaries
|
| |
| static AbsolutePath | PluginBinariesPlatform (this ModuleRules self, string insert="") |
| |
| static AbsolutePath | PluginModuleBinaries (this ModuleRules self, string insert="") |
| |
| static AbsolutePath | PluginModuleBinariesPlatform (this ModuleRules self, string insert="") |
| |
| static bool | IsReallyDebug (this ModuleRules self) |
| | Is the current build fully linked as debug build? This is usually only the case when building engine as Debug from source (optionally via a project)
|
| |
| static string | GetLibraryConfig (this ModuleRules self, bool allowDebugLibraries=true) |
| | Get the actual preferred linkage for a third-party library.
|
| |
| static string | GetBaseModuleName (this ModuleRules self) |
| | Infer module name from its class name.
|
| |
| static void | PrepareRuntimeDependencies (this ModuleRules self, AbsolutePath libraryFolder, string filePattern=null, bool thirdParty=true, string destinationPostfix="") |
| |
| static void | DefineDllPath (this ModuleRules self, string pluginRelativePath) |
| | Propagate a search path for module-specific delay loaded DLL files to C++ source via preprocessor.
|
| |
| static void | DefineDllList (this ModuleRules self, IEnumerable< string > dlls) |
| | Propagate delay loaded module-specific dynamic library files to C++ source via preprocessor.
|
| |
| static void | UseRuntimeDependencies (this ModuleRules self, bool allowDebugLibraries=true) |
| |
Convenience utilities for module rules.
Utilities for managing runtime file dependencies (usually DLL's) of third-party libraries in a more consistent and automatic way than it is expected by vanilla templates.
Definition at line 84 of file RuntimeDependencies.Build.cs.
◆ DefineDllList()
| static void McroBuild.ModuleRuleExtensions.DefineDllList |
( |
this ModuleRules | self, |
|
|
IEnumerable< string > | dlls ) |
|
inlinestatic |
Propagate delay loaded module-specific dynamic library files to C++ source via preprocessor.
- Parameters
-
| self | |
| dlls | List of DLL file names to load at some point by C++ |
Definition at line 145 of file RuntimeDependencies.Build.cs.
◆ DefineDllPath()
| static void McroBuild.ModuleRuleExtensions.DefineDllPath |
( |
this ModuleRules | self, |
|
|
string | pluginRelativePath ) |
|
inlinestatic |
Propagate a search path for module-specific delay loaded DLL files to C++ source via preprocessor.
- Parameters
-
| self | |
| pluginRelativePath | A relative path with the plugin as its base, which will be determined in runtime. |
Definition at line 134 of file RuntimeDependencies.Build.cs.
◆ GetBaseModuleName()
| static string McroBuild.ModuleRuleExtensions.GetBaseModuleName |
( |
this ModuleRules | self | ) |
|
|
inlinestatic |
◆ GetLibraryConfig()
| static string McroBuild.ModuleRuleExtensions.GetLibraryConfig |
( |
this ModuleRules | self, |
|
|
bool | allowDebugLibraries = true ) |
|
static |
Get the actual preferred linkage for a third-party library.
◆ IsReallyDebug()
| static bool McroBuild.ModuleRuleExtensions.IsReallyDebug |
( |
this ModuleRules | self | ) |
|
|
static |
Is the current build fully linked as debug build? This is usually only the case when building engine as Debug from source (optionally via a project)
◆ ModulePath()
| static AbsolutePath McroBuild.ModuleRuleExtensions.ModulePath |
( |
this ModuleRules | self | ) |
|
|
static |
- Returns
- Path to the module folder
◆ PluginBinaries()
| static AbsolutePath McroBuild.ModuleRuleExtensions.PluginBinaries |
( |
this ModuleRules | self | ) |
|
|
static |
- Returns
- A consistent place for plugin binaries
◆ PluginBinariesPlatform()
| static AbsolutePath McroBuild.ModuleRuleExtensions.PluginBinariesPlatform |
( |
this ModuleRules | self, |
|
|
string | insert = "" ) |
|
static |
- Parameters
-
| self | |
| insert | A path segment between main plugin binaries folder and the platform specifier |
- Returns
- A consistent place for plugin binaries regarding current platform
◆ PluginModuleBinaries()
| static AbsolutePath McroBuild.ModuleRuleExtensions.PluginModuleBinaries |
( |
this ModuleRules | self, |
|
|
string | insert = "" ) |
|
static |
- Parameters
-
| self | |
| insert | A path segment between main plugin binaries folder and the current module name |
- Returns
- A consistent place for module binaries in owning plugin.
◆ PluginModuleBinariesPlatform()
| static AbsolutePath McroBuild.ModuleRuleExtensions.PluginModuleBinariesPlatform |
( |
this ModuleRules | self, |
|
|
string | insert = "" ) |
|
static |
- Parameters
-
| self | |
| insert | A path segment between main plugin binaries folder and the current module name |
- Returns
- A consistent place for module binaries in owning plugin and regarding current platform.
◆ PluginPath()
| static AbsolutePath McroBuild.ModuleRuleExtensions.PluginPath |
( |
this ModuleRules | self | ) |
|
|
static |
- Returns
- Path to the plugin folder to which this module belongs
◆ PrepareRuntimeDependencies()
| static void McroBuild.ModuleRuleExtensions.PrepareRuntimeDependencies |
( |
this ModuleRules | self, |
|
|
AbsolutePath | libraryFolder, |
|
|
string | filePattern = null, |
|
|
bool | thirdParty = true, |
|
|
string | destinationPostfix = "" ) |
|
inlinestatic |
Provide a folder from which runtime dependencies (by default dynamic libraries) are collected, copied to plugin-module binaries folder while keeping their relative folder structure and add them of course as RuntimeDependencies or if they're really dynamic libraries then add them to PublicDelayLoadDLLs.
The list of DLL's and their base path is propagated to source code via preprocessor definitions *_DLL_PATH and *_DLL_FILES, where *˛is the capitalized module name. This goes in tandem with utilities inside Mcro/Dll.h especially TModuleBoundDlls which can sort out all your dynamic library loading chores on module startup and shutdown with a one-liner.
TModuleBoundDlls<FMyAwesomeModule> GMyLibraryDlls {MYLIBRARY_DLL_PATH, MYLIBRARY_DLL_FILES};
- Parameters
-
| self | |
| libraryFolder | Path containing the runtime dependencies |
| filePattern | Consider files with given glob pattern. Platform specific DLL files by default |
| thirdParty | Is this module importing a third party library. True by default |
| destinationPostfix | Extra levels in the plugin-module binaries folder. Empty by default |
Definition at line 107 of file RuntimeDependencies.Build.cs.
◆ ProjectPath()
| static AbsolutePath McroBuild.ModuleRuleExtensions.ProjectPath |
( |
this ModuleRules | self | ) |
|
|
static |
- Returns
- Path to the project folder to which this module belongs
◆ UseRuntimeDependencies()
| static void McroBuild.ModuleRuleExtensions.UseRuntimeDependencies |
( |
this ModuleRules | self, |
|
|
bool | allowDebugLibraries = true ) |
|
inlinestatic |
Read a list of runtime dependencies from RuntimeDeps.xml located directly in the module folder. An external tool can generate this manifest for elaborate libraries and manage their runtime files themselves. The files listed in the manifest should be already copied to the place where they will be shipped for runtime as well (usually that's the plugin-module binaries folder)
The list of DLL's and their base path is propagated to source code via preprocessor definitions *_DLL_PATH and *_DLL_FILES, where *˛is the capitalized module name. This goes in tandem with utilities inside Mcro/Dll.h especially TModuleBoundDlls which can sort out all your dynamic library loading chores on module startup and shutdown with a one-liner.
TModuleBoundDlls<FMyAwesomeModule> GMyLibraryDlls {MYLIBRARY_DLL_PATH, MYLIBRARY_DLL_FILES};
- Parameters
-
Definition at line 172 of file RuntimeDependencies.Build.cs.
The documentation for this class was generated from the following files: