summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-12-31 21:33:36 -0800
committerGravatar Miika Turkia <miika.turkia@gmail.com>2017-01-01 14:23:49 +0200
commit3657cbe021d575b50b4a266ff4ba1e82703fea9b (patch)
treed467b12a6b252f023bc80c77111330eb05dc6934 /CMakeLists.txt
parentf9d9e0324de67906d0868218d36bc478cfc97be1 (diff)
downloadsubsurface-3657cbe021d575b50b4a266ff4ba1e82703fea9b.tar.gz
Mac build: make std C++ lib hack catch more situations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cfeee5b74..30ed16d90 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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")