Fix OS build (#3481)

This commit is contained in:
Tiago Koji Castro Shibata 2020-04-09 21:46:01 -07:00 committed by GitHub
parent 95ade8f47b
commit d09d4a6b0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -551,7 +551,9 @@ if (onnxruntime_USE_DML)
set(delayload_dml "/DELAYLOAD:directml.dll")
endif(onnxruntime_USE_DML)
target_link_options(winml_dll PRIVATE /DEF:${WINML_DIR}/windows.ai.machinelearning.def ${os_component_link_flags} /DELAYLOAD:api-ms-win-core-libraryloader-l1-2-1.dll /DELAYLOAD:api-ms-win-core-threadpool-legacy-l1-1-0.dll /DELAYLOAD:api-ms-win-core-processtopology-obsolete-l1-1-0.dll /DELAYLOAD:api-ms-win-core-kernel32-legacy-l1-1-0.dll /DELAYLOAD:d3d12.dll /DELAYLOAD:d3d11.dll /DELAYLOAD:dxgi.dll ${delayload_dml})
set(os_component_link_flags_list ${os_component_link_flags})
separate_arguments(os_component_link_flags_list)
target_link_options(winml_dll PRIVATE /DEF:${WINML_DIR}/windows.ai.machinelearning.def ${os_component_link_flags_list} /DELAYLOAD:api-ms-win-core-libraryloader-l1-2-1.dll /DELAYLOAD:api-ms-win-core-threadpool-legacy-l1-1-0.dll /DELAYLOAD:api-ms-win-core-processtopology-obsolete-l1-1-0.dll /DELAYLOAD:api-ms-win-core-kernel32-legacy-l1-1-0.dll /DELAYLOAD:d3d12.dll /DELAYLOAD:d3d11.dll /DELAYLOAD:dxgi.dll ${delayload_dml})
if (EXISTS ${dxcore_header})
target_link_options(winml_dll PRIVATE /DELAYLOAD:ext-ms-win-dxcore-l1-*.dll)