diff --git a/cmake/ports/quazip/portfile.cmake b/cmake/ports/quazip/portfile.cmake
index 39b0be88de..07a8ebc3c3 100644
--- a/cmake/ports/quazip/portfile.cmake
+++ b/cmake/ports/quazip/portfile.cmake
@@ -1,5 +1,7 @@
 include(vcpkg_common_functions)
 
+file(READ "${VCPKG_ROOT_DIR}/_env/QT_CMAKE_PREFIX_PATH.txt" QT_CMAKE_PREFIX_PATH)
+
 vcpkg_download_distfile(
     SOURCE_ARCHIVE
     URLS https://athena-public.s3.amazonaws.com/dependencies/quazip-0.7.3.zip
@@ -16,7 +18,7 @@ vcpkg_extract_source_archive_ex(
 vcpkg_configure_cmake(
   SOURCE_PATH ${SOURCE_PATH}
   PREFER_NINJA
-  OPTIONS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_PREFIX_PATH=$ENV{QT_CMAKE_PREFIX_PATH} -DBUILD_WITH_QT4=OFF
+  OPTIONS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_PREFIX_PATH=${QT_CMAKE_PREFIX_PATH} -DBUILD_WITH_QT4=OFF
 )
 
 vcpkg_install_cmake()
diff --git a/hifi_vcpkg.py b/hifi_vcpkg.py
index 6abf620bd1..07dc71882c 100644
--- a/hifi_vcpkg.py
+++ b/hifi_vcpkg.py
@@ -114,6 +114,10 @@ endif()
         with open(os.path.join(self.args.build_root, '_env', var + ".txt")) as fp:
             return fp.read()
 
+    def writeVar(self, var, value):
+        with open(os.path.join(self.args.build_root, '_env', var + ".txt"), 'w') as fp:
+            fp.write(value)
+
     def upToDate(self):
         # Prevent doing a clean if we've explcitly set a directory for vcpkg
         if self.noClean:
diff --git a/prebuild.py b/prebuild.py
index 30c2a83e17..03677f21d7 100644
--- a/prebuild.py
+++ b/prebuild.py
@@ -137,8 +137,11 @@ def main():
                 qt.installQt()
                 qt.writeConfig()
 
-    # Only allow one instance of the program to run at a time
     pm = hifi_vcpkg.VcpkgRepo(args)
+    if qtInstallPath != '':
+        pm.writeVar('QT_CMAKE_PREFIX_PATH', qtInstallPath)
+
+    # Only allow one instance of the program to run at a time
     with hifi_singleton.Singleton(pm.lockFile) as lock:
 
         with timer('Bootstraping'):