Skip to content

Commit 6393a61

Browse files
committed
build: Set CMAKE_OSX_DEPLOYMENT_TARGET to 10.15 for better compatibility
1 parent bb44ac6 commit 6393a61

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ project(Disflux VERSION 1.1.1) # Disflux-Version
77
set(CMAKE_CXX_STANDARD 23)
88
set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS TRUE)
99
set(EXT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external)
10+
11+
# Set macOS deployment target for older macOS compatibility
12+
if(APPLE)
13+
# macOS 12.0 (Monterey) is the minimum for reliable C++23 support
14+
set(CMAKE_OSX_DEPLOYMENT_TARGET "12.0" CACHE STRING "Minimum macOS deployment target")
15+
endif()
1016
include(cmake/get_cpm.cmake)
1117

1218
# Add external dependencies
@@ -19,7 +25,7 @@ CPMAddPackage(
1925
CPMAddPackage(
2026
NAME DMT
2127
GITHUB_REPOSITORY Dimethoxy/DMT
22-
GIT_TAG 25.1.3
28+
GIT_TAG v25.1.3
2329
SOURCE_DIR ${EXT_DIR}/dmt
2430
)
2531
CPMAddPackage(

CMakePresets.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@
7979
"cacheVariables": {
8080
"CMAKE_BUILD_TYPE": "Debug",
8181
"CMAKE_C_COMPILER": "/usr/bin/clang",
82-
"CMAKE_CXX_COMPILER": "/usr/bin/clang++"
82+
"CMAKE_CXX_COMPILER": "/usr/bin/clang++",
83+
"CMAKE_OSX_DEPLOYMENT_TARGET": "10.15"
8384
},
8485
"environment": {
8586
"CC": "/usr/bin/clang",
@@ -100,7 +101,8 @@
100101
"cacheVariables": {
101102
"CMAKE_BUILD_TYPE": "Release",
102103
"CMAKE_C_COMPILER": "/usr/bin/clang",
103-
"CMAKE_CXX_COMPILER": "/usr/bin/clang++"
104+
"CMAKE_CXX_COMPILER": "/usr/bin/clang++",
105+
"CMAKE_OSX_DEPLOYMENT_TARGET": "10.15"
104106
},
105107
"environment": {
106108
"CC": "/usr/bin/clang",

external/dmt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 92c757ef51bf6474be9433eaedc803831fc10c03
1+
Subproject commit dc66506a83c1b38f3a255c042ef1fdd4562c2509

external/juce

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit f72bad64d29715216226685810c5196bd0d79d77
1+
Subproject commit 1b460fe0895635a2ab8ac5c00cb5575e33e5dc1e

src/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ project(DisfluxPlugin VERSION 1.1.1) # Disflux-Version
88
# If we are on MacOS, we need to build for arm64 and x86_64
99
if (APPLE)
1010
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
11+
# Apparently macOS 12.0 is the minimum for reliable C++23 support
12+
# But we yolo it and just hope for the best on older macOS versions
13+
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15")
1114
endif()
1215

1316
# Option to disable update notification (default OFF)

0 commit comments

Comments
 (0)