Chapter Wrap-up

Let's see what you've learned in this chapter and test your understanding of installing and packaging.

We'll cover the following

Summary

Writing installation scripts in a cross-platform way is an incredibly complex task without a tool such as CMake. While it still requires a little bit of work to set up, it's a much more streamlined process that ties closely to all the other concepts and techniques we've used so far in this course.

First, we learned how to export CMake targets from projects so that they can be consumed in other projects without installing them. Then, we learned how to install projects that had already been configured for this purpose.

After that, we started exploring the basics of installation by starting with the most important subject: installing CMake targets. We now know how CMake handles different destinations for various artifact types and how to deal with public headers that are somewhat special. To manage these installation steps at lower levels, we discussed other modes of the install() command, including installing files, programs, and directories and invoking scripts during the installation.

Get hands-on with 1200+ tech skills courses.