CMake: Detecting External Libraries – Custom Find Module

CMake: Detecting External Libraries - Custom Find Module

Introduction: In the previous article, we learned about one method of custom detection of external libraries in CMake. This article will demonstrate how to locate the ZeroMQ library on the system by writing a find module, enabling detection of this library on non-operating systems. ✦ Project Structure ✦ . ├── CMakeLists.txt ├── FindZeroMQ.cmake ├── zmq_client.cpp … Read more

CMake Module Detailed Explanation: Mastering Usage and Custom Modules

CMake Module Detailed Explanation: Mastering Usage and Custom Modules

1. Introduction This article will focus on the usage of system-defined Find modules and how to write your own Find modules. The system provides various other modules, which generally need to be explicitly called using the INCLUDE directive. The FIND_PACKAGE directive is a special case that can directly invoke predefined modules. In fact, managing a … Read more