Fix static zstd linkage
Upstream's cmake build system installs libzstd_static for static builds, so look for that as well. Now we can also recommend installing it via vcpkg. Change-Id: I0ba4c45ecd90bf7b1c9f1e5f84a440caa976a23c Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
parent
13e9d88e56
commit
e4f0680c4a
@ -27,7 +27,7 @@ find_path(ZSTD_INCLUDE_DIRS
|
||||
PATH_SUFFIXES zstd)
|
||||
|
||||
find_library(ZSTD_LIBRARIES
|
||||
NAMES zstd
|
||||
NAMES zstd zstd_static
|
||||
HINTS ${PC_ZSTD_LIBDIR}
|
||||
)
|
||||
|
||||
|
@ -27,7 +27,7 @@ You may use vcpkg to install dependencies needed to build QtBase.
|
||||
* ```git clone -b qt https://github.com/tronical/vcpkg```
|
||||
* 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``
|
||||
* 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%``
|
||||
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).
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user