Skip to content
Snippets Groups Projects
Commit 8871db49 authored by FuchtelJockel's avatar FuchtelJockel Committed by Sébastien Blin
Browse files

build: fix includes, add glib and gio to CMakeLists.txt

First I added glib to cmake this fixed the glib.h not found error.
Then I got build errors from the missing GIO include as seen in the linked issue.
After adding the #include <gio/gio.h> the linker failed to find the gio library.
After adding the gio check to cmake all build issues were solved.

GitLab: #504
Change-Id: Iac537e10261f2e9dfa61029c4591e000851a378c
parent dff47470
No related branches found
No related tags found
No related merge requests found
......@@ -242,6 +242,16 @@ else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(GLIB REQUIRED glib-2.0)
if(GLIB_FOUND)
add_definitions(${GLIB_CFLAGS_OTHER})
endif()
pkg_check_modules(GIO REQUIRED gio-2.0)
if(GIO_FOUND)
add_definitions(${GIO_CFLAGS})
endif()
pkg_check_modules(LIBNM libnm)
if(LIBNM_FOUND)
add_definitions(-DUSE_LIBNM)
......@@ -294,7 +304,8 @@ else()
include_directories(${LRC_SRC_PATH}
${LIBNM_INCLUDE_DIRS}
${LIBNOTIFY_INCLUDE_DIRS}
${LIBGDKPIXBUF_INCLUDE_DIRS})
${LIBGDKPIXBUF_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS})
set(JAMI_DATA_PREFIX "${CMAKE_INSTALL_PREFIX}/share")
......@@ -419,7 +430,9 @@ else()
${X11}
${LIBNM_LIBRARIES}
${LIBNOTIFY_LIBRARIES}
${LIBGDKPIXBUF_LIBRARIES})
${LIBGDKPIXBUF_LIBRARIES}
${GLIB_LIBRARIES}
${GIO_LIBRARIES})
# Installation rules
install(TARGETS jami-qt
......
......@@ -18,6 +18,7 @@
#ifndef _WIN32
#include <glib.h>
#include <gio/gio.h>
#ifdef USE_LIBNM
#include <NetworkManager.h>
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment