Tutorial by Examples

The default way to find installed packages with CMake is the use the find_package function in conjunction with a Find<package>.cmake file. The purpose of the file is to define the search rules for the package and set different variables, such as <package>_FOUND, <package>_INCLUDE_D...
On Unix-like operating systems, it is possible to use the pkg-config program to find and configure packages that provides a <package>.pc file. In order to use pkg-config, it is necessary to call include(FindPkgConfig) in a CMakeLists.txt. Then, there are 2 possible functions: pkg_search_mo...

Page 1 of 1