From 4728eaf6427db09f1b8d5a7f55eb679ecd6afe6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20H=C3=B8rl=C3=BCck=20Berg?= <36937807+henrikhorluck@users.noreply.github.com> Date: Wed, 5 Jul 2023 00:50:37 +0200 Subject: [PATCH] Don't specify a min macOS version when not needed Corrosion does not forward the `CMAKE_OSX_DEPLOYMENT_TARGET` to cargo. As a result we end up building the Rust-libraries for the default target, which is usually current macOS-version. But CMake links using the set target, so we link for a version older than we built for. To properly build for older macOS versions, the env variable `MACOSX_DEPLOYMENT_TARGET` should instead be set, which cargo, cmake and friends read by default. This can then lead to warnings if you have libraries (e.g. PCRE2) built for newer than our minimum version. Therefore we do not set a min-target by default. --- cmake/Mac.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmake/Mac.cmake b/cmake/Mac.cmake index e02ba97a5..fde2255ea 100644 --- a/cmake/Mac.cmake +++ b/cmake/Mac.cmake @@ -1,5 +1,3 @@ -set(CMAKE_OSX_DEPLOYMENT_TARGET "10.10" CACHE STRING "Minimum OS X deployment version") - # Code signing ID on Mac. # If this is falsey, codesigning is disabled. # '-' is ad-hoc codesign.