mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-16 21:00:14 +00:00
### Description 1. `onnxruntime_fetchcontent_makeavailable` works around unconditional install commands so that can be used instead of `FetchContent_Populate` 2. This dependency is Windows specific, mark it as such. ### Motivation and Context 1. This simplifies `cmake/external/wil.cmake` not to do anything specific wether WIL was fetched or found 2. Given it's specific to Windows, it might not be available on other OS in specific air-gapped environment such as [conan-center-index](https://github.com/conan-io/conan-center-index). This allows downstream builds not to require specific patches for something not required by the build in the first place.
16 lines
436 B
CMake
16 lines
436 B
CMake
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
# Licensed under the MIT License.
|
|
set(WIL_BUILD_PACKAGING OFF CACHE BOOL "" FORCE)
|
|
set(WIL_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
|
|
|
FetchContent_Declare(
|
|
microsoft_wil
|
|
URL ${DEP_URL_microsoft_wil}
|
|
URL_HASH SHA1=${DEP_SHA1_microsoft_wil}
|
|
FIND_PACKAGE_ARGS NAMES wil
|
|
)
|
|
|
|
if(WIN32)
|
|
onnxruntime_fetchcontent_makeavailable(microsoft_wil)
|
|
set(WIL_TARGET "WIL::WIL")
|
|
endif()
|