Build error glib.h not found
I'm trying to build jami-qt with flatpak but get the glib.h not found error. I added the following to the CMakeLists.txt:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec83cb5..888ae6b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -242,6 +242,12 @@ else()
find_package(PkgConfig REQUIRED)
+ pkg_check_modules(GLIB REQUIRED glib-2.0)
+ if(GLIB_FOUND)
+ add_definitions(${GLIB_CFLAGS_OTHER})
+ message(${GLIB_CFLAGS_OTHER})
+ endif()
+
pkg_check_modules(LIBNM libnm)
if(LIBNM_FOUND)
add_definitions(-DUSE_LIBNM)
@@ -294,7 +300,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 +426,8 @@ else()
${X11}
${LIBNM_LIBRARIES}
${LIBNOTIFY_LIBRARIES}
- ${LIBGDKPIXBUF_LIBRARIES})
+ ${LIBGDKPIXBUF_LIBRARIES}
+ ${GLIB_LIBRARIES})
# Installation rules
install(TARGETS jami-qt
This fixes the not found error but results in a new error:
/run/build/jami-qt/src/connectivitymonitor.cpp: In constructor ‘ConnectivityMonitor::ConnectivityMonitor(QObject*)’:
/run/build/jami-qt/src/connectivitymonitor.cpp:224:5: error: ‘GCancellable’ was not declared in this scope
224 | GCancellable * cancellable = g_cancellable_new();
| ^~~~~~~~~~~~
/run/build/jami-qt/src/connectivitymonitor.cpp:224:20: error: ‘cancellable’ was not declared in this scope
224 | GCancellable * cancellable = g_cancellable_new();
| ^~~~~~~~~~~
/run/build/jami-qt/src/connectivitymonitor.cpp:224:34: error: ‘g_cancellable_new’ was not declared in this scope
224 | GCancellable * cancellable = g_cancellable_new();
| ^~~~~~~~~~~~~~~~~
This is where my abilities are at an end.