Only build test logindinhibitionargument with WITH_NEW_POWER_ASYNC_API AND WITH_NEW_POWER_ASYNC_FREEDESKTOP

Review Request #120635 - Created Oct. 18, 2014 and discarded

Friedrich W. H. Kossebau

Build fails for me with

[ 96%] Building CXX object autotests/CMakeFiles/logindinhibitionargument.dir/logindinhibitionargumenttest.cpp.o
In file included from /home/koder/Kode/kdegit/kf5/frameworks/solid/autotests/logindinhibitionargumenttest.cpp:22:0:
/home/koder/Kode/kdegit/kf5/frameworks/solid/autotests/../src/solid/power/backends/freedesktop/logindinhibitionargument.h:25:25: fatal error: solid/power.h: Datei oder Verzeichnis nicht gefunden
 #include "solid/power.h"
compilation terminated.
make[2]: *** [autotests/CMakeFiles/logindinhibitionargument.dir/logindinhibitionargumenttest.cpp.o] Fehler 1
make[1]: *** [autotests/CMakeFiles/logindinhibitionargument.dir/all] Fehler 2
make: *** [all] Fehler 2

Actually I am puzzled how all the "solid/power.h" or <solid/job.h> includes are resolved on the very first build of Solid (when nothing has been installed yet). I could not find any such path in the source dirs or the build dirs. Is there some cmake magic which injects those path in a virtual way during the build?

In any case, that seems to be missing when building the test "logindinhibitionargument", so that include there cannot be resolved. This patch is just a workaround to make things building for those where "power/backends/freedesktop" would not be built anyway, even if that class does not have any external includes that have the same deps of that backend.

You might have a better idea what the real fix would be.

Friedrich W. H. Kossebau
Friedrich W. H. Kossebau
Review request changed

Status: Discarded