Using Third Party Libraries Like RayLib in Your Project with CMake

preview_player
Показать описание
So, you've mastered compiling multi-file source-code into a program (binary). Congratulations. However, if you're going to write larger useful software, then you're going to need third-party libraries.

This video covers how to link third-party libraries into your project using CMake.

Click the following link for a summary (and to download the source code):

Want to learn more CMake? Click the following link:

#programming #tech #softwaredevelopment #cmake #cpp #cpptutorial #cmaketutorial
Рекомендации по теме
Комментарии
Автор

You're a complete lifesaver.
I haven't jumped into CMake until recently and it really feels like a black box. Makefiles were much simpler to use, but oh well.
It takes time to learn all of this.

botchedaledrugikanal
Автор

Amazing! you solved a week of struggling that no one else could fix! Thanks sooo much!!

dcdfmbf
Автор

Ugh thank you sir. Spent 2 days dealing with vcpkg issues and of course there's a much more simple way 😅. Much appreciated!

killacam
Автор

Huge thanks... A little something for the algorithm. I hope more people can find you. This was very helpful

Artistic_Nyungu
Автор

I'm struggling to learn CMake. I have questions about why you did certain things. Thanks in advance for your time. 1) Since you used ${PROJECT_NAME} for add_executable(), apparently CMake allows a target to have the same name as a project, but that confuses me since now two different things have the same name, and the target_link_libraries() looks like it's associating raylib with the project, but I guess it's associating it with the target that happens to have the same name as the project. Why do it that way? 2) The project fetches raylib which I assume includes compiled code (either a static or dynamic/shared lib) since you don't reference raylib source files. Where exactly will the lib file be such that the build will find it?

stevenbroshar
Автор

Thanks a lot, dude. This really helped me out

rodrigozaldivaralanis
Автор

life saver, thanks! Now the next problem is to fix the LSP of my editor hahaha

kevinmarques
Автор

thank you so much for the video, works perfectly, a question is how do you go about finding the correct URL for these libraries? I tried to do the same for ImGui and I get a 404 error code when fetching it.

imxande
Автор

Hi Sir, I want to set window icon. Would you share how to set an icon on game window?

N.G.Dreamer
Автор

how can i do this with multiple files(i.e. having a main.cpp and a window.cpp etc) i tried everything but everytime it says "undefined reference to `InitWindow'" and other function names

accountprincipale