Когда я открываю папку проекта с помощью Visual Studio 2022, она начинает собирать библиотеки vcpkg, и все идет хорошо, пока не создается qtwebengine, который возвращает результат у меня ошибка:
1> [CMake] Installing 376/432 qtwebengine:x64-windows...
1> [CMake] Building qtwebengine[core,default-features,geolocation,spellchecker,webchannel]:x64-windows...
1> [CMake] -- Using cached pypa-get-pip-38e54e5de07c66e875c11a1ebbdb938854625dd8.tar.gz.
1> [CMake] -- Cleaning sources at E:/lib/vcpkg/buildtrees/qtwebengine/src/8854625dd8-861bd167bd.clean. Use --editable to skip cleaning for the packages you specify.
1> [CMake] -- Extracting source E:/lib/vcpkg/downloads/pypa-get-pip-38e54e5de07c66e875c11a1ebbdb938854625dd8.tar.gz
1> [CMake] -- Using source at E:/lib/vcpkg/buildtrees/qtwebengine/src/8854625dd8-861bd167bd.clean
1> [CMake] -- Setting up python virtual environmnent...
1> [CMake] -- Installing python packages: html5lib
1> [CMake] -- Setting up python virtual environmnent...finished.
1> [CMake] CMake Warning at ports/qtwebengine/portfile.cmake:85 (message):
1> [CMake] Buildtree path 'E:/lib/vcpkg/buildtrees/qtwebengine' is too long.
1> [CMake]
1> [CMake] Consider passing --x-buildtrees-root= to vcpkg!
1> [CMake]
1> [CMake] Trying to use 'E:/lib/vcpkg/buildtrees/qtwebengine/../tmp'
1> [CMake] Call Stack (most recent call first):
1> [CMake] scripts/ports.cmake:147 (include)
1> [CMake]
1> [CMake]
1> [CMake] CMake Error at ports/qtwebengine/portfile.cmake:90 (message):
1> [CMake] Buildtree path is too long. Build will fail! Pass
1> [CMake] --x-buildtrees-root= to vcpkg!
1> [CMake] Call Stack (most recent call first):
1> [CMake] scripts/ports.cmake:147 (include)
1> [CMake] error: building qtwebengine:x64-windows failed with: BUILD_FAILED
1> [CMake] error: Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
По сути, мне нужно установить параметр --x-buildtrees-root= при сборке библиотеки с помощью vcpkg. Я могу сделать это вручную, но как мне настроить этот параметр, чтобы он вызывался автоматически при построении зависимостей с помощью Visual Studio? Как я могу обновить файлы конфигурации?
У меня есть проект CMake, который использует vcpkg.json для использования vcpkg и CMakePresets.json для настройки параметров CMake. Это vcpkg.json: [code]{ "name": "myproj", "version": "1.0.0", "dependencies": [ "boost", "qt" ] } [/code] Это CMakePresets.json: [code]{ "version": 3, "cmakeMinimumRequired": { "major": 3, "minor": 22, "patch": 1 }, "configurePresets": [ { "name": "default", "displayName": "Default Config", "description": "Default config generator with ninja", "generator": "Ninja", "binaryDir": "${sourceDir}/build/${presetName}", "hidden": true, "cacheVariables": { "CMAKE_TOOLCHAIN_FILE": "e:/lib/vcpkg/scripts/buildsystems/vcpkg.cmake", "VCPKG_DEFAULT_TRIPLET": "x64-windows", "CMAKE_EXPORT_COMPILE_COMMANDS": "TRUE" }, "environment": { } }, { "inherits": "default", "name": "debug", "displayName": "Debug", "description": "Debug build.", "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" } }, { "inherits": "default", "name": "release", "displayName": "Release", "description": "Release build.", "cacheVariables": { "CMAKE_BUILD_TYPE": "Release" } } ], "buildPresets": [ { "name": "Debug", "configurePreset": "debug" }, { "name": "Release", "configurePreset": "release" } ], "testPresets": [ { "name": "debugtest", "configurePreset": "debug", "output": {"outputOnFailure": true}, "execution": {"noTestsAction": "error", "stopOnFailure": true} } ] } [/code] Когда я открываю папку проекта с помощью Visual Studio 2022, она начинает собирать библиотеки vcpkg, и все идет хорошо, пока не создается qtwebengine, который возвращает результат у меня ошибка: [code]1> [CMake] Installing 376/432 qtwebengine:x64-windows... 1> [CMake] Building qtwebengine[core,default-features,geolocation,spellchecker,webchannel]:x64-windows... 1> [CMake] -- Using cached pypa-get-pip-38e54e5de07c66e875c11a1ebbdb938854625dd8.tar.gz. 1> [CMake] -- Cleaning sources at E:/lib/vcpkg/buildtrees/qtwebengine/src/8854625dd8-861bd167bd.clean. Use --editable to skip cleaning for the packages you specify. 1> [CMake] -- Extracting source E:/lib/vcpkg/downloads/pypa-get-pip-38e54e5de07c66e875c11a1ebbdb938854625dd8.tar.gz 1> [CMake] -- Using source at E:/lib/vcpkg/buildtrees/qtwebengine/src/8854625dd8-861bd167bd.clean 1> [CMake] -- Setting up python virtual environmnent... 1> [CMake] -- Installing python packages: html5lib 1> [CMake] -- Setting up python virtual environmnent...finished. 1> [CMake] CMake Warning at ports/qtwebengine/portfile.cmake:85 (message): 1> [CMake] Buildtree path 'E:/lib/vcpkg/buildtrees/qtwebengine' is too long. 1> [CMake] 1> [CMake] Consider passing --x-buildtrees-root= to vcpkg! 1> [CMake] 1> [CMake] Trying to use 'E:/lib/vcpkg/buildtrees/qtwebengine/../tmp' 1> [CMake] Call Stack (most recent call first): 1> [CMake] scripts/ports.cmake:147 (include) 1> [CMake] 1> [CMake] 1> [CMake] CMake Error at ports/qtwebengine/portfile.cmake:90 (message): 1> [CMake] Buildtree path is too long. Build will fail! Pass 1> [CMake] --x-buildtrees-root= to vcpkg! 1> [CMake] Call Stack (most recent call first): 1> [CMake] scripts/ports.cmake:147 (include) 1> [CMake] error: building qtwebengine:x64-windows failed with: BUILD_FAILED 1> [CMake] error: Please ensure you're using the latest port files with `git pull` and `vcpkg update`. [/code] По сути, мне нужно установить параметр --x-buildtrees-root= при сборке библиотеки с помощью vcpkg. Я могу сделать это вручную, но как мне настроить этот параметр, чтобы он вызывался автоматически при построении зависимостей с помощью Visual Studio? Как я могу обновить файлы конфигурации?