Skip to content

Commit c4ab5aa

Browse files
committed
Fix build from source on macOS
1 parent 0d0d00f commit c4ab5aa

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,13 @@ if(CMakePythonDistributions_SUPERBUILD)
6666
set(binary_archive "linux64_binary")
6767
endif()
6868
if(APPLE)
69-
string(REPLACE "." "_" binary_archive "macos${CMAKE_OSX_DEPLOYMENT_TARGET}_binary")
69+
if("${CMAKE_OSX_DEPLOYMENT_TARGET}" VERSION_LESS "10.10")
70+
message(FATAL_ERROR "Unsupported macOS deployment target: ${CMAKE_OSX_DEPLOYMENT_TARGET} is less than 10.10")
71+
elseif("${CMAKE_OSX_DEPLOYMENT_TARGET}" VERSION_LESS "10.13")
72+
set(binary_archive "macos10_10_binary")
73+
else()
74+
set(binary_archive "macos10_13_binary")
75+
endif()
7076
endif()
7177
if(WIN32)
7278
set(binary_archive "win32_binary")

0 commit comments

Comments
 (0)