首页 > 解决方案 > 使用 CMake 包括 Facebook/Folly

问题描述

我在Facebook/Folly里面CMakeLists.txt包括如下:

FetchContent_Declare(
  DoubleConversion  
  GIT_REPOSITORY https://github.com/google/double-conversion.git
)
FetchContent_MakeAvailable(DoubleConversion)
message("DoubleConversion Library = " ${DOUBLE_CONVERSION_LIBRARY})
message("DoubleConversion Include Directory = " ${DOUBLE_CONVERSION_INCLUDE_DIR})

FetchContent_Declare(
  glog
  GIT_REPOSITORY https://github.com/google/glog.git
)
FetchContent_MakeAvailable(glog)

FetchContent_Declare(
  zstd
  GIT_REPOSITORY https://github.com/facebook/zstd.git
)
FetchContent_MakeAvailable(zstd)

FetchContent_Declare(
    snappy
  GIT_REPOSITORY https://github.com/google/snappy.git
)
FetchContent_MakeAvailable(snappy)

FetchContent_Declare(
  libunwind
  GIT_REPOSITORY https://github.com/libunwind/libunwind.git
)
FetchContent_MakeAvailable(libunwind)

FetchContent_Declare(
  folly  
  GIT_REPOSITORY https://github.com/facebook/folly.git
)
FetchContent_MakeAvailable(folly)

message("Glog Library = " ${GLOG_LIBRARY})
message("Glog Include Directory = " ${GLOG_INCLUDE_DIR})

这些依赖关系是从相关文件中提取的。

但是,我不确定DWARF, 和LibUnwind库是什么意思。他们各自的 GitHub 存储库位于哪里,以便我可以将它们包含在上述模式中?

在系统范围内安装库对我来说不是一个选项,因此我想在构建时提取它们。

标签: facebookcmake

解决方案


推荐阅读