vcpkg/ports/folly/fix-libunwind.patch

32 lines
972 B
Diff
Raw Normal View History

2024-10-30 04:33:44 +08:00
diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake
index 0702380..984c749 100644
--- a/CMake/folly-deps.cmake
+++ b/CMake/folly-deps.cmake
@@ -99,6 +99,13 @@ if (BZIP2_FOUND)
list(APPEND FOLLY_LINK_LIBRARIES ${BZIP2_LIBRARIES})
endif()
+find_package(LibUnwind)
+if (LIBUNWIND_FOUND)
+ set(FOLLY_HAVE_LIBUNWIND ON)
+ list(APPEND FOLLY_LINK_LIBRARIES ${LIBUNWIND_LIBRARIES})
+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBUNWIND_INCLUDE_DIRS})
+endif()
+
find_package(LibLZMA MODULE)
set(FOLLY_HAVE_LIBLZMA ${LIBLZMA_FOUND})
if (LIBLZMA_FOUND)
@@ -166,12 +173,6 @@ if (PYTHON_EXTENSIONS)
find_package(Cython 0.26 REQUIRED)
endif ()
-find_package(LibUnwind)
-if (LIBUNWIND_FOUND)
- set(FOLLY_HAVE_LIBUNWIND ON)
- list(APPEND FOLLY_LINK_LIBRARIES ${LIBUNWIND_LIBRARIES})
- list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBUNWIND_INCLUDE_DIRS})
-endif()
if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
list(APPEND FOLLY_LINK_LIBRARIES "execinfo")
endif ()