From 11cbc139d8508aaf79fa1a8891723231dd2e38c8 Mon Sep 17 00:00:00 2001 From: egorpugin Date: Thu, 19 Mar 2015 11:34:04 +0000 Subject: [PATCH] [build] [cmake] Add some iOS ifdefs. Hide wrong include dir during crosscompiling. --- CMakeLists.txt | 2 +- builds/cmake/Configure.cmake | 2 +- src/isql/InputDevices.cpp | 2 +- src/yvalve/config/os/darwin/config_root.cpp | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b16ef83772..0a01c8e87c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -228,8 +228,8 @@ endif() if (APPLE) set(OS_DIR darwin) - include_directories(/opt/local/include) if (NOT CMAKE_CROSSCOMPILING) + include_directories(/opt/local/include) link_directories(/opt/local/lib) endif() diff --git a/builds/cmake/Configure.cmake b/builds/cmake/Configure.cmake index 1eec8be6cf..16a4104271 100644 --- a/builds/cmake/Configure.cmake +++ b/builds/cmake/Configure.cmake @@ -66,7 +66,7 @@ if (ANDROID) endif() if (IOS) - set(CMAKE_SYSTEM_PROCESSOR "arm") # armv7 ? + set(CMAKE_SYSTEM_PROCESSOR "armv7") add_definitions(-D__arm__) endif() diff --git a/src/isql/InputDevices.cpp b/src/isql/InputDevices.cpp index f8c3410900..77e632c781 100644 --- a/src/isql/InputDevices.cpp +++ b/src/isql/InputDevices.cpp @@ -22,7 +22,7 @@ */ #include "firebird.h" -#ifdef DARWIN +#if defined(DARWIN) && !defined(IOS) #if defined(i386) || defined(__x86_64__) #include #else diff --git a/src/yvalve/config/os/darwin/config_root.cpp b/src/yvalve/config/os/darwin/config_root.cpp index dd0c8aeecf..bcb7868721 100644 --- a/src/yvalve/config/os/darwin/config_root.cpp +++ b/src/yvalve/config/os/darwin/config_root.cpp @@ -37,7 +37,9 @@ #include "../common/os/path_utils.h" #include "../common/file_params.h" +#ifndef IOS #include +#endif #include #include #include