Have you tried using CONFIG += debug_and_release?