[Networkmanager] Using NetworkManager libraries in CMake

Tom Isaacson tom.isaacson at teknique.com
Mon Jan 2 21:56:59 UTC 2023


I'm using ModemManager 1.22.16. I've added this to my Yocto build using:
https://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-connectivity/networkmanager?h=dunfell

My application is built within Yocto using CMake. I want to use the
nm_dbus_ functions specified in shared/nm-glib-aux/nm-dbus-aux.h.

1. How can I declare NetworkManager to CMake? I can see there's a
NetworkManager.pc.in file but it doesn't always get built.
2. The include file only appears way down in
rootfs-dbg/usr/src/debug/networkmanager/1.22.16-r0/NetworkManager-1.22.16/shared/nm-glib-aux/nm-dbus-aux.h,
is this expected?
3. When I include nm-dbus-aux.h the build fails because it includes
nm-std-aux/nm-dbus-compat.h which isn't present. Do I need to set a
build flag for this?

Thanks.

-- 
Tom Isaacson


More information about the Networkmanager mailing list