diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake index 6ce4c679a42..e3d542c91b7 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) +list(APPEND FOLLY_LINK_LIBRARIES ${LIBUNWIND_LIBRARIES}) +list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBUNWIND_INCLUDE_DIRS}) +if (LIBUNWIND_FOUND) + set(FOLLY_HAVE_LIBUNWIND ON) +endif() + find_package(LibLZMA MODULE) set(FOLLY_HAVE_LIBLZMA ${LIBLZMA_FOUND}) if (LIBLZMA_FOUND) @@ -155,12 +162,6 @@ if (PYTHON_EXTENSIONS) find_package(Cython 0.26 REQUIRED) endif () -find_package(LibUnwind) -list(APPEND FOLLY_LINK_LIBRARIES ${LIBUNWIND_LIBRARIES}) -list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBUNWIND_INCLUDE_DIRS}) -if (LIBUNWIND_FOUND) - set(FOLLY_HAVE_LIBUNWIND ON) -endif() if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") list(APPEND FOLLY_LINK_LIBRARIES "execinfo") endif ()