From 2926c3b52666e2776991820e714b5d916612637b Mon Sep 17 00:00:00 2001 From: halx99 Date: Thu, 14 Jul 2022 17:20:18 +0800 Subject: [PATCH] Fix ios device build issue --- README.md | 6 +++--- README_CN.md | 6 +++--- cmake/ios.mini.cmake | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e4363f3ab5..31d9764011 100644 --- a/README.md +++ b/README.md @@ -116,11 +116,11 @@ See [windows workflow guide](https://github.com/axis-project/axis/issues/564) ```sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer``` 3. Generate xcode project - for arm64: - ```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$axis_ROOT/cmake/ios.mini.cmake -DCMAKE_OSX_ARCHITECTURES=arm64``` + ```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AXIS_ROOT/cmake/ios.mini.cmake -DCMAKE_OSX_ARCHITECTURES=arm64``` - for armv7,arm64 combined: - ```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$axis_ROOT/cmake/ios.mini.cmake "-DCMAKE_OSX_ARCHITECTURES=armv7;arm64"``` + ```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AXIS_ROOT/cmake/ios.mini.cmake "-DCMAKE_OSX_ARCHITECTURES=armv7;arm64"``` - for simulator x86_64: - ```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$axis_ROOT/cmake/ios.mini.cmake -DCMAKE_OSX_ARCHITECTURES=x86_64``` + ```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AXIS_ROOT/cmake/ios.mini.cmake -DCMAKE_OSX_ARCHITECTURES=x86_64``` 4. After cmake finishes generating, you can open the xcode project at ```build``` folder and run cpp-tests or other test targets. 5. Notes diff --git a/README_CN.md b/README_CN.md index 1fc48b4a3c..a346f1b8ce 100644 --- a/README_CN.md +++ b/README_CN.md @@ -85,11 +85,11 @@ ```sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer``` 3. 生成xcode工程, 进入axis根目录执行如下命令之一: - for arm64: - ```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=cmake/ios.mini.cmake -DCMAKE_OSX_ARCHITECTURES=arm64``` + ```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AXIS_ROOT/cmake/ios.mini.cmake -DCMAKE_OSX_ARCHITECTURES=arm64``` - for armv7,arm64 combined: - ```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=cmake/ios.mini.cmake "-DCMAKE_OSX_ARCHITECTURES=armv7;arm64"``` + ```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AXIS_ROOT/cmake/ios.mini.cmake "-DCMAKE_OSX_ARCHITECTURES=armv7;arm64"``` - for simulator x86_64: - ```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=cmake/ios.mini.cmake -DCMAKE_OSX_ARCHITECTURES=x86_64``` + ```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=$AXIS_ROOT/cmake/ios.mini.cmake -DCMAKE_OSX_ARCHITECTURES=x86_64``` 4. 之后就可以用xcode打开, 选择cpp-tests编译运行 diff --git a/cmake/ios.mini.cmake b/cmake/ios.mini.cmake index af28cff9a6..fa742157b0 100644 --- a/cmake/ios.mini.cmake +++ b/cmake/ios.mini.cmake @@ -52,7 +52,7 @@ endif() # Sets CMAKE_SYSTEM_PROCESSOR for iphoneos and iphonesimulator string(TOLOWER "${CMAKE_OSX_SYSROOT}" lowercase_CMAKE_OSX_SYSROOT) if("${lowercase_CMAKE_OSX_SYSROOT}" MATCHES "iphonesimulator") - set(IOS_PLATFORM "SIMULATOR" CACHE STRING "") + set(IMC_IOS_PLAT "SIMULATOR" CACHE STRING "") if("${CMAKE_OSX_ARCHITECTURES}" MATCHES "i386") set(CMAKE_SYSTEM_PROCESSOR i386) elseif("${CMAKE_OSX_ARCHITECTURES}" MATCHES "x86_64") @@ -65,6 +65,6 @@ if("${lowercase_CMAKE_OSX_SYSROOT}" MATCHES "iphonesimulator") endif() endif() else() - set(IOS_PLATFORM "DEVICE" CACHE STRING "") + set(IMC_IOS_PLAT "DEVICE" CACHE STRING "") set(CMAKE_SYSTEM_PROCESSOR arm64) endif()