Installing data

To install header files:

include_HEADERS = foo.h bar.h

If the class uses a namespace, e.g. KParts, then the header file should be installed into kparts/foo.h

To do that:

kpartsincludedir = $(includedir)/kparts
kpartsinclude_HEADERS = foo.h bar.h

The first line defines a new directory, the second line installs the files into it. The name before dir and _HEADERS must be the same, but other than that it doesn't matter much what it is.

To install data files into a standard directory, use dirname_DATA.

For instance a Type=Service .desktop file should go into $(kde_servicesdir), therefore you should write

kde_services_DATA = foo.desktop

To install data files into a custom directory, you must first define it then use it:

myappfoodir = $(kde_datadir/kmyapp
myappfoo_DATA = bar.desktop

This installs bar.desktop into KDEPREFIX/share/apps/kmyapp.

For a K menu entry use:

xdg_apps_DATA = kmyapp.desktop