From 640b6528d1f6fdfc03ea8e8d398ef66b5b09d955 Mon Sep 17 00:00:00 2001 From: mayeut Date: Tue, 11 Apr 2023 22:28:04 +0200 Subject: [PATCH] Update 1.14.1-0003-cmake-dependencies.patch --- .../1.14.1-0003-cmake-dependencies.patch | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/recipes/onnxruntime/all/patches/1.14.1-0003-cmake-dependencies.patch b/recipes/onnxruntime/all/patches/1.14.1-0003-cmake-dependencies.patch index e53d2eb3d6342b..13023aede480aa 100644 --- a/recipes/onnxruntime/all/patches/1.14.1-0003-cmake-dependencies.patch +++ b/recipes/onnxruntime/all/patches/1.14.1-0003-cmake-dependencies.patch @@ -9,3 +9,43 @@ ) #Here we support two build mode: +@@ -296,6 +296,10 @@ namespace std { using ::getenv; } + target_compile_options(flatc PRIVATE /FI${CMAKE_BINARY_DIR}/gdk_cstdlib_wrapper.h) + endif() + endif() ++else() ++ if(NOT TARGET flatbuffers::flatbuffers) ++ add_library(flatbuffers::flatbuffers ALIAS flatbuffers::flatbuffers_shared) ++ endif() + endif() + + if (onnxruntime_BUILD_UNIT_TESTS) +--- a/cmake/external/wil.cmake ++++ b/cmake/external/wil.cmake +@@ -11,12 +11,18 @@ FetchContent_Declare( + ) + #We can not use FetchContent_MakeAvailable(microsoft_wil) at here, since their cmake file + #always executes install command without conditions. +-FetchContent_Populate(microsoft_wil) +-if(NOT wil_FOUND) ++#FetchContent_Populate(microsoft_wil) ++#if(NOT wil_FOUND) ++# add_library(WIL INTERFACE) ++# add_library(WIL::WIL ALIAS WIL) ++# ++# # The interface's include directory. ++# target_include_directories(WIL INTERFACE ++# $) ++#endif() ++if(WIN32) ++ FetchContent_MakeAvailable(microsoft_wil) ++else() + add_library(WIL INTERFACE) + add_library(WIL::WIL ALIAS WIL) +- +- # The interface's include directory. +- target_include_directories(WIL INTERFACE +- $) +-endif() +\ No newline at end of file ++endif()