1
0
mirror of https://github.com/nefarius/WDF-Utils.git synced 2024-07-27 00:39:26 +02:00

Added environment variable to DMF

Fixed docs
This commit is contained in:
Benjamin Höglinger-Stelzer 2022-02-10 12:21:39 +01:00
parent 955ff3363f
commit bcc2fa1971
3 changed files with 11 additions and 4 deletions

View File

@ -4,14 +4,17 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_PropertySheetDisplayName>Driver Module Framework</_PropertySheetDisplayName>
<DmfRootPath Condition="'$(DmfRootPath)' == ''">
..\..\DMF
</DmfRootPath>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\DMF\DMF\Modules.Library;..\..\DMF\DMF\Framework;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(DmfRootPath)\DMF\Modules.Library;$(DmfRootPath)\DMF\Framework;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies Condition="'$(DriverType)'=='KMDF'">..\..\DMF\$(Configuration)\$(PlatformName)\lib\DmfK\DmfK.lib;%(AdditionalDependencies);</AdditionalDependencies>
<AdditionalDependencies Condition="'$(DriverType)'!='KMDF'">..\..\DMF\$(Configuration)\$(PlatformName)\lib\DmfU\DmfU.lib;%(AdditionalDependencies);</AdditionalDependencies>
<AdditionalDependencies Condition="'$(DriverType)'=='KMDF'">$(DmfRootPath)\$(Configuration)\$(PlatformName)\lib\DmfK\DmfK.lib;%(AdditionalDependencies);</AdditionalDependencies>
<AdditionalDependencies Condition="'$(DriverType)'!='KMDF'">$(DmfRootPath)\$(Configuration)\$(PlatformName)\lib\DmfU\DmfU.lib;%(AdditionalDependencies);</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />

View File

@ -2,7 +2,7 @@
## Usage
To include and link against [DMF](https://github.com/microsoft/DMF) simply clone DMF to the same project parent directory and add the following snippet to your driver project:
To include and link against [DMF](https://github.com/microsoft/DMF) simply clone DMF to the same project parent directory **or** set the environment variable `DmfRootPath` to the DMF directory. Then add the following snippet to your driver project:
```xml
<ImportGroup Label="PropertySheets">
@ -10,4 +10,6 @@ To include and link against [DMF](https://github.com/microsoft/DMF) simply clone
</ImportGroup>
```
**Important:** if a `PropertySheets` group already exists, append the Import-Node(s) to that to avoid linker issues!
Drop the provided `DMF.props` into the project directory and all include and linker settings will be available. Works for both `KMDF` and `UMDF`.

View File

@ -10,4 +10,6 @@ To include and link against [UDE](https://docs.microsoft.com/en-us/windows-hardw
</ImportGroup>
```
**Important:** if a `PropertySheets` group already exists, append the Import-Node(s) to that to avoid linker issues!
Drop the provided `UDE.props` into the project directory and all include and linker settings will be available. Works for `KMDF` only.