summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-08-25 17:43:50 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-31 13:05:14 (GMT)
commit219f741128bfe1f34a97d71fa3bcdf8588d3d890 (patch)
tree67a1fcd8182b8dd01006ef8ec88116bd17a944da /CMakeLists.txt
parent8a5beef32e007e69a8b348afa8ed2bddd760199a (diff)
downloadCMake-219f741128bfe1f34a97d71fa3bcdf8588d3d890.zip
CMake-219f741128bfe1f34a97d71fa3bcdf8588d3d890.tar.gz
CMake-219f741128bfe1f34a97d71fa3bcdf8588d3d890.tar.bz2
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 13e2401..b62f6a5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)