Cmake Find Package

Cmake Find Package

1. Better CMake Part 4 -- find_package() Basics

Topic time stamps:

0:00 - Intro
0:47 - Motivation
2:20 - find_package() overview
3:35 - VERSION
4:23 - QUIET
6:06 - Imported target names matter!
7:39 - Configs vs. modules
7:54 - Talk through a config example
8:55 - What is a config anyway?
11:08 - Talk through a module example
14:39 - Tell CMake how to find a config
17:52 - Don't panic when find_package() failes
22:13 - Environment organization matters!
22:43 - Wrap up



2. CMake Tutorial EP 9 | find_package modules and config options (2/2 of find libs)

Talking more about libraries and other ways of having your CMake find them by using the find_package option.

UPDATE: I will be redoing this episode before making episode 10. I believe it can be better and I have learned some things since the creation of this tutorial. If you find it helps, great, but I personally think it came out much more confusing than it needs to be. edit: nevermind I just made episode 10 instead

0:00 intro
1:19 GLEW
3:00 expanding on find_library()
5:32 find_package() on Windows
15:24 find_package() on Linux
18:25 me begging during intermission
18:40 making our c++ code work
20:09 rendering an opengl triangle src walkthrough
24:35 outro

full CMake playlist:


for business inquiries: [email protected]

Thanks for coming to the channel to check out a video on Code, Tech, and Tutorials.
You can support this channel on Patreon:

3. CMake Tutorials - 2. Add 3rd party library with find_package

Demonstration of using find_package to include the freetyle library into our initial CMake project.

#cmake #cpp #programming #code #freetype #emacs

In this video, we will introduce some strategies of using CMake including: shared link vs static link, how to set variables, how to set cmake options and some other small tips of using CMake efficiently.

Related videos

introduce the cmake and it’s main concepts by simple demo 1:45s

example of using the find_packages, shared link vs static link

integrate other programs into your program by cmake 4:00

how to generate .cmake file used by other projects

src dir, build dir and install dir of the cmake

use cmake to compile MPI or CUDA program


repo for the tutorial

5. CMake Tutorial EP 1 | Understanding The Basics

full CMake playlist:

Find me, support me:
One time donations:
Shop via my Amazon Affiliates Link:
Business inquiries: [email protected]

Thanks for coming to the channel to check out a video on Code, Tech, and Tutorials.

6. CMake: How to Build and Package C/C++ Projects

In this workshop we will learn about CMake, a build generation tool used to build cross platform C/C++ projects. If you are struggling to start your own C/C++ journey, and don’t know how to structure a C/C++ project, then this workshop is for you!

Source code:
CppCon 2017 Mathieu Ropert Using Modern CMake Patterns to Enforce a Good Modular Design:

7. CMake Tutorial EP 8 | find_library(...) (part 1/2 of find lib)

Find the libraries, wherever they may be. This should help you figure out how to use external libraries that are on your computer, but not within your project. Note that it does find them if they are in your project too unless you tell it not to.

full CMake playlist:


Thanks for coming to the channel to check out a video on Code, Tech, and Tutorials.
You can support this channel on Patreon:
Please leave your feedback or questions in the comments!

8. Better CMake Part 8 -- Package Configs for Normal Libraries

Time stamps:

0:00​ - Intro
1:42​ - Overview of example project
4:45 - Build vs. install interfaces (generator expressions)
8:39 - Using GNUInstallDirs for install destinations
11:23 - Installing targets + exports
14:57​ - Namespace your exports
15:51​ - Exports destination
17:08​ - Namelinks (for Unix platforms)
18:20​ - Installing headers
20:19 - Generating the package config file
22:32 - Separate config generation vs. install
23:51 - Processing the config input file
26:41 - Creating a version file (optional)
27:47 - Summary
28:57​ - Wrap up



9. Cmake Find_package part2 #12 [بالعربى ]

article :
SQLite code :
fmt :

10. SDL2 and SDL_image CMake Package Setup (MinGW, VScode, Windows)


GitHub Repo:

00:21 Installing MinGW
03:08 Installing Git
04:31 Installing CMake
05:17 Installing SDL //Make sure this is in an admin cmd
07:36 Installing SDL_Image //Make sure this is in an admin cmd
10:30 Setting up the Project Dir
11:07 Installing VSCode Extensions
11:20 Writing the CMakeLists.txt
18:21 Copying Basic Files from the Example GitHub Repo
19:19 Copying dlls
20:24 Fixing an Error in CMakeListst.txt and Installing another VSCode Extension
20:37 Setting up and using the CMake Tools Extension
21:42 Installing, Setting up, and Using a Debugging VSCode Extension

Helpful info for selecting a MinGW compiler version

11. How to make cmake find installed packages (2 Solutions!!)

How to make cmake find installed packages?

Helpful? Please support me on Patreon:

With thanks & praise to God, and with thanks to the many people who have made this project possible! | Content (except music & images) licensed under cc by-sa 3.0 | Music: | Images: & others | With thanks to user Tyler (, user Tomasz Jakub Rup (, user Knud Larsen (, and the Stack Exchange Network ( Trademarks are property of their respective owners. Disclaimer: All information is provided "AS IS" without warranty of any kind. You are responsible for your own actions. Please contact me if anything is amiss at Roel D.OT VandePaar A.T

12. C++Now 2017: Daniel Pfeifer “Effective CMake

Presentation Slides, PDFs, Source Code and other presenter materials are available at:

While CMake has become the de-facto standard buildsystem for C++, it's siblings
CTest and CPack are less well known. This talk gives a lightspeed introduction into these three tools and then focuses on best practices on building, testing, and packaging. We will learn how to manage dependencies and export our libraries in such a way that they can be easily used by our clients. We will crosscompile for different platforms and run our tests in an emulator.
We will analyze code coverage and perform static and dynamic code analysis.

Daniel is an Electrical Engineer turned into a Computer Scientist. He works as C++ developer, system architect, trainer and guru for C++ and CMake. Daniel is the founder of the C++ user group in Munich. He is also an active contributor to CMake and knows some undocumented internals.

Videos Filmed & Edited by Bash Films:



13. Using CMake's CTest to create and run all your C++ tests

In this video, we will learn how to use CMake's "add_test(...)" command to integrate your C++ project's tests into CMake. For more information on the CMake commands used, the test project in the video, and more remarks, check the links below!

Using CMake's CTest Post:
Integrating GTest Into CMake:

0:00 - Intro
0:21 - Test Project Context
3:33 - Running Tests Manually
4:28 - Motivation For Using CTest
4:57 - Using enable_testing() and add_test(...)
10:30 - Bye Bye!

Thank you very much for watching! If you have any questions, feedback, or suggestions, feel free to comment below.

14. Cmake Find package part 1 #11 بالعربى

vcpkg :
packages :
fmt :

15. How to solve Invoking Cmake Failed Error in ROS

Hello everyone,

In this video i will try to solve the Cmake Error in ROS.

Video Terkait

Kategori General