Move build configuration processing before Qt handling
Otherwise build configurations are not able to disable Qt.