mirror of https://github.com/axmolengine/axmol.git
Fix ios device build issue
This commit is contained in:
parent
11be5350f9
commit
a402a80ad7
|
@ -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
|
||||
|
|
|
@ -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编译运行
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue