Trying to compile a library in Ubuntu with CMake and one of the file includes glib.h. The package is installed and glib.h
is in /usr/include/glib-2.0/glib.h
.
I added the following but compiler still cannot find glib.h.
FIND_PACKAGE(glib-2.0)
IF (glib-2.0_FOUND)
INCLUDE_DIRECTORIES(${glib-2.0_INCLUDE_DIR})
ENDIF()
Anyone know what package I are suppose to look for?
Actual code that I ended up using is
find_package(PkgConfig REQUIRED)
pkg_check_modules(GLIB_PKG glib-2.0)
if (GLIB_PKG_FOUND)
message(Found glib-2.0)
include_directories(${GLIB_PKG_INCLUDE_DIRS})