cmake: declare build_tests target in tests/CMakeLists.txt

this makes the inner CMakeLists.txt more independent - and thus works
when copied to ROOT

Signed-off-by: Matthias Kretz <kretz@kde.org>
cmake: fix dependency to use the right target

Signed-off-by: Matthias Kretz <kretz@kde.org>