Fix up quazip configuration

This commit is contained in:
David Rowe 2020-04-10 09:34:00 +12:00
parent 761bc69faa
commit 1a4bb41f22
3 changed files with 11 additions and 2 deletions

View file

@ -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()

View file

@ -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:

View file

@ -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'):