1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
Description: use system cpp-httplib instead.
Forwarded: not-needed
Index: pytorch/cmake/Dependencies.cmake
===================================================================
--- pytorch.orig/cmake/Dependencies.cmake
+++ pytorch/cmake/Dependencies.cmake
@@ -1687,8 +1687,9 @@ endif()
include(${CMAKE_CURRENT_LIST_DIR}/FlatBuffers.cmake)
# Include cpp-httplib
-add_library(httplib INTERFACE IMPORTED)
-target_include_directories(httplib SYSTEM INTERFACE ${PROJECT_SOURCE_DIR}/third_party/cpp-httplib)
+add_library(httplib SHARED IMPORTED)
+find_library(HTTPLIB_LIBRARY cpp-httplib REQUIRED)
+set_property(TARGET httplib PROPERTY IMPORTED_LOCATION "${HTTPLIB_LIBRARY}")
# Include nlohmann-json
add_library(nlohmann INTERFACE IMPORTED)
Index: pytorch/caffe2/CMakeLists.txt
===================================================================
--- pytorch.orig/caffe2/CMakeLists.txt
+++ pytorch/caffe2/CMakeLists.txt
@@ -783,6 +783,7 @@ if(NOT FMT_LIBRARY)
set_property(TARGET fmt PROPERTY IMPORTED_LOCATION "${FMT_LIBRARY}")
endif()
target_link_libraries(torch_cpu PRIVATE fmt)
+target_link_libraries(torch_cpu PRIVATE cpp-httplib)
torch_compile_options(torch_cpu) # see cmake/public/utils.cmake
|