Do not build libuv on Mac OS X 10.4 and lower
It needs APIs that have been available only since 10.5. Also check that the CoreServices header can be included.
This commit is contained in:
parent
8a5beef32e
commit
219f741128
|
@ -468,6 +468,20 @@ macro (CMAKE_BUILD_UTILITIES)
|
|||
# Build libuv library.
|
||||
if(NOT DEFINED CMAKE_USE_LIBUV)
|
||||
set(CMAKE_USE_LIBUV 1)
|
||||
if(APPLE)
|
||||
include(CheckCSourceCompiles)
|
||||
check_c_source_compiles("
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#include <AvailabilityMacros.h>
|
||||
#ifndef MAC_OS_X_VERSION_10_5
|
||||
#error \"MAC_OS_X_VERSION_10_5 is not defined\"
|
||||
#endif
|
||||
int main(void) { return 0; }
|
||||
" HAVE_CoreServices_OS_X_10_5)
|
||||
if(NOT HAVE_CoreServices_OS_X_10_5)
|
||||
set(CMAKE_USE_LIBUV 0)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(CMAKE_USE_LIBUV)
|
||||
if(CMAKE_USE_SYSTEM_LIBUV)
|
||||
|
|
Loading…
Reference in New Issue