Using vcpkg as submodule with CLion Nova?
已回答
vcpkg recommends using vcpkg as a submodule for CMake project. (Source: https://vcpkg.io/en/getting-started.html)
I have some CMake projects already setup like this.
Within CLion Nova I found there is a vcpkg panel which looks nice. But it only prompts me to add a new vcpkg instance. I don't find any way to tell it to use an existing vcpkg instance. In this case the vcpkg instance is part of the project as a submodule, as recommended by the vcpkg docs.
Is there a way to do this? Or does CLion only support creating new vcpkg instances?
请先登录再写评论。
Hello!
If you already have vcpkg installed, provide the path to its location in the “Directory” field of the “Add Vcpkg” window.
The related web help article - https://www.jetbrains.com/help/clion/package-management.html.
Ah, I didn't realize you could do that. I thought it'd try to install vcpkg to the location I gave it.
Having just added it, CLion doesn't list all the packages I have described in my manifest file:
It's not showing `tinyxml2`. But it picked up my `gtest` dependency.
When I searched it up and clicked “Add to vcpkg” it added a new entry:
Looks like CLion doesn't recognize the shorthand version of specifying a dependency without a version constraint.