CMake Build: Fix MSVC PCH build

Ammends 735078cd80

Change-Id: I01296641ca0681d4fef376087368e247dce011f8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Cristian Adam
2020-10-07 12:38:26 +02:00
parent 54417569a9
commit 2129a04c5d

View File

@@ -360,7 +360,8 @@ function(enable_pch target)
endif()
unset(PCH_TARGET)
if ("Qt5::Widgets" IN_LIST dependencies)
if ("Qt5::Widgets" IN_LIST dependencies OR
"Qt5::Gui" IN_LIST dependencies)
set(PCH_TARGET QtCreatorPchGui)
elseif ("Qt5::Core" IN_LIST dependencies)
set(PCH_TARGET QtCreatorPchConsole)