Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update webapp feature branch with current master #1261

Merged
merged 56 commits into from
Jun 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
04f8ccd
drop remaining references to QScriptEngineDebugger
odysseus654 May 9, 2021
9ef9a89
Fix draco compilation on gcc11
daleglass May 9, 2021
15effec
Add patch for building Qt 5.15 on gcc11
daleglass May 18, 2021
d0eccfd
Fix typo in Doxygen ReadMe
ctrlaltdavid May 20, 2021
d0bc5df
Merge pull request #1220 from ctrlaltdavid/fix/doxygen-readme
digisomni May 20, 2021
f1b4c8e
Merge pull request #1218 from daleglass/fix-qt5.15-on-gcc11
digisomni May 20, 2021
15a9de3
Update README.md
digisomni May 25, 2021
b020558
fix PR autobuild for ubuntu-18.04, android with correct cmake version…
ArcadeFever May 25, 2021
6341dcc
Create .grenrc.js
digisomni May 25, 2021
06b09da
Update MacOS packaging instructions.
digisomni May 26, 2021
9640a13
Merge pull request #1226 from vircadia/feature/gren-changelog-gen
digisomni May 27, 2021
84c90bf
Add URL for .grenrc.js reposi
digisomni May 28, 2021
b3f55b4
Merge pull request #1231 from vircadia/fix/gren-config
digisomni May 28, 2021
7ccdbde
Some APIDocs metadata fixes.
digisomni May 31, 2021
2a6e0f0
Add JSDoc canonical link tag; add CNAME file in root.
digisomni May 31, 2021
8b66c22
Statically generate canonical link tag instead.
digisomni May 31, 2021
f6f7a18
Merge pull request #1236 from digisomni/fix/api-docs-updates
digisomni Jun 1, 2021
6ce944a
Update INSTALLER.md
digisomni Jun 1, 2021
c2b7f73
Merge pull request #1207 from daleglass/fix-draco-on-gcc11
digisomni Jun 3, 2021
a408294
Merge pull request #1227 from vircadia/docs/update-macos-installer-docs
digisomni Jun 3, 2021
d8a0d13
Merge pull request #1206 from odysseus654/pr/drop-script-debugging
digisomni Jun 3, 2021
a827b7c
Bump normalize-url from 4.5.0 to 4.5.1 in /screenshare
dependabot[bot] Jun 11, 2021
7bbce4a
Update INSTALLER.md
digisomni Jun 16, 2021
d01385f
Merge pull request #1243 from vircadia/dependabot/npm_and_yarn/screen…
digisomni Jun 17, 2021
78ab7a6
Merge pull request #1245 from digisomni/digisomni-patch-1
digisomni Jun 17, 2021
474cd6b
Improve Qt handling in CMake
daleglass Dec 21, 2020
b88f380
Update documentation on Qt in Linux
daleglass Dec 27, 2020
efd15dc
Make hifi_vcpkg.py use ~/vircadia-files too
daleglass Jan 6, 2021
6cd8eca
Take into account that Windows executables have an extension
daleglass Jan 30, 2021
2b05c32
Don't depend on screenshare on Android
daleglass Jan 30, 2021
1e63916
Disable almost all the code in SetupQt.cmake for system qt
daleglass Feb 15, 2021
ca489bd
Simplify system Qt path
daleglass Feb 16, 2021
758ebd7
Fix environment variable cmake syntax
daleglass Feb 16, 2021
6611d6e
Fix quazip cmake portfile to work with system Qt
daleglass Feb 17, 2021
50dfa73
Concatenate Windows paths correctly
daleglass Feb 27, 2021
2a8278f
Temp changes
daleglass Mar 13, 2021
506fd95
Handle empty environment variables as false
daleglass Mar 24, 2021
1b999ac
Add more explanatory comments
daleglass Mar 24, 2021
f7af9a8
Fix build - missing variable
daleglass Jun 10, 2021
3ebcced
Fix build -- screenshare is not found
daleglass Jun 10, 2021
3f8159b
Formatting fix
daleglass Jun 10, 2021
586de4d
More formatting fixes
daleglass Jun 10, 2021
f90d872
Formatting cleanup
daleglass Jun 19, 2021
2a07f5f
Nice colored unsupported distro messages
daleglass Jun 20, 2021
5885283
Cmake cleanup
daleglass Jun 20, 2021
6342a8a
Better Qt error messages
daleglass Jun 20, 2021
1c2ea15
Add style for the new Zone Selector HDM compliant
AleziaKurdis Jun 21, 2021
77d9160
Add a new Zone Selector HDM compliant
AleziaKurdis Jun 21, 2021
1ee65ca
Css for HMD compliant Zone Selector
AleziaKurdis Jun 22, 2021
607ed28
HMD compliant Zone Selector
AleziaKurdis Jun 22, 2021
e48e02d
Fix JSDoc typo
ctrlaltdavid Jun 22, 2021
f4ae889
Merge pull request #1254 from ctrlaltdavid/fix/jsdoc-typo
digisomni Jun 22, 2021
3638b73
Fix Zone Selector loading issue
AleziaKurdis Jun 23, 2021
64a9b32
Merge pull request #1252 from AleziaKurdis/CreateApp_RenderWithZoneVR
digisomni Jun 26, 2021
6b0e188
Merge pull request #936 from daleglass/improve-cmake
daleglass Jun 26, 2021
d606128
Merge branch 'master' into dev/webapp-master-update
ctrlaltdavid Jun 26, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,16 @@ jobs:
done
}
retry cmake --build . --config $BUILD_TYPE --target package $CMAKE_BUILD_EXTRA
# As of 05/17/21 GitHub Virtual Environments changed their "Ubuntu 18.04.5 LTS" image to include two versions of CMake for Android
# https://github.com/actions/virtual-environments/blob/ubuntu18/20210517.1/images/linux/Ubuntu1804-README.md
# Removing 3.18.1 version of CMake as its not compatible with our Android build.
# It will fall back to 3.10.2 which is already installed
- name: Nuke CMake 3.18.1-g262b901
if: matrix.build_type == 'android'
shell: bash
working-directory: ${{runner.workspace}}/vircadia
run: |
/usr/local/lib/android/sdk/tools/bin/sdkmanager --uninstall 'cmake;3.18.1'
- name: Build for Android + Quest
if: matrix.build_type == 'android'
shell: bash
Expand Down
43 changes: 43 additions & 0 deletions .grenrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//
// .grenrc.js
//
// Created by Kalila L. on May 25, 2021
// Copyright 2021 Vircadia contributors.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
// This configuration is for generating a changelog with gren for a GitHub repository.
// https://github.com/github-tools/github-release-notes
//
// gren changelog -G
//

