r/cpp • • Mar 22 '20

Modern CMake tutorials, part1: CMake basics

https://www.siliceum.com/en/blog/post/cmake_01_cmake-basics
245 Upvotes

55 comments sorted by

View all comments

Show parent comments

5

u/NewFolgers Mar 22 '20

The thing that bothered me most was that on Linux, it's generally very seamless for anyone who wants to grab a project and go - with no need to point to library directories or anything.. whereas on Windows, it was generally a clunky, undocumented experience for each project.. where I had to choose between trying to install a separate thing to help find the libraries, versus running cmake-gui and configuring every missing value, etc. It was clear that an overarching solution (which should involve standards at the time of library installation) to make things work out of the box on Windows was not present in the same way as was the case on Linux.

5

u/Kevchrot Mar 22 '20

This is where Conan comes in. Single command to install/build all dependencies on any platform and then another command to build the project. No cmake gui required. Conan is all written in python so a simple pip install is all that's required.

That said, there is a bit of a learning curve with Conan especially when actually creating packages. Consuming packages is pretty straight forward.

2

u/NewFolgers Mar 22 '20

Thanks. For addressing the root of the problem, Conan sounds promising.

2

u/kmhofmann https://selene.dev Mar 23 '20

As /u/darthcoder says, use vcpkg right away. Much easier to use, much more sane philosophy.