diff --git a/cmake/QtBaseGlobalTargets.cmake b/cmake/QtBaseGlobalTargets.cmake index 34f2cfe635..d56cd44cb1 100644 --- a/cmake/QtBaseGlobalTargets.cmake +++ b/cmake/QtBaseGlobalTargets.cmake @@ -75,7 +75,7 @@ if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) endif() if(VCPKG_TARGET_TRIPLET) - list(APPEND init_vcpkg "set(VCPKG_TARGET_TRIPLET \"${VCPKG_TARGET_TRIPLET}\")") + list(APPEND init_vcpkg "set(VCPKG_TARGET_TRIPLET \"${VCPKG_TARGET_TRIPLET}\" CACHE STRING \"\")") endif() string(REPLACE ";" "\n" init_vcpkg "${init_vcpkg}")