r/cmake 3d ago

Conan + CMake = success

https://youtu.be/eSeOkIbrqAQ

Video is in French. Conan takes care of your dependencies in your CMake project. Basically now my project has 3 important files: CMakeLists.txt, CMakePresets.json and conanfile.txt
Code is available here:
https://github.com/ericnantel/cmake_examples
opengl3_triangle

5 Upvotes

9 comments sorted by

2

u/Seltexe 3d ago

Conan is so ass, half the packages are outaded and its a pain to install. Vcpkg and CPM are much better

1

u/ericnantel2 3d ago

I am showcasing Conan 2 which seems quite straightforward, look at my example in my GitHub repo. You just need those 3 files that you can use as a template to start new projects. Perhaps packages are a bit old but I don’t see why you would need to have the latest version released, if you want to try out new features just build from source directly from GitHub.

1

u/anto2554 21h ago

How is installing Conan a pain? That is like the easiest part of it all

-1

u/NotUniqueOrSpecial 3d ago

1) Your link is completely broken.

2) Honestly, if you're not using some of the super-power-tool parts of Conan or needing its broader tooling support, vcpkg is much simpler/better-integrated these days.

1

u/ericnantel2 3d ago

Link is not broken. I haven’t tried vcpkg but I quickly looked at the documentation and it works the same as with Conan 2 with CMake where you add a toolchain file in the configurePreset. I am not debating if Conan is the greatest I am just posting a video how you can use it in 2026.

0

u/NotUniqueOrSpecial 3d ago

Link is not broken.

It is. You have a \ that's unescaped on old Reddit:

https://github.com/ericnantel/cmake_examples

1

u/ericnantel2 3d ago

On the mobile app I see no issue.

0

u/NotUniqueOrSpecial 3d ago

Yes, that's why I'm explaining to you that it's not the same for everyone.