applying CMake patch from @MaartenBent
This commit is contained in:
@@ -29,7 +29,7 @@ endif()
|
|||||||
if(APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
if(APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||||
# If no deployment target has been set default to the minimum supported
|
# 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)
|
# OS X version (this has to be set before the first project() call)
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9 CACHE STRING "OS X Deployment Target")
|
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10 CACHE STRING "OS X Deployment Target")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(build/cmake/policies.cmake NO_POLICY_SCOPE)
|
include(build/cmake/policies.cmake NO_POLICY_SCOPE)
|
||||||
|
@@ -77,14 +77,6 @@ endmacro()
|
|||||||
function(wx_set_common_target_properties target_name)
|
function(wx_set_common_target_properties target_name)
|
||||||
cmake_parse_arguments(wxCOMMON_TARGET_PROPS "DEFAULT_WARNINGS" "" "" ${ARGN})
|
cmake_parse_arguments(wxCOMMON_TARGET_PROPS "DEFAULT_WARNINGS" "" "" ${ARGN})
|
||||||
|
|
||||||
if(APPLE AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9 AND wxHAS_CXX11)
|
|
||||||
if(CMAKE_GENERATOR STREQUAL "Xcode")
|
|
||||||
set_target_properties(${target_name} PROPERTIES XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY libc++)
|
|
||||||
else()
|
|
||||||
target_compile_options(${target_name} PUBLIC "-stdlib=libc++")
|
|
||||||
target_link_libraries(${target_name} PRIVATE "-stdlib=libc++")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
set_target_properties(${target_name} PROPERTIES
|
set_target_properties(${target_name} PROPERTIES
|
||||||
LIBRARY_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${wxPLATFORM_LIB_DIR}"
|
LIBRARY_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${wxPLATFORM_LIB_DIR}"
|
||||||
ARCHIVE_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${wxPLATFORM_LIB_DIR}"
|
ARCHIVE_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${wxPLATFORM_LIB_DIR}"
|
||||||
|
@@ -11,11 +11,6 @@
|
|||||||
if(DEFINED wxBUILD_CXX_STANDARD AND NOT wxBUILD_CXX_STANDARD STREQUAL COMPILER_DEFAULT)
|
if(DEFINED wxBUILD_CXX_STANDARD AND NOT wxBUILD_CXX_STANDARD STREQUAL COMPILER_DEFAULT)
|
||||||
set(CMAKE_CXX_STANDARD ${wxBUILD_CXX_STANDARD})
|
set(CMAKE_CXX_STANDARD ${wxBUILD_CXX_STANDARD})
|
||||||
endif()
|
endif()
|
||||||
if(NOT CMAKE_CXX_STANDARD EQUAL 98)
|
|
||||||
set(wxHAS_CXX11 TRUE)
|
|
||||||
else()
|
|
||||||
set(wxHAS_CXX11 FALSE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
# Determine MSVC runtime library flag
|
# Determine MSVC runtime library flag
|
||||||
|
@@ -23,10 +23,6 @@ include(CheckTypeSize)
|
|||||||
include(CMakePushCheckState)
|
include(CMakePushCheckState)
|
||||||
include(TestBigEndian)
|
include(TestBigEndian)
|
||||||
|
|
||||||
if(APPLE AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9 AND wxHAS_CXX11)
|
|
||||||
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-stdlib=libc++")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Add a definition to setup.h and append it to a list of defines for
|
# Add a definition to setup.h and append it to a list of defines for
|
||||||
# for compile checks
|
# for compile checks
|
||||||
macro(wx_setup_definition def)
|
macro(wx_setup_definition def)
|
||||||
@@ -143,7 +139,7 @@ wx_check_c_source_compiles(
|
|||||||
stdio.h
|
stdio.h
|
||||||
)
|
)
|
||||||
#TODO: wxNO_VARIADIC_MACROS
|
#TODO: wxNO_VARIADIC_MACROS
|
||||||
if(wxUSE_STL AND NOT wxHAS_CXX11)
|
if(wxUSE_STL AND CMAKE_CXX_STANDARD EQUAL 98)
|
||||||
wx_check_cxx_source_compiles("
|
wx_check_cxx_source_compiles("
|
||||||
std::vector<int> moo;
|
std::vector<int> moo;
|
||||||
std::list<int> foo;
|
std::list<int> foo;
|
||||||
|
Reference in New Issue
Block a user