From d0cd080793986f8e6787058f6ef37d5c408d2e1e Mon Sep 17 00:00:00 2001 From: mrod502 Date: Fri, 31 May 2024 17:56:22 -0400 Subject: [PATCH] build: allow user to specify min macos version --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 06b61605..0e37b923 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,6 +58,11 @@ if (ENABLE_CUSTOM_COMPILER_FLAGS) endif() endif() +option(MACOS_VERSION_MIN "Set the minimum macOS SDK version" OFF) +if (APPLE AND MACOS_VERSION_MIN) + add_compile_options(-mmacos-version-min=${MACOS_VERSION_MIN}) +endif() + option(ENABLE_SANITIZERS "Enables AddressSanitizer and UndefinedBehaviorSanitizer." OFF) if (ENABLE_SANITIZERS) list(APPEND custom_compiler_flags