From 9086a00332f940d932dde2e5911278477a52aa66 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 11 Dec 2017 02:01:33 -0800 Subject: [PATCH] Qt: Fix Qt 5.10-induced bitrot --- src/platform/qt/CMakeLists.txt | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/platform/qt/CMakeLists.txt b/src/platform/qt/CMakeLists.txt index 5f0c28e20..d1bfe234b 100644 --- a/src/platform/qt/CMakeLists.txt +++ b/src/platform/qt/CMakeLists.txt @@ -2,13 +2,6 @@ if(NOT MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") endif() -if(APPLE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7") - if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") - endif() -endif() - set(PLATFORM_SRC) set(QT_STATIC OFF) @@ -41,6 +34,17 @@ if(NOT Qt5Widgets_FOUND) return() endif() +if(APPLE) + if(Qt5Widgets_VERSION MATCHES "^5.1[0-9]") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.8") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7") + endif() + if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + endif() +endif() + if(BUILD_GL) list(APPEND PLATFORM_SRC ${CMAKE_SOURCE_DIR}/src/platform/opengl/gl.c) if(NOT WIN32 OR USE_EPOXY)