diff --git a/CMakeLists.txt b/CMakeLists.txt index 645d92689..a97174de4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -119,6 +119,7 @@ IF (IOS) IF (NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE "Release") ENDIF (NOT CMAKE_BUILD_TYPE) + ADD_DEFINITIONS(-DENABLE_BITCODE) ENDIF (IOS) # Use subset of Windows.h @@ -126,6 +127,7 @@ if (WIN32) ADD_DEFINITIONS( -DWIN32_LEAN_AND_MEAN ) endif() + IF(MSVC) OPTION( ASSIMP_INSTALL_PDB "Install MSVC debug files." diff --git a/port/iOS/IPHONEOS_ARM64E_TOOLCHAIN.cmake b/port/iOS/IPHONEOS_ARM64E_TOOLCHAIN.cmake new file mode 100644 index 000000000..0cf2b6b66 --- /dev/null +++ b/port/iOS/IPHONEOS_ARM64E_TOOLCHAIN.cmake @@ -0,0 +1,17 @@ +INCLUDE(CMakeForceCompiler) + +SET (CMAKE_CROSSCOMPILING TRUE) +SET (CMAKE_SYSTEM_NAME "Darwin") +SET (CMAKE_SYSTEM_PROCESSOR "arm64e") +SET (IOS TRUE) + +SET (IOS_SDK_DEVICE iPhoneOS) + +SET (SDKVER "${IOS_SDK_VERSION}") +SET (DEVROOT "${XCODE_ROOT_DIR}/Platforms/${IOS_SDK_DEVICE}.platform/Developer") + + +SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}") +SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) \ No newline at end of file diff --git a/port/iOS/build.sh b/port/iOS/build.sh index 288c9c4a4..f118c45c1 100755 --- a/port/iOS/build.sh +++ b/port/iOS/build.sh @@ -31,7 +31,7 @@ TOOLCHAIN=$XCODE_ROOT_DIR/Toolchains/XcodeDefault.xctoolchain CMAKE_C_COMPILER=$(xcrun -find cc) CMAKE_CXX_COMPILER=$(xcrun -find c++) -BUILD_ARCHS_DEVICE="arm64 armv7s armv7" +BUILD_ARCHS_DEVICE="arm64e arm64 armv7s armv7" BUILD_ARCHS_SIMULATOR="x86_64 i386" BUILD_ARCHS_ALL=($BUILD_ARCHS_DEVICE $BUILD_ARCHS_SIMULATOR)