Skip to content

Commit

Permalink
Qt: Fix build on Mac.
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownbrackets committed Jun 6, 2018
1 parent ef08c81 commit 360e28f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Expand Up @@ -273,8 +273,13 @@ if(NOT MSVC)
if(IOS)
elseif(APPLE AND NOT CMAKE_CROSSCOMPILING)
# We want C++11, so target 10.7+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.7")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7 -stdlib=libc++ -U__STRICT_ANSI__")
if(USING_QT_UI)
set(MACOSX_VERSION_MIN "10.8")
else()
set(MACOSX_VERSION_MIN "10.7")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN} -stdlib=libc++ -U__STRICT_ANSI__")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
elseif(NOT ANDROID)
# TODO: See if we can get rid of no-psabi
Expand Down

0 comments on commit 360e28f

Please sign in to comment.