1
0
mirror of https://github.com/nefarius/WDF-Utils.git synced 2024-11-23 23:44:54 +01: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 Label="UserMacros" />
<PropertyGroup> <PropertyGroup>
<_PropertySheetDisplayName>Driver Module Framework</_PropertySheetDisplayName> <_PropertySheetDisplayName>Driver Module Framework</_PropertySheetDisplayName>
<DmfRootPath Condition="'$(DmfRootPath)' == ''">
..\..\DMF
</DmfRootPath>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup> <ItemDefinitionGroup>
<ClCompile> <ClCompile>
<AdditionalIncludeDirectories>..\..\DMF\DMF\Modules.Library;..\..\DMF\DMF\Framework;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(DmfRootPath)\DMF\Modules.Library;$(DmfRootPath)\DMF\Framework;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies Condition="'$(DriverType)'=='KMDF'">..\..\DMF\$(Configuration)\$(PlatformName)\lib\DmfK\DmfK.lib;%(AdditionalDependencies);</AdditionalDependencies> <AdditionalDependencies Condition="'$(DriverType)'=='KMDF'">$(DmfRootPath)\$(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\DmfU\DmfU.lib;%(AdditionalDependencies);</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup /> <ItemGroup />

View File

@ -2,7 +2,7 @@
## Usage ## 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 ```xml
<ImportGroup Label="PropertySheets"> <ImportGroup Label="PropertySheets">
@ -10,4 +10,6 @@ To include and link against [DMF](https://github.com/microsoft/DMF) simply clone
</ImportGroup> </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`. 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> </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. Drop the provided `UDE.props` into the project directory and all include and linker settings will be available. Works for `KMDF` only.