module.exports = {
"dataSource": "prs",
"prefix": "",
"ignoreLabels": [
"enhancement",
"bugfix",
"CR Approved",
"QA Approved",
"allow-build-upload",
"bug",
"confirmed",
"do not merge",
"duplicate",
"good first issue",
"help wanted",
"hifi migration",
"high risk",
"rebuild",
"merge right before snip"
],
"onlyMilestones": true,
"groupBy": {
"Enhancements": ["enhancement"],
"Bug Fixes": ["bugfix"],
"Docs": ["docs"]
},
"changelogFilename": "CHANGELOG.md"
}
13 changes: 8 additions & 5 deletions BUILD_LINUX.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,16 @@ git checkout master

### Using a custom Qt build

Qt binaries are only provided for Ubuntu. In order to build on other distributions, a Qt5 install needs to be provided as follows:
Qt binaries are only provided for Ubuntu. In order to build on other distributions, a Qt5 install
needs to be provided by setting the `VIRCADIA_QT_PATH` environment variable to a directory containing
a Qt install.

* Set `VIRCADIA_USE_PREBUILT_QT=1`
* Set `VIRCADIA_USE_QT_VERSION` to the Qt version (defaults to `5.12.3`)
* Set `HIFI_QT_BASE=/path/to/qt`
### Using the system's Qt

