#How should I setup third-party dependencies in C++?

1 messages · Page 1 of 1 (latest)

wraith knot
#

Hello guys, I was just wondering how I should link external libraries, mainly for graphics programming with OpenGL (GLFW and GLAD).

My first thought was to use CMake and put in the source code of the external libraries into my project, and use them like that. Another idea was to use a package manager like Conan to download the libraries and use CMake to set them up. Thirdly, I believe I could use FetchContent and CMake to set them up for me without me having to download source manually.

If anyone could recommend me a way from these or any other and why, that would be awesome!

frank spokeBOT
#

When your question is answered use !solved or the button below to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

glacial folio
#

use a proper package manager and forget about it, for development it’s fine

pearl sleet
#

Cmake fetch content is also a good option

#

Consciously learning cmake first would be beneficial. Building from source also isn't that hard either, eventually the steps all look the same.

wraith knot
wraith knot
# pearl sleet Cmake fetch content is also a good option

that is an option i thought of before, but my main gripe with that is offline builds dont work and if the release isn't stable is it not as professional. i am not building anything for a company or professionally though, just a small hobby project so i dont really think that matters

pearl sleet
wraith knot
#

and what about a package manager, is it professional to use it? as i stated in another reply it introduces a new dependency, the package manager

#

but it really helps to get packages, from at least what i researched

pearl sleet
#

take for example python which has pip as package manager, there's really only one standard way to do things and it's most recommended as opposed to getting wheels yourself. compare that to c++, there's multiple ways to do everything, there's no standard/professional WY

#

just use the package manager. you can setup your project later so it can be built by people without package manager, it's not a dependency. your research will only take you so far, best to just try things out and judge them yourself

frank spokeBOT
#

This question is being automatically marked as stale.
If your question has been answered, type !solved.
If your question is not answered feel free to bump the post or re-ask.
Take a look at !howto ask for tips on improving your question.

wraith knot
#

!solved

frank spokeBOT
#

Thank you and let us know if you have any more questions!

This thread is now set to auto-hide after an hour of inactivity

stark glen
#

And yes package managers are professional to use