all repos — mgba @ baabe0090bb1fd5997e531fd9568c2de09b5fc21

mGBA Game Boy Advance Emulator

Qt: Fix Qt 5.10-induced bitrot
Vicki Pfau vi@endrift.com
Mon, 11 Dec 2017 02:01:33 -0800
commit

baabe0090bb1fd5997e531fd9568c2de09b5fc21

parent

e31373560535203d826687044290a4994706c2dd

1 files changed, 11 insertions(+), 7 deletions(-)

jump to
M src/platform/qt/CMakeLists.txtsrc/platform/qt/CMakeLists.txt

@@ -2,13 +2,6 @@ set(CMAKE_CXX_STANDARD 14)

set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -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)

@@ -39,6 +32,17 @@ if(NOT Qt5Widgets_FOUND)

message(WARNING "Cannot find Qt modules") set(BUILD_QT OFF PARENT_SCOPE) 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)