CMake: Fixes/Tweaks for macOS building with C++ 11
Make sure the deployment target is set to 10.9 when using C++11 Also ensure building C++11 on macOS for non Xcode builds
This commit is contained in:
parent
89148ea72e
commit
0a94c1890f
2 changed files with 14 additions and 3 deletions
|
|
@ -20,7 +20,12 @@ endif()
|
|||
if(APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
# If no deployment target has been set default to the minimum supported
|
||||
# OS X version (this has to be set before the first project() call)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7 CACHE STRING "OS X Deployment Target")
|
||||
if(CMAKE_CXX_STANDARD EQUAL 11 OR CMAKE_CXX_STANDARD EQUAL 14)
|
||||
set(OSX_DEFAULT_DEPLOYMENT_TARGET 10.9)
|
||||
else()
|
||||
set(OSX_DEFAULT_DEPLOYMENT_TARGET 10.7)
|
||||
endif()
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET ${OSX_DEFAULT_DEPLOYMENT_TARGET} CACHE STRING "OS X Deployment Target")
|
||||
endif()
|
||||
|
||||
project(wxWidgets)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue