From 1cf75c0cabff9699ab80d078629f9af0f71f1ec1 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Fri, 21 Feb 2014 16:08:49 +0400 Subject: [PATCH] Hardcode iOS's endianness, since the TestBigEndian module doesn't work there --- CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b5fbb9f2b2..fb49497412 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -448,8 +448,15 @@ include(cmake/OpenCVModule.cmake) # ---------------------------------------------------------------------------- # Detect endianness of build platform # ---------------------------------------------------------------------------- -include(TestBigEndian) -test_big_endian(WORDS_BIGENDIAN) + +if(CMAKE_SYSTEM_NAME STREQUAL iOS) + # test_big_endian needs try_compile, which doesn't work for iOS + # http://public.kitware.com/Bug/view.php?id=12288 + set(WORDS_BIGENDIAN 0) +else() + include(TestBigEndian) + test_big_endian(WORDS_BIGENDIAN) +endif() # ---------------------------------------------------------------------------- # Detect 3rd-party libraries -- GitLab