Browse Source

Tweak to only override CMAKE_OSX_ARCHITECTURES if its not set

David Wimsey 11 years ago
parent
commit
cbe07bd13a
1 changed files with 4 additions and 2 deletions
  1. 4 2
      Build/cmake/Platform/iOS.cmake

+ 4 - 2
Build/cmake/Platform/iOS.cmake

@@ -141,10 +141,12 @@ set (CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Sysroot used for iOS su
 if (${IOS_PLATFORM} STREQUAL "OS")
 if (${IOS_PLATFORM} STREQUAL "OS")
 	set (IOS_ARCH armv6 armv7 armv7s arm64)
 	set (IOS_ARCH armv6 armv7 armv7s arm64)
 else (${IOS_PLATFORM} STREQUAL "OS")
 else (${IOS_PLATFORM} STREQUAL "OS")
-	set (IOS_ARCH i386)
+	set (IOS_ARCH i386 x86_64)
 endif (${IOS_PLATFORM} STREQUAL "OS")
 endif (${IOS_PLATFORM} STREQUAL "OS")
 
 
-set (CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE string  "Build architecture for iOS")
+if (NOT DEFINED CMAKE_OSX_ARCHITECTURES)
+	set (CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE string  "Build architecture for iOS")
+endif (NOT DEFINED CMAKE_OSX_ARCHITECTURES)
 
 
 # Set the find root to the iOS developer roots and to user defined paths
 # Set the find root to the iOS developer roots and to user defined paths
 set (CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_IOS_SDK_ROOT} ${CMAKE_PREFIX_PATH} CACHE string  "iOS find search path root")
 set (CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_IOS_SDK_ROOT} ${CMAKE_PREFIX_PATH} CACHE string  "iOS find search path root")