diff --git a/CMakeLists.txt b/CMakeLists.txt index 7857e9c38..dd4a08829 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -249,7 +249,7 @@ if(APPLE) endif() if(NOT CMAKE_SYSTEM_VERSION VERSION_LESS "10.0") # Darwin 10.x is Mac OS X 10.6 - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.6") + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.6") endif() # Not supported until Xcode 9 if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_C_COMPILER_VERSION VERSION_LESS "9") diff --git a/src/platform/qt/CMakeLists.txt b/src/platform/qt/CMakeLists.txt index 3cfe83ad0..530fe4cfe 100644 --- a/src/platform/qt/CMakeLists.txt +++ b/src/platform/qt/CMakeLists.txt @@ -79,6 +79,7 @@ if(APPLE) endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=${MIN_VER}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${MIN_VER}") + set(CMAKE_OSX_DEPLOYMENT_TARGET ${MIN_VER}) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") endif() diff --git a/src/platform/sdl/CMakeLists.txt b/src/platform/sdl/CMakeLists.txt index d62c74694..e4dd17673 100644 --- a/src/platform/sdl/CMakeLists.txt +++ b/src/platform/sdl/CMakeLists.txt @@ -24,6 +24,7 @@ if (SDL_VERSION EQUAL "2") if(APPLE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.7") + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") endif() set(SDLMAIN_LIBRARY ${SDL2MAIN_LIBRARY}) endif()