From e4552cf9052b64f80d93695a751ecbd02e1dc0fe Mon Sep 17 00:00:00 2001 From: Anthony Bilinski Date: Wed, 16 Mar 2022 01:58:22 -0700 Subject: [PATCH] chore(CI): Add support for building toxcore and toxext for macOS CMAKE_OSX_DEPLOYMENT_TARGET has no effect when not building for macOS. --- buildscripts/build_toxcore.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/buildscripts/build_toxcore.sh b/buildscripts/build_toxcore.sh index 6395895e8..25254bd7a 100755 --- a/buildscripts/build_toxcore.sh +++ b/buildscripts/build_toxcore.sh @@ -10,7 +10,7 @@ readonly SCRIPT_DIR="$(dirname "$(realpath "$0")")" source "${SCRIPT_DIR}/build_utils.sh" -parse_arch --dep "toxcore and toxext extensions" --supported "win32 win64" "$@" +parse_arch --dep "toxcore and toxext extensions" --supported "win32 win64 macos" "$@" build_toxcore() { TOXCORE_SRC="$(realpath toxcore)" @@ -26,6 +26,7 @@ build_toxcore() { -DENABLE_STATIC=OFF \ -DENABLE_SHARED=ON \ "${CMAKE_TOOLCHAIN_FILE}" \ + "-DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOS_MINIMUM_SUPPORTED_VERSION}" \ . cmake --build . -- "-j${MAKE_JOBS}" @@ -45,6 +46,7 @@ build_toxext() { cmake "-DCMAKE_INSTALL_PREFIX=${DEP_PREFIX}" \ -DCMAKE_BUILD_TYPE=Release \ "${CMAKE_TOOLCHAIN_FILE}" \ + "-DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOS_MINIMUM_SUPPORTED_VERSION}" \ . cmake --build . -- "-j${MAKE_JOBS}" @@ -64,6 +66,7 @@ build_toxext_messages() { cmake "-DCMAKE_INSTALL_PREFIX=${DEP_PREFIX}" \ -DCMAKE_BUILD_TYPE=Release \ "${CMAKE_TOOLCHAIN_FILE}" \ + "-DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOS_MINIMUM_SUPPORTED_VERSION}" \ . cmake --build . -- "-j${MAKE_JOBS}" cmake --build . --target install