From 562fd4976bae3e717e35baa13eaa582a096924d1 Mon Sep 17 00:00:00 2001 From: Adrien Bertrand Date: Fri, 27 Sep 2024 22:24:48 +0200 Subject: [PATCH] cmake: macOS: set deployment target to min supported OS by Qt --- gui/qt/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gui/qt/CMakeLists.txt b/gui/qt/CMakeLists.txt index ff343923e..600197be8 100644 --- a/gui/qt/CMakeLists.txt +++ b/gui/qt/CMakeLists.txt @@ -4,8 +4,16 @@ option(USE_QT5 "Build with Qt5 instead of Qt6" OFF) if(USE_QT5) list(APPEND VCPKG_MANIFEST_FEATURES "qt5") + if(APPLE) + set(ENV{MACOSX_DEPLOYMENT_TARGET} "10.13") + set(ENV{VCPKG_KEEP_ENV_VARS} "MACOSX_DEPLOYMENT_TARGET") + endif() else() list(APPEND VCPKG_MANIFEST_FEATURES "qt6") + if(APPLE) + set(ENV{MACOSX_DEPLOYMENT_TARGET} "11.0") + set(ENV{VCPKG_KEEP_ENV_VARS} "MACOSX_DEPLOYMENT_TARGET") + endif() endif() option(DEPS_RELEASE_ONLY "Build only release versions of vcpkg dependencies" OFF)