API: don't depend on GLib in ModemManager headers
We should only depend on GLib on the libmm-glib headers. Otherwise, packages using just the core headers (e.g. ModemManagerQt) would also need to build-depend on GLib and we don't want to enforce that. cd ~/buildroot/output/build/kde-modemmanager-qt-v5.36.0/src && ~/buildroot/output/host/usr/bin/arm-cortexa9_neon-linux-gnueabihf-g++ .... -fPIC -o CMakeFiles/KF5ModemManagerQt_static.dir/bearer.cpp.o -c ~/buildroot/output/build/kde-modemmanager-qt-v5.36.0/src/bearer.cpp In file included from ~/buildroot/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/ModemManager/ModemManager.h:41:0, from ~/buildroot/output/build/kde-modemmanager-qt-v5.36.0/src/generictypes.h:27, from ~/buildroot/output/build/kde-modemmanager-qt-v5.36.0/src/generictypes.cpp:23: ~/buildroot/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/ModemManager/ModemManager-compat.h:23:18: fatal error: glib.h: No such file or directory compilation terminated.
This commit is contained in:
@@ -20,8 +20,6 @@
|
||||
#error "Only <ModemManager.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <ModemManager-enums.h>
|
||||
|
||||
#ifndef MM_DISABLE_DEPRECATED
|
||||
@@ -35,8 +33,15 @@
|
||||
* avoid unnecessary API/ABI breaks.
|
||||
*/
|
||||
|
||||
/* deprecated attribute support since gcc 3.1 */
|
||||
#if defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
|
||||
# define MM_DEPRECATED __attribute__((__deprecated__))
|
||||
#else
|
||||
# define MM_DEPRECATED
|
||||
#endif
|
||||
|
||||
/* The following type exists just so that we can get deprecation warnings */
|
||||
G_DEPRECATED
|
||||
MM_DEPRECATED
|
||||
typedef int MMModemBandDeprecated;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user