Maybe use pkg-config instead, and create/install a .pc file for libsocialcache? See here how you can do most of this from qmake: http://stackoverflow.com/a/16035868/1047040 (you put the ```CONFIG += create_pc``` stuff in your .pro file, and then ```CONFIG *= link_pkgconfig``` and ```PKGCONFIG += socialcache``` (or how you call it) to the .prf file).

This allows you to use pkg-config to get the includepath/libs values, as well as use ```BuildRequires: pkgconfig(socialcache)``` in the RPM .spec file for packages that build-depend on it.