The code sample for this recipe is a slight variation of Chapter 3, Detecting External Libraries and Programs, Recipe 9, Detecting external libraries: I. Using pkg-config. There, we showed how to find the ZeroMQ library on your system and link it into a C program. In this recipe, we will check that a small C program using the system UUID library on GNU/Linux can actually run, before generating the actual C++ program.
Getting ready
Get CMake Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.