Skip to content

Commit

Permalink
Update 1.14.1-0003-cmake-dependencies.patch
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Apr 11, 2023
1 parent e2e663f commit 640b652
Showing 1 changed file with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
+# $<BUILD_INTERFACE:${microsoft_wil_SOURCE_DIR}/include>)
+#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
- $<BUILD_INTERFACE:${microsoft_wil_SOURCE_DIR}/include>)
-endif()
\ No newline at end of file
+endif()

0 comments on commit 640b652

Please sign in to comment.