Qt must be installed in `$HIFI_QT_BASE/$VIRCADIA_USE_QT_VERSION/qt5-install`.
The system's Qt can be used, if the development packages are installed, by setting the
`VIRCADIA_USE_SYSTEM_QT` environment variable. The minimum recommended version is Qt 5.15.2, which is
also the last version available in the Qt 5 branch. It is expected that Linux distributions will have
Qt 5.15.2 available for a long time.

### Compiling

Expand Down
25 changes: 18 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ endif()
if (HIFI_ANDROID)
execute_process(
COMMAND ${HIFI_PYTHON_EXEC} ${CMAKE_CURRENT_SOURCE_DIR}/prebuild.py --release-type ${RELEASE_TYPE} --android ${HIFI_ANDROID_APP} --build-root ${CMAKE_BINARY_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} RESULTS_VARIABLE PREBUILD_RET
)
else()
set(VCPKG_BUILD_TYPE_PARAM "")
Expand All @@ -86,26 +86,34 @@ else()
endif()
execute_process(
COMMAND ${HIFI_PYTHON_EXEC} ${CMAKE_CURRENT_SOURCE_DIR}/prebuild.py --release-type ${RELEASE_TYPE} --build-root ${CMAKE_BINARY_DIR} ${VCPKG_BUILD_TYPE_PARAM}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} RESULTS_VARIABLE PREBUILD_RET
)
# squelch the Policy CMP0074 warning without requiring an update to cmake 3.12.
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.12)
cmake_policy(SET CMP0074 NEW)
endif()
endif()

if (PREBUILD_RET GREATER 0)
message(FATAL_ERROR "prebuild.py failed with error ${PREBUILD_RET}")
endif()
if(NOT EXISTS "${CMAKE_BINARY_DIR}/vcpkg.cmake")
message(FATAL_ERROR "vcpkg configuration missing.")
endif()
include("${CMAKE_BINARY_DIR}/vcpkg.cmake")

if (HIFI_ANDROID)
set(QT_CMAKE_PREFIX_PATH "$ENV{HIFI_ANDROID_PRECOMPILED}/qt/lib/cmake")
else()
if(NOT EXISTS "${CMAKE_BINARY_DIR}/qt.cmake")
message(FATAL_ERROR "qt configuration missing.")
else()
if ("$ENV{VIRCADIA_USE_SYSTEM_QT}" STREQUAL "")
if(NOT EXISTS "${CMAKE_BINARY_DIR}/qt.cmake")
message(FATAL_ERROR "qt configuration missing.")
endif()
include("${CMAKE_BINARY_DIR}/qt.cmake")
message(STATUS "${CMAKE_BINARY_DIR}/qt.cmake included!")
else()
message(STATUS "System Qt in use, not including qt.cmake!")
endif()
include("${CMAKE_BINARY_DIR}/qt.cmake")
endif()

option(VCPKG_APPLOCAL_DEPS OFF)
Expand Down Expand Up @@ -290,7 +298,10 @@ set_packaging_parameters()

# Locate the required Qt build on the filesystem
setup_qt()
list(APPEND CMAKE_PREFIX_PATH "${QT_CMAKE_PREFIX_PATH}")

if ("$ENV{VIRCADIA_USE_SYSTEM_QT}" STREQUAL "")
list(APPEND CMAKE_PREFIX_PATH "${QT_CMAKE_PREFIX_PATH}")
endif()

find_package( Threads )

Expand Down
42 changes: 31 additions & 11 deletions INSTALLER.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Creating an Installer

*Last Updated on March 4, 2021*
*Last Updated on June 16, 2021*

Follow the [build guide](BUILD.md) to figure out how to build Vircadia for your platform.

