CMake: Detecting External Libraries – Using pkg-config

CMake: Detecting External Libraries - Using pkg-config

Introduction: In the previous articles, we have basically understood how to link a third-party library. This article and the next will supplement two methods for detecting external libraries. So far, we have learned two methods for detecting external dependencies: Using the built-in CMake find-module, but not all packages can be found in the CMake find … Read more

CMake Advanced: Four Strategies to Master External Library Finding, No More Worries About Missing Dependencies!

CMake Advanced: Four Strategies to Master External Library Finding, No More Worries About Missing Dependencies!

Click the blue text to follow the author 1. Introduction: Checking External Libraries In CMake, there are two main methods to locate external dependency libraries: Using CMake’s built-in<span>find_package</span> module: CMake provides built-in find modules for many common libraries (e.g., <span>FindBoost.cmake</span>, <span>FindOpenSSL.cmake</span>, etc.). These modules can usually automatically detect the installation paths of libraries, header files, … Read more