Dualapipartitionattibute.h header is missing in nuget package (#3350)

* add dualapipartition

* wrong variable for repo root

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
This commit is contained in:
Sheil Kumar 2020-04-16 22:21:57 -07:00 committed by GitHub
parent 1a222b3f6e
commit 951484ba53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View file

@ -10,7 +10,8 @@
<AssemblyOriginatorKeyFile>..\..\OnnxRuntime.snk</AssemblyOriginatorKeyFile>
<!--internal build related properties-->
<OnnxRuntimeCsharpRoot>..\..</OnnxRuntimeCsharpRoot>
<OnnxRuntimeRoot>..\..\..</OnnxRuntimeRoot>
<OnnxRuntimeCsharpRoot>$(OnnxRuntimeRoot)\csharp</OnnxRuntimeCsharpRoot>
<OnnxRuntimeBuildDirectory Condition="'$(OnnxRuntimeBuildDirectory)'==''">$(OnnxRuntimeCsharpRoot)\..\build\Windows</OnnxRuntimeBuildDirectory>
<NativeBuildOutputDir>$(OnnxRuntimeBuildDirectory)\$(Configuration)\$(Configuration)</NativeBuildOutputDir>
<TargetArchitecture Condition=" '$(TargetArchitecture)' == '' ">x64</TargetArchitecture>
@ -146,6 +147,15 @@
CopyToOutputDirectory="Never"
Visible="false"
/>
<None Include="$(OnnxRuntimeRoot)\winml\api\dualapipartitionattribute.h"
Condition="Exists('$(OnnxRuntimeRoot)\winml\api\dualapipartitionattribute.h')
And ('$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.DirectML'
Or '$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime')"
PackagePath="\build\native\include"
Pack="false"
CopyToOutputDirectory="Never"
Visible="false"
/>
<None Include="$(NativeBuildOutputDir)\DirectML.dll"
Condition="Exists('$(NativeBuildOutputDir)\DirectML.dll')
And '$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.DirectML'"

View file

@ -155,6 +155,9 @@ def generate_files(list, args):
if (args.package_name == 'Microsoft.ML.OnnxRuntime.DirectML' or args.package_name == 'Microsoft.ML.OnnxRuntime') and os.path.exists(os.path.join(args.ort_build_path, args.build_config, 'windows.ai.machinelearning.native.h')):
files_list.append('<file src=' + '"' + os.path.join(args.ort_build_path, args.build_config, 'windows.ai.machinelearning.native.h') + '" target="build\\native\\include\\Windows.AI.MachineLearning.Native.h" />')
if (args.package_name == 'Microsoft.ML.OnnxRuntime.DirectML' or args.package_name == 'Microsoft.ML.OnnxRuntime') and os.path.exists(os.path.join(args.ort_build_path, args.build_config, 'dualapipartitionattribute.h')):
files_list.append('<file src=' + '"' + os.path.join(args.ort_build_path, args.build_config, 'dualapipartitionattribute.h') + '" target="build\\native\\include\\dualapipartitionattribute.h" />')
# Process dnll.dll
if os.path.exists(os.path.join(args.native_build_path, 'dnnl.dll')):
files_list.append('<file src=' + '"' + os.path.join(args.native_build_path, 'dnnl.dll') + '" target="runtimes\\win-' + args.target_architecture + '\\native" />')