diff --git a/internal/frontend/bridge-gui/BridgeSetup.cmake b/internal/frontend/bridge-gui/BridgeSetup.cmake index 7c6c634c..a6471667 100644 --- a/internal/frontend/bridge-gui/BridgeSetup.cmake +++ b/internal/frontend/bridge-gui/BridgeSetup.cmake @@ -53,14 +53,6 @@ endif() set(VCPKG_ROOT "${BRIDGE_REPO_ROOT}/extern/vcpkg") message(STATUS "VCPKG_ROOT is ${VCPKG_ROOT}") -if (WIN32) - find_program(VCPKG_EXE "${VCPKG_ROOT}/vcpkg.exe") -else() - find_program(VCPKG_EXE "${VCPKG_ROOT}/vcpkg") -endif() -if (NOT VCPKG_EXE) - message(FATAL_ERROR "vcpkg is not installed. Run build.sh (macOS/Linux) or build.ps1 (Windows) first.") -endif() # For now we support only a single architecture for macOS (ARM64 or x86_64). We need to investigate how to build universal binaries with vcpkg. if (APPLE) @@ -86,5 +78,3 @@ if (WIN32) message(STATUS "Building for Intel x64 Windows computers") set(VCPKG_TARGET_TRIPLET x64-windows) endif() - -set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "toolchain") \ No newline at end of file diff --git a/internal/frontend/bridge-gui/bridge-gui/build.ps1 b/internal/frontend/bridge-gui/bridge-gui/build.ps1 index 2534dd5d..5b54b8d0 100644 --- a/internal/frontend/bridge-gui/bridge-gui/build.ps1 +++ b/internal/frontend/bridge-gui/bridge-gui/build.ps1 @@ -63,6 +63,7 @@ $buildDir=(Join-Path $scriptDir "cmake-build-$buildConfig".ToLower()) $vcpkgRoot = (Join-Path $bridgeRepoRootDir "extern/vcpkg" -Resolve) $vcpkgExe = (Join-Path $vcpkgRoot "vcpkg.exe") $vcpkgBootstrap = (Join-Path $vcpkgRoot "bootstrap-vcpkg.bat") +$vcpkgToolchain = (Join-Path $vcpkgRoot "scripts/buildsystems/vcpkg.cmake") function check_exit() { if ($? -ne $True) @@ -91,6 +92,7 @@ git submodule update --init --recursive $vcpkgRoot . $vcpkgExe install sentry-native:x64-windows grpc:x64-windows --clean-after-build . $vcpkgExe upgrade --no-dry-run . $cmakeExe -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE="$buildConfig" ` + -DCMAKE_TOOLCHAIN_FILE="$vcpkgToolchain" ` -DBRIDGE_APP_FULL_NAME="$bridgeFullName" ` -DBRIDGE_VENDOR="$bridgeVendor" ` -DBRIDGE_REVISION="$REVISION_HASH" ` diff --git a/internal/frontend/bridge-gui/bridge-gui/build.sh b/internal/frontend/bridge-gui/bridge-gui/build.sh index a2f5ad61..81112766 100755 --- a/internal/frontend/bridge-gui/bridge-gui/build.sh +++ b/internal/frontend/bridge-gui/bridge-gui/build.sh @@ -95,6 +95,7 @@ fi cmake \ -DCMAKE_BUILD_TYPE="${BUILD_CONFIG}" \ + -DCMAKE_TOOLCHAIN_FILE="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" \ -DBRIDGE_APP_FULL_NAME="${BRIDGE_APP_FULL_NAME}" \ -DBRIDGE_VENDOR="${BRIDGE_VENDOR}" \ -DBRIDGE_REVISION="${BRIDGE_REVISION}" \