Skip to content

Commit 755f28a

Browse files
Changming Sunashrit-ms
authored andcommitted
Avoid compiling wil on non-Windows platforms (#23675)
### Description Avoid compiling wil on non-Windows platforms ### Motivation and Context To resolve an issue reported in #23661 (comment)
1 parent d8576bf commit 755f28a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

cmake/external/onnxruntime_external_deps.cmake

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -537,11 +537,13 @@ endif()
537537

538538
include(external/eigen.cmake)
539539

540-
if(onnxruntime_USE_VCPKG AND WIN32)
541-
find_package(wil CONFIG REQUIRED)
542-
set(WIL_TARGET "WIL::WIL")
543-
else()
544-
include(wil) # FetchContent
540+
if(WIN32)
541+
if(onnxruntime_USE_VCPKG)
542+
find_package(wil CONFIG REQUIRED)
543+
set(WIL_TARGET "WIL::WIL")
544+
else()
545+
include(wil) # FetchContent
546+
endif()
545547
endif()
546548

547549
# XNNPACK EP

0 commit comments

Comments
 (0)