CLion 中使用 vcpkg C++ lib管理器

CLion 中使用 vcpkg

打开 Toolchains 设置 (File > Settings on Windows and Linux, CLion > Preferences on macOS), 并打开 CMake 设置 (Build, Execution, Deployment > CMake)。 最后在 CMake options 中添加以下行:

-DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake

遗憾的是,您必须手动将此选项加入每个项目配置文件中。

 

posted @ 2022-05-10 08:55  bH1pJ  阅读(63)  评论(0编辑  收藏  举报