This commit is contained in:
NissimHadar 2019-04-23 10:39:52 -07:00
parent 0179ba8e67
commit c9d128ae71
3 changed files with 14 additions and 20 deletions

View file

@ -14,17 +14,14 @@ macro(setup_qt)
if (RELEASE_TYPE STREQUAL "DEV")
if (DEFINED ENV{QT_CMAKE_PREFIX_PATH} )
set(QT_CMAKE_PREFIX_PATH $ENV{QT_CMAKE_PREFIX_PATH})
else ()
set(QT_CMAKE_PREFIX_PATH $ENV{HIFI_VCPKG_BASE_VERSION} "/installed/qt5-install/lib/cmake")
endif()
else ()
if (WIN32)
set(QT_CMAKE_PREFIX_PATH "C:/Windows/TEMP/hifi/vcpkg/installed/qt5-install/lib/cmake")
else ()
set(QT_CMAKE_PREFIX_PATH "/tmp/hifi/vcpkg/installed/qt5-install/lib/cmake")
endif()
### else ()
### if (WIN32)
### set(QT_CMAKE_PREFIX_PATH "C:/Windows/TEMP/hifi/vcpkg/installed/qt5-install/lib/cmake")
### else ()
### set(QT_CMAKE_PREFIX_PATH "/tmp/hifi/vcpkg/installed/qt5-install/lib/cmake")
### endif()
endif()
set(QT_CMAKE_PREFIX_PATH "C:/Windows/TEMP/hifi/vcpkg/cb433fd7/installed/qt5-install/lib/cmake")
# figure out where the qt dir is
get_filename_component(QT_DIR "${QT_CMAKE_PREFIX_PATH}/../../" ABSOLUTE)
@ -35,9 +32,7 @@ set(QT_CMAKE_PREFIX_PATH "C:/Windows/TEMP/hifi/vcpkg/cb433fd7/installed/qt5-inst
string(REPLACE \\ / QT_CMAKE_PREFIX_PATH ${QT_CMAKE_PREFIX_PATH})
string(REPLACE \\ / QT_DIR ${QT_DIR})
endif()
message("==================")
message(STATUS ${QT_CMAKE_PREFIX_PATH})
message("==================")
if (NOT EXISTS "${QT_CMAKE_PREFIX_PATH}/Qt5Core/Qt5CoreConfig.cmake")
message(FATAL_ERROR "Unable to locate Qt cmake config in ${QT_CMAKE_PREFIX_PATH}")
endif()

View file

@ -19,6 +19,7 @@ get_filename_component(CMAKE_TOOLCHAIN_FILE "{}" ABSOLUTE CACHE)
get_filename_component(CMAKE_TOOLCHAIN_FILE_UNCACHED "{}" ABSOLUTE)
set(VCPKG_INSTALL_ROOT "{}")
set(VCPKG_TOOLS_DIR "{}")
set(QT_CMAKE_PREFIX_PATH "{}")
"""
CMAKE_TEMPLATE_NON_ANDROID = """
@ -217,6 +218,7 @@ endif()
cmakeScript = os.path.join(self.path, 'scripts/buildsystems/vcpkg.cmake')
installPath = os.path.join(self.path, 'installed', self.triplet)
toolsPath = os.path.join(self.path, 'installed', self.hostTriplet, 'tools')
cmakePrefixPath = os.path.join(self.path, 'installed', 'qt5-install/lib/cmake')
cmakeTemplate = VcpkgRepo.CMAKE_TEMPLATE
if not self.args.android:
cmakeTemplate += VcpkgRepo.CMAKE_TEMPLATE_NON_ANDROID
@ -226,7 +228,7 @@ endif()
cmakeTemplate += 'set(HIFI_ANDROID_PRECOMPILED "{}")\n'.format(precompiled)
cmakeTemplate += 'set(QT_CMAKE_PREFIX_PATH "{}")\n'.format(qtCmakePrefix)
cmakeConfig = cmakeTemplate.format(cmakeScript, cmakeScript, installPath, toolsPath).replace('\\', '/')
cmakeConfig = cmakeTemplate.format(cmakeScript, cmakeScript, installPath, toolsPath, cmakePrefixPath).replace('\\', '/')
with open(self.configFilePath, 'w') as f:
f.write(cmakeConfig)
@ -238,7 +240,8 @@ endif()
def installQt(self):
if True or not os.path.isdir(os.path.join(self.path, 'installed', 'qt5-install')):
if not os.path.isdir(os.path.join(self.path, 'installed', 'qt5-install')):
#if True or not os.path.isdir(os.path.join(self.path, 'installed', 'qt5-install')):
print ("Downloading Qt from AWS")
dest = os.path.join(self.path, 'installed')
if platform.system() == 'Windows':
@ -248,10 +251,6 @@ endif()
elif platform.system() == 'Linux':
url = "https://hifi-qa.s3.amazonaws.com/qt5/Ubuntu/qt5-install.zip"
print("+++++++++++++++++++++++")
print(dest)
print(url)
print("+++++++++++++++++++++++")
hifi_utils.downloadAndExtract(url, dest)
else:
print ("Qt has already been downloaded")

View file

@ -31,7 +31,7 @@ if (BUILD_TOOLS)
ac-client
skeleton-dump
atp-client
# oven
oven
)
else()
set(ALL_TOOLS
@ -44,7 +44,7 @@ if (BUILD_TOOLS)
ac-client
skeleton-dump
atp-client
# oven
oven
nitpick
)
endif()