summaryrefslogtreecommitdiffstats
path: root/cmake/README.md
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-06-20 13:23:19 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-06-20 11:55:01 +0000
commitfab07ca3ef277e64ccb646700f4da2f7dd3a14ce (patch)
treef5c4c3a11beb153a1ddf9cb746f914152faf5ae4 /cmake/README.md
parentaeaef4d6f316870313ed8fa88e25d3f035c337e0 (diff)
Add support for vcpkg default target triplets
As per vcpkg documentation, this is a tweak that allows respecting the vcpkg default target triplet environment variable, which simplifies the command line slightly. In order to make this also work for modules other than qtbase, we're going to need to consider the creation of a toolchain file. Change-Id: I2573f6644d671c710fd823df83e2205dbbfe19e6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
Diffstat (limited to 'cmake/README.md')
-rw-r--r--cmake/README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/README.md b/cmake/README.md
index 2580fd97fd..868b4f2d33 100644
--- a/cmake/README.md
+++ b/cmake/README.md
@@ -28,7 +28,7 @@ You may use vcpkg to install dependencies needed to build QtBase.
* Run ```bootstrap-vcpkg.bat``` or ```bootstrap-vcpkg.sh```
* Set the ``VCPKG_DEFAULT_TRIPLET`` environment variable to ``qt-x64-windows-static`` or ``qt-x86-windows-static``
* Build Qt dependencies: ``vcpkg install zlib pcre2 harfbuzz freetype openssl zstd``
- * When running cmake in qtbase, pass ``-DCMAKE_TOOLCHAIN_FILE=/path/to/your/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=%VCPKG_DEFAULT_TRIPLET%``
+ * When running cmake in qtbase, pass ``-DCMAKE_TOOLCHAIN_FILE=/path/to/your/vcpkg/scripts/buildsystems/vcpkg.cmake``
Previously CMAKE_PREFIX_PATH was mentioned instead of CMAKE_TOOLCHAIN_FILE. Setting CMAKE_PREFIX_PATH to the vcpkg installed folder is not enough, because then find_package is not overridden by vcpkg and cmake might not propagate all library dependencies for static packages (freetype is one such package).
# Building against homebrew on macOS
@@ -142,7 +142,7 @@ Vcpkg for Android can be set up using the following steps:
* Set the ``ANDROID_SDK_HOME`` environment variable to the path where you have installed the Android SDK.
* Build Qt dependencies: ``vcpkg install zlib pcre2 harfbuzz freetype openssl zstd``
-When running cmake in qtbase, pass ``-DCMAKE_TOOLCHAIN_FILE=/path/to/your/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DVCPKG_TARGET_TRIPLET=$VCPKG_DEFAULT_TRIPLET -DQT_HOST_PATH=/path/to/your/host/build -DANDROID_NATIVE_API_LEVEL=21 -DANDROID_SDK_ROOT=$ANDROID_SDK_HOME -DANDROID_STL=c++_shared -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH``
+When running cmake in qtbase, pass ``-DCMAKE_TOOLCHAIN_FILE=/path/to/your/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DQT_HOST_PATH=/path/to/your/host/build -DANDROID_NATIVE_API_LEVEL=21 -DANDROID_SDK_ROOT=$ANDROID_SDK_HOME -DANDROID_STL=c++_shared -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH``
# Debugging CMake files