Id like to use GLib in my C application which uses CMake as the build system.
Now, I'm somehow confused how I should enable GLib in my CMakeLists.txt. Basically, you add libraries in cmake using the find_package
command, so I tried, according to this bugreport
find_package(GLib2)
But nothing is found. In the GLib documentation it is suggested to use pkg-config
, on the other hand.
What is the recommended way of enabling glib in a cmake-based project?
glib.h
not found – Requitepkg-config
approach taken by the OP, or whether I should copyFindGLib.cmake
to my root directory. And is this one version aware? – Requite