Expand Down Expand Up @@ -79,25 +79,45 @@ For code signing to work, you will need to set the `HF_PFX_FILE` and `HF_PFX_PAS
1. Build CMakeTargets->PACKAGE
The installer is now available in `build\_CPack_Packages\win64\NSIS`

#### Create an MSIX Package

1. Get the 'MSIX Packaging Tool' from the Windows Store.
2. Run the process to create a new MSIX package from an existing .exe or .msi installer. This process will allow you to install Vircadia with the usual installer, however it will monitor changes to the computer to replicate the functionality in the MSIX Package. Therefore, you will want to avoid doing anything else on your computer during this process.
3. Be sure to select no shortcuts and install only the Vircadia Interface.
4. When asked for "Entry" points, select only the Interface entry and not the uninstaller. This is because the MSIX package is uninstalled by Windows itself. If for some reason the uninstaller shows up anyway, you can edit the manifest to manually remove it from view even if the uninstaller is present in the package. This is necessary to uplaod to the Windows Store.
5. Once completed, you can sign the package with this application or with other tools such as 'MSIX Hero'. It must be signed with a local certificate to test, and with a proper certificate to distribute.
6. If uploading to the Windows Store, you will have to ensure all your manifest info including publisher information matches what is registered with your Microsoft Developer account for Windows. You will see these errors and the expected values when validating it.

#### FAQ

1. **Problem:** Failure to open a file. ```File: failed opening file "\FOLDERSHARE\XYZSRelease\...\Credits.rtf" Error in script "C:\TFS\XYZProject\Releases\NullsoftInstaller\XYZWin7Installer.nsi" on line 77 -- aborting creation process```
1. **Cause:** The complete path (current directory + relative path) has to be < 260 characters to any of the relevant files.
1. **Solution:** Move your build and packaging folder as high up in the drive as possible to prevent an overage.

### OS X
### MacOS

1. Ensure you have all the prerequisites fulfilled from the [MacOS Build Guide](BUILD_OSX.md).
2. Perform a clean CMake in your build folder. e.g.
```bash
BUILD_GLOBAL_SERVICES=STABLE USE_STABLE_GLOBAL_SERVICES=1 RELEASE_BUILD=PRODUCTION BUILD_NUMBER="Insert Build Identifier here e.g. short hash of your last Git commit" RELEASE_NAME="Insert Release Name Here" STABLE_BUILD=1 PRODUCTION_BUILD=1 RELEASE_NUMBER="Insert Release Version Here e.g. 1.1.0" RELEASE_TYPE=PRODUCTION cmake -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DCLIENT_ONLY=1 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 ..
```
3. Pick a method to build and package your release.

#### Option A: Use Xcode GUI

1. [npm](<https://www.npmjs.com/get-npm>)
Install version 12.16.3 LTS

1. Perform a clean CMake.
1. Perform a Release build of ALL_BUILD
1. Perform a Release build of `packaged-server-console`
1. Perform a Release build of ALL_BUILD
2. Perform a Release build of `packaged-server-console`
This will add a folder to `build\server-console\` -
Sandbox-darwin-x64
1. Perform a Release build of `package`
Installer is now available in `build/_CPack_Packages/Darwin/DragNDrop

3. Perform a Release build of `package`
Installer is now available in `build/_CPack_Packages/Darwin/DragNDrop`

#### Option B: Use Terminal

1. Navigate to your build folder with your terminal.
2. `make -j4`, you can change the number to match the number of threads you would like to use.
3. `make package` to create the package.

### Linux

#### Server
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Vircadia™ is a 3D social software project seeking to incrementally bring about
* Full-body avatars
* FBX, glTF, and OBJ support
* JavaScript scripting engine
* 16km^3 world space in a server
* 16km³ world space in a server
* Fully self-hosted
* Apache 2.0

Expand Down Expand Up @@ -66,7 +66,8 @@ Vircadia consists of many projects and codebases with its unifying structure's g

