qt5: try to fix CMake files

See #466.

This is one of the worst hacks I've ever seen. If there is a way to fix
this better, please mention on #466.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>