Mac build: make std C++ lib hack catch more situations

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-12-31 21:33:36 -08:00 committed by Miika Turkia
parent f9d9e0324d
commit 3657cbe021

View file

@ -69,7 +69,8 @@ set(CMAKE_MODULE_PATH
#
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ")
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND ${CMAKE_SYSTEM_VERSION} MATCHES "11.4.")
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND
(${CMAKE_SYSTEM_VERSION} MATCHES "11.4." OR ${CMAKE_OSX_DEPLOYMENT_TARGET} MATCHES "10.7" OR ${CMAKE_OSX_DEPLOYMENT_TARGET} MATCHES "10.8"))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")