Thank you. I wish I had come across this series way way sooner!
@Stradigos3 ай бұрын
How do you do this with Boost? I cannot figure that out. I'm using FetchContent to get it, and it configures it, but find_package does not work on it.
@manuelpagliuca4 ай бұрын
Thanks for this playlist man, really helpful!
@binaryvixen8994 ай бұрын
Hand in-lining this stuff is tempting when a project is first starting, but as it grows it just turns into what you said: spaghetti code
@ramanverma76674 ай бұрын
thanks for the video, can you share github link for exact same tutorial
@sonulohani4 ай бұрын
Thanks for the awesome tutorial
@hamiltonw32425 ай бұрын
may I know how to install the libraries to /opt like you mentioned? any best practices ?
@harshadgaikwad58845 ай бұрын
thanks a lot man
@kumarutkarsh12486 ай бұрын
cant able to follow along because you have taken your own project which i have no idea about
@edvardasvysniauskas73777 ай бұрын
Thanks for making this, really helped understanding how to use header only libraries in other projects.
@cidgianni7 ай бұрын
Why should I use cMake in my C++ projects? I'm a beginner programmer. Thanks.
@user-ed1nw6vr8n4 ай бұрын
Usually not necessary if your c++ project only target one platform. The purpose of cmake is to simplify the build process between multiple platforms. You can write cmake file and it would work on all major operating systems
@oliviercloud53938 ай бұрын
Amazing tutorial series man !!! You’re awesome thanks !!!!!
@kuijaye8 ай бұрын
Althiugh not beginner friendly but really useful and great tutorial for those who want to deep diver and understand cmake better
@hosseinbeiranvand71699 ай бұрын
great video to learn cmake deeply! thanks a lot!
@user-ou2im6bh6h10 ай бұрын
Your videos are so good, help me understand cmake a lot , huge thanks, please keep working
@ble-rex863110 ай бұрын
Hello, I aws hoping to discuss a problem I am havign with ExternalProject_Add because I am trying to use it on an sdk, called MAVSDK. The sdk needs to be downloaded locally in debug mode. However, I am having all sorts of problems, as soon as I think I solved a problems, I get another one. It's very strange becuase the errors are not very descriptive at all. I was hoping to get some guidance on this with some further discussion if possible please, would be greatly appreciated!!
@larsmuldjord990710 ай бұрын
9:08 You're a brave man. :D Those who know know what I mean. Bash wouldn't be so graceful to actually ask. I know someone who did this as root on a server in "/" (not me). That was a long weekend. Thank you for the video.
@illiadubrovin899511 ай бұрын
superbuild should be first think you hear and learn about cmake.........
@serhankars11 ай бұрын
Does cmake look for modules only in the source directory? In a stackoverflow post I came across says Fİnd<package_name>.cmake must be located in project. But I can not see this information in Cmake's find_package documentation. Also you did not explain that way either but files were in the project directory/cmake. Thanks btw, really great video. I have subscribed and will watch all of your other videos.
@silverqx Жыл бұрын
I'm at 2:58 in your video and I can tell already that it's a super helpful video thx 👌
@jeffersoncarpenter2 Жыл бұрын
I also use a custom installation prefix, it's really useful. Exactly the same reasons, it's a lot cleaner not to have everything piled into /usr/local and I can blow it away fearlessly.
@EvanMcLaren Жыл бұрын
I don't think I'll ever forgive my professors for throwing me into C and C++ without preparing me for all the CMake issues I'd encounter, or even explaining basically what the h CMake is.
@kartikpodugu Жыл бұрын
what if we do not have config.cmake files itself ?
@tljstewart Жыл бұрын
Jeff hope your doing well, where you been man, your videos are brilliant! Comeback
@jeffersonamstutz Жыл бұрын
I’m still alive! 😅 I’ve had too many good things going on in life, but as some things start to clear I certainly want to get back to making videos again. Thanks for the support!
@MS-ib8xu Жыл бұрын
no offense, but all over the place...
@Sam-iy1kv Жыл бұрын
great content ! wish can learn more cmake from u ! thank u
@joseloeza371 Жыл бұрын
Excelente video thanks
@MegaHatef Жыл бұрын
Thank you, sir! the tutorial is so clear and informative.
@oguzynx Жыл бұрын
Hey Jeff, I have a question. You added "target_link_libraries(${PROJECT_NAME} PRIVATE app_external_deps)" in the cmake on the src. But actially app_external deps is for the ones in lib folder. Isn't it more logical to put this line in the cmake on the external directory?
@oguzynx Жыл бұрын
Bro you can use terminal from vscode too. So we can see how the directories look....
@nithins1212 Жыл бұрын
thanks for these💐❤️
@yyzpro9460 Жыл бұрын
Just face it - CMake SUCKS !!!
@rockywong3664 Жыл бұрын
I hope it's not the last tutorial episode.
@dagoberttrump9290 Жыл бұрын
Can you make a video on how you write a FindModule? There's few good sources out there..
@kebabimpaler Жыл бұрын
I have used external project for many many years. I had no idea that it was capable of doing the half of what you just outlined thank you lol.
@dagoberttrump9290 Жыл бұрын
Awesome tutorials! Really valuable for a cmake beginner like me. Could you make a video on the interplay between git submodules and cmake? I have trouble finding the right solutions for including dependent modules... should I include them via git submodule or have cmake find the package or both? How do you handle this?
@alvarobyrne Жыл бұрын
Thank you for this and the whole cmake playlist!!!!
@xephyr4172 жыл бұрын
Thank you for making a good tutorial. Most people make "getting started with CMake" tutorials that just show a bunch of code, but none of the principles behind it. This is excellent. 😁
@shadon_official25102 жыл бұрын
Thanks for this video!
@yy848692 жыл бұрын
Thanks
@danielt55422 жыл бұрын
Hi @jeffersonamstutz, how can I link a library built from ExternalProject_Add into an executable? the target name given by ExternalProject_Add is of type UTILITY and cannot be linked directly using target_link_libraries(app libA)
@jeffersonamstutz2 жыл бұрын
To get external dependencies into your build you will need find_package(), but ExternalProject runs at build time which is after when CMake would search for it during configuration. The best thing to do is to write your project that builds only itself and maintain a separate CMake superbuild that can string together ExternalProject invocations. You certainly could mix these in the same directory structure by only invoking your executable’s CMake from a parent folder containing the superbuild. You would do this by having the ExternalProject invocation bypass the download step and point directly to your local source directory. Be careful though - it is bad practice to always assume overly rigid dependency handling by requiring that you can only use the deps built locally.
@intuitivesolutionsllc76182 жыл бұрын
Did you make more? lol
@OptimusVlad2 жыл бұрын
good tips
@jamesdhanoa75992 жыл бұрын
vcpkg package manager mentions to add this in CmakeList.txt set(CMAKE_TOOLCHAIN_FILE "<VCPKG_ROOT>/scripts/buildsystems/vcpkg.cmake") is CMAKE_TOOLCHAIN_FILE an alternative to CMAKE_PREFIX_PATH It does not work though, prefix_path is working for me
@jamesdhanoa75992 жыл бұрын
This has been so helpful
@troytaillefer21622 жыл бұрын
Hi @Jefferson Amstutz great video thanks I have a question about Configf.cmake.in file at kzfaq.info/get/bejne/e7SYh6SSqeCWZGQ.html I am just using the the package config file generated by install(EXPORT command it works well except for transitive package deps it adds them to link command but doesn't do a find_dependency to on them. Does check_required_components add the needed find_dependency commands or do I need to add them myself in the Config.cmake.in file ?
@jeffersonamstutz2 жыл бұрын
This is something I haven’t messed around with enough. Historically I have always done find_dependency() myself in the config, but it would be great if that could be auto generated.
@petrasvestartas43592 жыл бұрын
There is too big of a jump between the simple example and the one showed in the last 6 minutes. I suggest to show how to download simple libraries like boost and eigen, your shown workflow would not work there. Each library can be highly different and it is not so straight forward... For Boost: ######################################################################## # Boost ######################################################################## if (WIN32) set(BOOST_BOOTSTRAP_CMD ${CMAKE_CURRENT_BINARY_DIR}/boost-prefix/src/boost/bootstrap.bat) set(BOOST_BUILD_CMD ${CMAKE_CURRENT_BINARY_DIR}/boost-prefix/src/boost/b2.exe) elseif (UNIX) set(BOOST_BOOTSTRAP_CMD ${CMAKE_CURRENT_BINARY_DIR}/boost-prefix/src/boost/bootstrap.sh) set(BOOST_BUILD_CMD ${CMAKE_CURRENT_BINARY_DIR}/boost-prefix/src/boost/b2) endif () ExternalProject_Add(boost GIT_REPOSITORY github.com/boostorg/boost.git GIT_TAG boost-1.78.0 CONFIGURE_COMMAND ${BOOST_BOOTSTRAP_CMD} BUILD_COMMAND ${BOOST_BUILD_CMD} --prefix=${CMAKE_INSTALL_PREFIX} -sZLIB_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib --without-python address-model=64 variant=debug,release link=shared runtime-link=shared threading=multi install BUILD_IN_SOURCE 1 INSTALL_COMMAND "" ) For Eigen: ######################################################################## # Eigen ######################################################################## ExternalProject_Add(eigen GIT_REPOSITORY gitlab.com/libeigen/eigen.git GIT_TAG 3.4.0 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} )
@Holzf43ller2 жыл бұрын
Hey there, these Videos are very nice. But i have a question. Me as a beginnera, had to learn cmake first. After that i could understand your videos. At one point you are looking at a real life project but it makes someone like me none the wiser. I had to learn about targets, executables, includes and so on first. and after about a year of programming "with" cmake and clion coming bet ad it starts to make sence. So it wanted to ask if this way is intentional and u didnt want to reach cmake newbies/beginners with your series. then it makes total sense. but if you want to catch the newbie, maybe think about a basic video where you teach how to cmake a more or less complicated folder structure with different kinds of libraries, seperated headders and sources and so on. for me it this would all be lost effort, but for others thhis could be a chance to save days of working and trying out cmake just to run in a configuration with one "include" and one "src" folder. and understanding what happens. nevertheless, what i see is very nice. sincerely, tom