From be2c20fcfd84f5a3df370a0c64673bf3da1a46c9 Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Fri, 8 Dec 2023 23:19:23 +0100 Subject: [PATCH] Update vcpkg instructions --- Set-up-Build-Environment-on-macOS.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Set-up-Build-Environment-on-macOS.md b/Set-up-Build-Environment-on-macOS.md index 4b5b941..e4d8058 100644 --- a/Set-up-Build-Environment-on-macOS.md +++ b/Set-up-Build-Environment-on-macOS.md @@ -44,14 +44,22 @@ brew install pkg-config vcpkg ``` If you installed the vcpkg stub package, set the `VCPKG_ROOT` environment variable to your install location. You can then run the `vcpkg` command from anywhere, given that Homebrew is in your `PATH`. Otherwise, call the `vcpkg` binary with its full path. -Finally, compile and install the actual build dependencies. Since Qt is extremely picky, you have to set your vcpkg triplet to either `x64-osx-release` or `arm64-osx-release` (depending on your architecture). The default `x64-osx` or `am64-osx` triplets do not work and will result only in nonsensical build failures. You can ask vcpkg to use a different triplet either by setting the `VCPKG_DEFAULT_TRIPLET` environment variable or by passing it via the `--triplet` parameter to the `vcpkg install` call. +Finally, compile and install the actual build dependencies using the `arm64-osx-dynamic` or `x64-osx-dynamic` triplets (depending on your architecture). The default `arm64-osx` or `x64-osx` triplets will compile Qt as a static library, which will give you lots of headaches. -The following packages need to be installed: +Apple Silicon: ``` -vcpkg install argon2 botan minizip qt5 qt5-svg qt5-tools qt5-imageformats \ +vcpkg --triplet=arm64-osx-dynamic install argon2 botan minizip qt5 qt5-svg qt5-tools qt5-imageformats \ qt5-macextras qt5-translations readline zlib libqrencode ``` +Intel Mac: +``` +vcpkg --triplet=x64-osx-dynamic install argon2 botan minizip qt5 qt5-svg qt5-tools qt5-imageformats \ + qt5-macextras qt5-translations readline zlib libqrencode +``` + +Hint: If you have custom `INCLUDE` or `CPATH` variables set, make sure, `.` is not part of your include path and the path variables contain no empty segmemts (which can happen easily if you construct them like `export INCLUDE="/some/include/path:${INCLUDE}"`) or else you will see strange compilation errors. + ### Update your environment regularly Homebrew: