-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Minimal CMake
By :
Installing, at its core, is just copying files from one place to another. Once those files are copied to a particular location, applications (or other libraries) can search for them there when building.
There are several reasons why installing is useful in practice. The first advantage is that you can build a library once, install only the necessary files to a known location, and then have multiple applications use it. This can save a lot of time and resources and let you avoid needlessly building the same code repeatedly. The other advantage is that only the required files are copied to the install location. When we build normally, the build folder gets filled up with a lot of intermediate files that the application, depending on our library, may not care about. When we install, we specify only the necessary files (usually the built library files such as .lib/.a or .dll/.dylib/.so, header files, and CMake configuration files). We also can more precisely control...