vcpkg: support building on Linux

This commit is contained in:
Nadia Holmquist Pedersen
2024-09-06 22:50:12 +02:00
parent d18524d5ac
commit 268c4f14c1
3 changed files with 45 additions and 2 deletions

View File

@ -25,6 +25,11 @@ else()
option(USE_QT6 "Build using Qt 6 instead of 5" OFF)
endif()
# Since the Linux build pulls in glib anyway, we can just use upstream libslirp
if (UNIX AND NOT APPLE)
option(USE_SYSTEM_LIBSLIRP "Use system libslirp instead of the bundled version" ON)
endif()
if (NOT USE_QT6)
list(APPEND VCPKG_MANIFEST_FEATURES qt5)
set(VCPKG_MANIFEST_NO_DEFAULT_FEATURES ON)
@ -62,6 +67,14 @@ if (USE_RECOMMENDED_TRIPLETS)
# TODO Windows arm64 if possible
set(_CAN_TARGET_AS_HOST ON)
set(_WANTED_TRIPLET x64-mingw-static-release)
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL Linux)
# Can't really detect cross compiling here.
set(_CAN_TARGET_AS_HOST ON)
if (_HOST_PROCESSOR STREQUAL x86_64)
set(_WANTED_TRIPLET x64-linux-release)
elseif(_HOST_PROCESSOR STREQUAL "aarch64")
set(_WANTED_TRIPLET arm64-linux-release)
endif()
endif()
# Don't override it if the user set something else