Merge pull request #16229 from danteruiz/allow-qt-prefix

BUGZ-1551: Do not download Qt if Qt_CMAKE_PREFIX_PATH is set as an environment variable
This commit is contained in:
Shannon Romano 2019-09-23 09:21:56 -07:00 committed by GitHub
commit 23d8274d4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -257,26 +257,27 @@ endif()
def installQt(self): def installQt(self):
qt5InstallPath = self.getQt5InstallPath() qt5InstallPath = self.getQt5InstallPath()
if not os.path.isdir(qt5InstallPath): if os.getenv('QT_CMAKE_PREFIX_PATH') == None:
print ('Downloading Qt from AWS') if not os.path.isdir(qt5InstallPath):
dest, tail = os.path.split(qt5InstallPath) print ('Downloading Qt from AWS')
dest, tail = os.path.split(qt5InstallPath)
url = 'NOT DEFINED' url = 'NOT DEFINED'
if platform.system() == 'Windows': if platform.system() == 'Windows':
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-windows3.tar.gz' url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-windows3.tar.gz'
elif platform.system() == 'Darwin': elif platform.system() == 'Darwin':
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-macos3.tar.gz' url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-macos3.tar.gz'
elif platform.system() == 'Linux': elif platform.system() == 'Linux':
if platform.linux_distribution()[1][:3] == '16.': if platform.linux_distribution()[1][:3] == '16.':
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-16.04-with-symbols.tar.gz' url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-16.04-with-symbols.tar.gz'
elif platform.linux_distribution()[1][:3] == '18.': elif platform.linux_distribution()[1][:3] == '18.':
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-18.04.tar.gz' url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-18.04.tar.gz'
else:
print('UNKNOWN LINUX VERSION!!!')
else: else:
print('UNKNOWN LINUX VERSION!!!') print('UNKNOWN OPERATING SYSTEM!!!')
else:
print('UNKNOWN OPERATING SYSTEM!!!')
print('Extracting ' + url + ' to ' + dest) print('Extracting ' + url + ' to ' + dest)
hifi_utils.downloadAndExtract(url, dest) hifi_utils.downloadAndExtract(url, dest)
else: else:
print ('Qt has already been downloaded') print ('Qt has already been downloaded')