Mac OS build: Set a default SDK target, fix c/cxx flags in deps/boost

This commit is contained in:
Vojtech Kral 2018-12-13 18:51:08 +01:00
parent a16e419138
commit f3e238073b
2 changed files with 9 additions and 2 deletions

View File

@ -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)

View File

@ -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
)