[CMake] dbus auto-activation services

Matt Rogers mattr at kde.org
Fri Dec 22 09:46:47 EST 2006


On Friday 22 December 2006 03:01, Aaron J. Seigo wrote:
> hi all...
>
> i needed to install a dbus auto activation file (*.service) in a cmake
> project and couldn't find a nice way to do that. i ended up writing a macro
> called dbus_add_activation_service and adding a macro to UsePkgConfig.cmake
> called PKGCONFIG_GETVAR so that one can query pkgconfig for arbitrary
> variables, in this case the dbus services directory.
>
> with these two additions one can simply do this in their cmake file:
>
> dbus_add_activation_service(mycoolapp.service.in)
>
> where mycoolapp.service.in might look like:
>
> [D-BUS Service]
> Name=org.coolness.mycoolapp
> Exec=@CMAKE_INSTALL_PREFIX@/bin/mycoolapp
>
> and it does The Right Thing(tm). or at least, it does on my system. i'm a
> CMake neophyte and probably did 12 things wrong in just these two simple
> macros ;) but you can find patches attached. getting this included upstream
> would be wonderful, otherwise i suppose i can lobby for inclusion in the
> cmake modules in kdelibs, though these items seem to be the sort that would
> be generally useful?

the macros look fine to me. i don't think there will be a problem getting them 
put upstream. until a cmake release comes out with these macros in them, i 
think we'll have to include these in kdelibs as well. alex can probably 
comment better on that.
--
Matt


More information about the CMake mailing list