#### Child Projects
- [Vircadia Builder for Linux](https://github.com/vircadia/vircadia-builder/)
- [General Documentation](https://github.com/vircadia/vircadia-docs-sphinx/)
- [User Documentation](https://github.com/vircadia/vircadia-docs-sphinx/)
- [Developer Documentation](https://github.com/vircadia/vircadia-dev-docs/)

### Contribution

Expand Down
87 changes: 54 additions & 33 deletions cmake/macros/SetupQt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#

# For understanding the execution flow followed by the Qt setup,
# please look at the comment on top of hifi_qt.py

function(get_sub_directories result curdir)
file(GLOB children RELATIVE ${curdir} ${curdir}/*)
set(dirlist "")
Expand All @@ -25,6 +28,9 @@ function(calculate_qt5_version result _QT_DIR)
set(_QT_CORE_DIR "${_QT_DIR}/lib/QtCore.framework/Versions/5/Headers")
else()
set(_QT_CORE_DIR "${_QT_DIR}/include/QtCore")
if(NOT EXISTS "${_QT_CORE_DIR}")
set(_QT_CORE_DIR "${_QT_DIR}/include/qt5/QtCore")
endif()
endif()
if(NOT EXISTS "${_QT_CORE_DIR}")
message(FATAL_ERROR "Could not find 'include/QtCore' in '${_QT_DIR}'")
Expand All @@ -45,49 +51,64 @@ endfunction()
# Sets the QT_CMAKE_PREFIX_PATH and QT_DIR variables
# Also enables CMAKE_AUTOMOC and CMAKE_AUTORCC
macro(setup_qt)
# if we are in a development build and QT_CMAKE_PREFIX_PATH is specified
# then use it,
# otherwise, use the vcpkg'ed version
if(NOT DEFINED QT_CMAKE_PREFIX_PATH)
message(FATAL_ERROR "QT_CMAKE_PREFIX_PATH should have been set by hifi_qt.py")
endif()
if (DEV_BUILD)
if (DEFINED ENV{QT_CMAKE_PREFIX_PATH})
set(QT_CMAKE_PREFIX_PATH $ENV{QT_CMAKE_PREFIX_PATH})
endif()
endif()
if ($ENV{VIRCADIA_USE_SYSTEM_QT})
message(STATUS "Using system Qt")
else()
# if we are in a development build and QT_CMAKE_PREFIX_PATH is specified
# then use it,
# otherwise, use the vcpkg'ed version
if(NOT DEFINED QT_CMAKE_PREFIX_PATH)
# Note: This comes from qt.cmake generated by hifi_qt.py
# See the comment on top of hifi_qt.py for details.
message(FATAL_ERROR "QT_CMAKE_PREFIX_PATH should have been set by hifi_qt.py through qt.cmake")
endif()
if (DEV_BUILD)
if (DEFINED ENV{QT_CMAKE_PREFIX_PATH})
set(QT_CMAKE_PREFIX_PATH $ENV{QT_CMAKE_PREFIX_PATH})
endif()
endif()

message("QT_CMAKE_PREFIX_PATH = " ${QT_CMAKE_PREFIX_PATH})
# figure out where the qt dir is
get_filename_component(QT_DIR "${QT_CMAKE_PREFIX_PATH}/../../" ABSOLUTE)
set(QT_VERSION "unknown")
calculate_qt5_version(QT_VERSION "${QT_DIR}")
if (QT_VERSION STREQUAL "unknown")
message(FATAL_ERROR "Could not determine QT_VERSION")
endif()

# figure out where the qt dir is
get_filename_component(QT_DIR "${QT_CMAKE_PREFIX_PATH}/../../" ABSOLUTE)
set(QT_VERSION "unknown")
calculate_qt5_version(QT_VERSION "${QT_DIR}")
if (QT_VERSION STREQUAL "unknown")
message(FATAL_ERROR "Could not determine QT_VERSION")
endif()
if(WIN32)
# windows shell does not like backslashes expanded on the command line,
# so convert all backslashes in the QT path to forward slashes
string(REPLACE \\ / QT_CMAKE_PREFIX_PATH ${QT_CMAKE_PREFIX_PATH})
string(REPLACE \\ / QT_DIR ${QT_DIR})
endif()

if(WIN32)
# windows shell does not like backslashes expanded on the command line,
# so convert all backslashes in the QT path to forward slashes
string(REPLACE \\ / QT_CMAKE_PREFIX_PATH ${QT_CMAKE_PREFIX_PATH})
string(REPLACE \\ / QT_DIR ${QT_DIR})
endif()
if(NOT EXISTS "${QT_CMAKE_PREFIX_PATH}/Qt5Core/Qt5CoreConfig.cmake")
message(FATAL_ERROR "Unable to locate Qt5CoreConfig.cmake in '${QT_CMAKE_PREFIX_PATH}'")
endif()

if(NOT EXISTS "${QT_CMAKE_PREFIX_PATH}/Qt5Core/Qt5CoreConfig.cmake")
message(FATAL_ERROR "Unable to locate Qt5CoreConfig.cmake in '${QT_CMAKE_PREFIX_PATH}'")
endif()
set(RCC_BINARY "${QT_DIR}/bin/rcc${CMAKE_EXECUTABLE_SUFFIX}")

message(STATUS "Using Qt build in : '${QT_DIR}' with version ${QT_VERSION}")
if(NOT EXISTS "${RCC_BINARY}")
set(RCC_BINARY "${QT_DIR}/bin/rcc-qt5${CMAKE_EXECUTABLE_SUFFIX}")
endif()

if(NOT EXISTS "${RCC_BINARY}")
message(FATAL_ERROR "Unable to locate rcc. Last looked in '${RCC_BINARY}'")
endif()


message(STATUS "Using Qt build in : '${QT_DIR}' with version ${QT_VERSION}")
if (WIN32)
add_paths_to_fixup_libs("${QT_DIR}/bin")
endif ()

endif()

# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)

# Instruct CMake to run rcc automatically when needed
set(CMAKE_AUTORCC ON)

if (WIN32)
add_paths_to_fixup_libs("${QT_DIR}/bin")
endif ()

endmacro()
6 changes: 3 additions & 3 deletions cmake/ports/draco/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ include(vcpkg_common_functions)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/draco
REF 1.3.3
SHA512 80ed5a623046822f5bb26b2454c8ee8cc93ffe9eb3012e8461cefdfc577b26d69a92ea0f0c5e14f5f48c1ef99f9a7263b01710df376792e74358ae14e49c3897
REPO vircadia/draco
REF 1.3.5-fixed
SHA512 68bb15de013093077946d431ab1f4080b84a66d45d20873f2c0dc44aa28034fb4ec1f6e24f9300fde563da53943b73d47163b9c6acf2667312128c50c6d075bd
HEAD_REF master
)

Expand Down
13 changes: 11 additions & 2 deletions cmake/ports/quazip/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
include(vcpkg_common_functions)

file(READ "${VCPKG_ROOT_DIR}/_env/QT_CMAKE_PREFIX_PATH.txt" QT_CMAKE_PREFIX_PATH)
if(EXISTS "${VCPKG_ROOT_DIR}/_env/QT_CMAKE_PREFIX_PATH.txt")
# This environment var file only exists if we're overridding the default Qt location,
# which happens when using Qt from vcpkg, or using Qt from custom location
file(READ "${VCPKG_ROOT_DIR}/_env/QT_CMAKE_PREFIX_PATH.txt" QT_CMAKE_PREFIX_PATH)
set(QUAZIP_EXTRA_OPTS "-DCMAKE_PREFIX_PATH=${QT_CMAKE_PREFIX_PATH}")
else()
# In the case of using system Qt, don't pass anything.
set(QUAZIP_EXTRA_OPTS "")
endif()

file(READ "${VCPKG_ROOT_DIR}/_env/EXTERNAL_BUILD_ASSETS.txt" EXTERNAL_BUILD_ASSETS)

vcpkg_download_distfile(
Expand All @@ -19,7 +28,7 @@ vcpkg_extract_source_archive_ex(
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_PREFIX_PATH=${QT_CMAKE_PREFIX_PATH} -DBUILD_WITH_QT4=OFF
OPTIONS -DCMAKE_POSITION_INDEPENDENT_CODE=ON ${QUAZIP_EXTRA_OPTS} -DBUILD_WITH_QT4=OFF
)

vcpkg_install_cmake()
Expand Down
Loading