I haven't used them, and I probably won't, you also have to keep in mind that for cpp you usually need to modify that library. But people that use them like them
well that works only on linux, so if you can link libraries easily and you only want to use linux probably, but libraries usually come with cmake already, so for make you would need to generate your make from that and link to it, idk if that's hard or not but that will probably determine if it is a good alternative
GNU Make technically has a Windows build, but it's a pain to set up to be a real build system for Windows for various reasons. Cmake is nice because it abstracts the main things you would want to regularly do in a Makefile and makes it cross platform compatible. That comes with the downside of making it difficult to know exactly what is going on under the hood, but makes the project set up and upkeep much easier from my experience.
Approach with modifying third-party libraries sounds awful. Imagine finding out that your lib has vulnerability. And you cant even update it due to merge conflicts 💀💀💀
Who.. in the world uses the cmake GUI.. it's like using git gui client :') Also, why do you put your libraries in an 3rd party folder / external and not use git submodules? you get the same benefits but truly gain control over the version you're compiling and all and you don't have to push all that code to your repo, making it super lightweight to download
ok so first part of the comment yes 😂😂 for real that's a perfect comparison but people actually use that and from my experience they teach it like that in every university 😭😭 ok for the second part I have alreadt answered here: github.com/meemknight/ourCraft/issues/6 (also lol it's not light weight you still have to download dependences) also idk how I gain an extra benefit I still can put a repo as a third party
@@lowlevelgamedev9330 By lightweight i meant for the server hosting the repo lol, at the end of the day you're still limited in github For the dependencies, I use submodules basically to: 1. Keep track of the actual repository's link 2. Being able to easily update any time needed, not having to re-download and move the folder, just git submodule update 3. Pinning the actual submodule to a specific commit, even if i clone it again i'm sure i'll get the same behaviour (assuming the toolchain didn't break something)
I could do that but it will take some time probably so untill than, I have a video called easiest opengl configuration and you can just steal the cmake configuration from there and see how it's made, also my cmake setup that I linked in the vid already has opengl so you cal also use that 💪
Hi, is there any way you know to disable warnings from third_party libraries? I like to compile with a lot of warnings enabled, but I can't control third_party code. I tried using the SYSTEM specifier to target_link_libraries but it didn't work. It would also be more convenient a solution that fits add_subdirectory(), as it's easier to use to add libraries. The issue is in files from my project that include third_party headers, and in the headers they have warnings. I did not want to surround every include with #pragma push and #pragma pop thought...
i think if it is so easy to get yourself into pitfalls requiring reinstalling your entire dev setup (VS + CMake) - the tool is simply not worth it. the good news is that there are better tools (i use XMake in my most recent pet project, but there are also Buck and Bazel which both are _okay_), but much like JavaScript, CMake became so bloody popular, it is the only tool with good IDEs integration, unfortunately
@lowlevelgamedev9330 Linking libraries sucks until it clicks. I've come into just including the source files to my libraries (I don't use many). You can check out the repo for the Gunslinger framework for an example.
hm yes I think I could have done better, but maybe you can give some constructive feedback and tell me (in another new comment so youtube notifies me and I can see it) so I can do it better next time
Sorry But This is a terrible project management strategy. If you want your sovereign libraries to be isolated, you need to link a specific Tag to the folder with gitsubmodule. OR use a Fetch library like CPM.cmake. In this way, include the relevant specific version in your project during cmake configuration Also, instead of changing libraries, it is better to create and use extensions of the classes.
idk why I would do that, I said my points and you just said that I need to do something specific without saying what's the benefit, for a big company it's probably better to do it like you say but for personal projects big or small I find it better to do it my way + there are gamedev companies that do exactly what I do (there is one big one in particular that I know for sure but idk if I can talk about that because of their rules)
If you don't need full control under the core libraries for your project then yeah. But it's fairly common to have a modified version of a library in your project, so in order to be consistent you just drop them all there. We do that a lot with Lua!
here the little catch: i use zig to build C 🗿🍷
yo for real? that sounds so cool let's go 💪
zig cc 🗿🍷
based
uhh... now the c++ tutorial series.
what do you think about vcpkg or any similar library manager for c++?
I haven't used them, and I probably won't, you also have to keep in mind that for cpp you usually need to modify that library. But people that use them like them
Thank you so much for your inspiring videos. The explanations and reference code are helping many people figure out how to get started. :)
thx bro 💪
Hey, I wonder why when std::cout is execuded in your code it ends up as segmentation fault when trying to run it
The best way to use cmake is to not use it at all because it sucks
Is Makefile a good alternative?
well that works only on linux, so if you can link libraries easily and you only want to use linux probably, but libraries usually come with cmake already, so for make you would need to generate your make from that and link to it, idk if that's hard or not but that will probably determine if it is a good alternative
@@lowlevelgamedev9330 I tell to chat gpt to generate my Makefile 😂 and yes It works pretty well and I use flags to debug, like -g -Wall...
Why TH-cam keeps deleting my comments 😡😡@@lowlevelgamedev9330
GNU Make technically has a Windows build, but it's a pain to set up to be a real build system for Windows for various reasons. Cmake is nice because it abstracts the main things you would want to regularly do in a Makefile and makes it cross platform compatible. That comes with the downside of making it difficult to know exactly what is going on under the hood, but makes the project set up and upkeep much easier from my experience.
With what do you edit your vids? thx
davinci resolve
i be using the cmake extensions in vscode its pretty aight
yes it's kinda the same thing so that's an option if you want vs code instead of vs
Do you know how to link external libraries in Cmake with vscode? Im Struggling a lot and it keeps throwing errors...
Approach with modifying third-party libraries sounds awful. Imagine finding out that your lib has vulnerability. And you cant even update it due to merge conflicts 💀💀💀
yeah I know but that's very common for cpp. You can make a fork of that library if you want
c++ build systems generally suck
yup :((
Who.. in the world uses the cmake GUI.. it's like using git gui client :')
Also, why do you put your libraries in an 3rd party folder / external and not use git submodules? you get the same benefits but truly gain control over the version you're compiling and all and you don't have to push all that code to your repo, making it super lightweight to download
ok so first part of the comment yes 😂😂 for real that's a perfect comparison but people actually use that and from my experience they teach it like that in every university 😭😭
ok for the second part I have alreadt answered here:
github.com/meemknight/ourCraft/issues/6
(also lol it's not light weight you still have to download dependences)
also idk how I gain an extra benefit I still can put a repo as a third party
@@lowlevelgamedev9330 By lightweight i meant for the server hosting the repo lol, at the end of the day you're still limited in github
For the dependencies, I use submodules basically to:
1. Keep track of the actual repository's link
2. Being able to easily update any time needed, not having to re-download and move the folder, just git submodule update
3. Pinning the actual submodule to a specific commit, even if i clone it again i'm sure i'll get the same behaviour (assuming the toolchain didn't break something)
Hi! I watched your tutorial for cmake, but can't set it up with OpenGL. Can you please make a video about that?
I could do that but it will take some time probably so untill than, I have a video called easiest opengl configuration and you can just steal the cmake configuration from there and see how it's made, also my cmake setup that I linked in the vid already has opengl so you cal also use that 💪
Hi, is there any way you know to disable warnings from third_party libraries?
I like to compile with a lot of warnings enabled, but I can't control third_party code. I tried using the SYSTEM specifier to target_link_libraries but it didn't work. It would also be more convenient a solution that fits add_subdirectory(), as it's easier to use to add libraries.
The issue is in files from my project that include third_party headers, and in the headers they have warnings. I did not want to surround every include with
#pragma push and #pragma pop thought...
nope, maybe chat gpt knows, I ignore warnings :)))
fix: use meson for god sake
...
i think if it is so easy to get yourself into pitfalls requiring reinstalling your entire dev setup (VS + CMake) - the tool is simply not worth it. the good news is that there are better tools (i use XMake in my most recent pet project, but there are also Buck and Bazel which both are _okay_), but much like JavaScript, CMake became so bloody popular, it is the only tool with good IDEs integration, unfortunately
I haven't even heared of XMake :))) I don't think most libraries will have support for it
@@lowlevelgamedev9330 you would be surprised 😉 it both has its own repo as well as supports vcpkg and Conan (and probably some more)
@@lowlevelgamedev9330well it has its own repository of dependencies. but is also supports vcpkg, conan and probably some more
I just do a build.bat with unity builds
that's actually a good way of doing it, the only problem is that it's hard to link to libraries :((( so that's why I don't do it like this
@lowlevelgamedev9330 Linking libraries sucks until it clicks. I've come into just including the source files to my libraries (I don't use many). You can check out the repo for the Gunslinger framework for an example.
super confusing video, ideal for the tutorial hell people. you youtube people could do better.
hm yes I think I could have done better, but maybe you can give some constructive feedback and tell me (in another new comment so youtube notifies me and I can see it) so I can do it better next time
what's so complicated about downloading the source code of a library and compiling it along with your project?
CMake? More like CMan
Premake is much better, guys, I tell ya
Hey there. 👋🧙🏾♂️
yo 💪
cmaek
cmek
Sorry But This is a terrible project management strategy.
If you want your sovereign libraries to be isolated, you need to link a specific Tag to the folder with gitsubmodule. OR use a Fetch library like CPM.cmake. In this way, include the relevant specific version in your project during cmake configuration
Also, instead of changing libraries, it is better to create and use extensions of the classes.
idk why I would do that, I said my points and you just said that I need to do something specific without saying what's the benefit, for a big company it's probably better to do it like you say but for personal projects big or small I find it better to do it my way + there are gamedev companies that do exactly what I do (there is one big one in particular that I know for sure but idk if I can talk about that because of their rules)
If you don't need full control under the core libraries for your project then yeah.
But it's fairly common to have a modified version of a library in your project, so in order to be consistent you just drop them all there. We do that a lot with Lua!
visual studio is shit
windows is shit
i use arch
and nvim
visual studio has the best debugger, also I have to use nsight good luck using that there :))
I use fedora and Vs code(the blue one) with Makefile
I use Arch and VScodium
@@lowlevelgamedev9330 can you make a video on using nsight?
yeah that tracks, arch user must tell everyone they use arch lol
Nice video and this is first comment
nice, always appreciate when people comment so early 💪
20 views in 3 mins, bro fell off