vcpkg/ports/libtorch/fix-sleef.patch

21 lines
757 B
Diff

--- a/aten/src/ATen/CMakeLists.txt
+++ b/aten/src/ATen/CMakeLists.txt
@@ -778,7 +778,7 @@
list(APPEND ATen_THIRD_PARTY_INCLUDE ${CMAKE_BINARY_DIR}/include)
link_directories(${CMAKE_BINARY_DIR}/sleef/lib)
else()
- add_library(sleef SHARED IMPORTED)
+ add_library(sleef UNKNOWN IMPORTED)
find_library(SLEEF_LIBRARY sleef)
if(NOT SLEEF_LIBRARY)
message(FATAL_ERROR "Cannot find sleef")
@@ -786,7 +786,7 @@
message("Found sleef: ${SLEEF_LIBRARY}")
set_target_properties(sleef PROPERTIES IMPORTED_LOCATION "${SLEEF_LIBRARY}")
endif()
- list(APPEND ATen_CPU_DEPENDENCY_LIBS sleef)
+ list(APPEND ATen_CPU_DEPENDENCY_LIBS ${SLEEF_LIBRARY})
if(NOT MSVC)
set(CMAKE_C_FLAGS_DEBUG ${OLD_CMAKE_C_FLAGS_DEBUG})