diff --git a/CMakeLists.txt b/CMakeLists.txt index 44b77de48..625ebb334 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,6 +82,13 @@ if(WIN32) endif() endif() +if (APPLE) + if (NOT CMAKE_OSX_DEPLOYMENT_TARGET) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "OS X Deployment target (SDK version)" FORCE) + endif () + message(STATUS "Mac OS deployment target (SDK version): ${CMAKE_OSX_DEPLOYMENT_TARGET}") +endif () + if (CMAKE_SYSTEM_NAME STREQUAL "Linux") # Workaround for an old CMake, which does not understand CMAKE_CXX_STANDARD. add_compile_options(-std=c++11 -Wall -Wno-reorder) diff --git a/deps/deps-macos.cmake b/deps/deps-macos.cmake index 10c15dace..720ec50d0 100644 --- a/deps/deps-macos.cmake +++ b/deps/deps-macos.cmake @@ -23,8 +23,8 @@ ExternalProject_Add(dep_boost variant=release threading=multi boost.locale.icu=off - "cflags=cflags=-fPIC -mmacosx-version-min=${DEPS_OSX_TARGET}" - "cxxflags=cxxflags=-fPIC -mmacosx-version-min=${DEPS_OSX_TARGET}" + "cflags=-fPIC -mmacosx-version-min=${DEPS_OSX_TARGET}" + "cxxflags=-fPIC -mmacosx-version-min=${DEPS_OSX_TARGET}" install INSTALL_COMMAND "" # b2 does that already )