Remove problematic change for dxcore.lib

This commit is contained in:
Jeff Bloomfield 2020-04-25 18:48:07 -07:00
parent c49cc0c937
commit 8cc161aec6
3 changed files with 1 additions and 13 deletions

View file

@ -452,6 +452,7 @@ if (onnxruntime_USE_DML)
else()
add_dependencies(${target} RESTORE_PACKAGES)
target_link_libraries(${target} PRIVATE "${DML_PACKAGE_DIR}/bin/${onnxruntime_target_platform}/DirectML.lib")
target_compile_definitions(${target} PRIVATE DML_TARGET_VERSION_USE_LATEST)
endif()
target_link_options(${target} PUBLIC /DELAYLOAD:directml.dll /DELAYLOAD:dxgi.dll /DELAYLOAD:d3d11.dll /DELAYLOAD:d3d12.dll)
endfunction()

View file

@ -1,8 +0,0 @@
// CMake's CHECK_INCLUDE_FILE_CXX macro can't be used because it doesn't check the machine's SDK folder
#if not __has_include("dxcore.h")
#error
#endif
int main() {
return 0;
}

View file

@ -272,7 +272,6 @@ target_link_libraries(winml_adapter PRIVATE wil)
if (onnxruntime_USE_DML)
target_add_dml(winml_adapter)
endif(onnxruntime_USE_DML)
# add it to the onnxruntime shared library
set(onnxruntime_winml winml_adapter)
list(APPEND onnxruntime_EXTERNAL_DEPENDENCIES winml_adapter)
@ -350,10 +349,6 @@ add_dependencies(winml_lib_image winml_api_native_internal)
target_link_libraries(winml_lib_image PRIVATE dxgi d3d11 d3d12 wil winml_lib_common)
get_target_property(winml_lib_image_include_directories winml_lib_image INCLUDE_DIRECTORIES)
try_compile(has_dxcore "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/test_dxcore.cpp" CMAKE_FLAGS -DLINK_DIRECTORIES="${winml_lib_image_include_directories}")
if (has_dxcore)
target_link_libraries(winml_lib_image PRIVATE dxcore)
endif()
if (onnxruntime_USE_DML)
target_add_dml(winml_lib_image)