From 799fd5019269b8d08c2002ae08b17fd01046a9aa Mon Sep 17 00:00:00 2001 From: Alex Stewart Date: Wed, 20 Jun 2018 09:43:26 +0100 Subject: [PATCH] Ensure host-built packages are not used when building for iOS. - Add missing CMAKE_FIND_ROOT_PATH_MODE_PACKAGE = ONLY, mimicking what we previously set for INCLUDE/LIBRARY/PROGRAM s/t the standard package locations on the host system will not be searched by find_package() when cross-compiling for iOS. - Remove now unnecessary forced disabling of dependency options on iOS as they should now never be found (unless they were explicitly built for iOS) irrespective of whether the option defaults to ON initially. Change-Id: I1d2c5da4838d7becb8ebd43f90a88cfc6ded4a1f --- CMakeLists.txt | 5 ----- cmake/iOS.cmake | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b02bf7afa..500ce02a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -200,11 +200,6 @@ if (IOS) update_cache_variable(MINIGLOG ON) message(STATUS "Building for iOS: Forcing use of miniglog instead of glog.") - update_cache_variable(SUITESPARSE OFF) - update_cache_variable(CXSPARSE OFF) - update_cache_variable(GFLAGS OFF) - update_cache_variable(OPENMP OFF) - update_cache_variable(TBB OFF) # Apple claims that the BLAS call dsyrk_ is a private API, and will not allow # you to submit to the Apple Store if the symbol is present. update_cache_variable(LAPACK OFF) diff --git a/cmake/iOS.cmake b/cmake/iOS.cmake index 00752b490..bb4280250 100644 --- a/cmake/iOS.cmake +++ b/cmake/iOS.cmake @@ -312,6 +312,7 @@ set(CMAKE_SYSTEM_FRAMEWORK_PATH set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) # This little macro lets you set any XCode specific property. macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE)