IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    CMake: How to build external projects and use as imported targets

    Inhzus发表于 2023-12-01 12:15:31
    love 0
    Intro Q: ExternalProject or add_subdirectory/FetchContent when no download need? we use ExternalProject here to get maximum isolation between the thirdparty library and our codebase, especially because CMake scripts of our base project is quiet messy and customized and may pollute the thirdparty building if using add_subdirectory. There’re two steps to do: Use ExternalProject_Add to configure, build and install the dependency. Setup the dependency as an imported library for other targets to “link”.


沪ICP备19023445号-2号
友情链接