From 19454f26e6a258b4ec7306dcb94a3483538cbf72 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Wed, 8 Apr 2020 22:02:17 +0300 Subject: [PATCH] mdbx-cmake: more for iOS. Change-Id: Iebc6fafe23b3c39462bbf497e60148daffd519a9 --- CMakeLists.dist-minimal | 10 ++++++++++ cmake/compiler.cmake | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/CMakeLists.dist-minimal b/CMakeLists.dist-minimal index d4090ba6..36c9ab51 100644 --- a/CMakeLists.dist-minimal +++ b/CMakeLists.dist-minimal @@ -72,6 +72,16 @@ else() project(libmdbx C CXX) endif() +if(NOT DEFINED IOS) + if(APPLE AND (CMAKE_SYSTEM_NAME STREQUAL "iOS" + OR DEFINED CMAKE_IOS_DEVELOPER_ROOT + OR DEFINED IOS_PLATFORM OR DEFINED IOS_ARCH)) + set(IOS TRUE) + else() + set(IOS FALSE) + endif() +endif() + if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE MinSizeRel CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." diff --git a/cmake/compiler.cmake b/cmake/compiler.cmake index 48a097ba..8713abaf 100644 --- a/cmake/compiler.cmake +++ b/cmake/compiler.cmake @@ -150,6 +150,16 @@ if(WIN32 AND CMAKE_COMPILER_IS_GNU${CMAKE_PRIMARY_LANG}) unset(__GCC_TARGET_MACHINE) endif() +if(NOT DEFINED IOS) + if(APPLE AND (CMAKE_SYSTEM_NAME STREQUAL "iOS" + OR DEFINED CMAKE_IOS_DEVELOPER_ROOT + OR DEFINED IOS_PLATFORM OR DEFINED IOS_ARCH)) + set(IOS TRUE) + else() + set(IOS FALSE) + endif() +endif() + if(CMAKE_COMPILER_IS_ELBRUSC OR CMAKE_SYSTEM_PROCESSOR MATCHES "e2k.*|E2K.*|elbrus.*|ELBRUS.*") set(E2K TRUE) set(CMAKE_SYSTEM_ARCH "Elbrus")