Skip to content

Commit 860b537

Browse files
PatriceJiangminggo
authored andcommitted
update readme (#20109)
1 parent 9df47ef commit 860b537

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ open Cocos2d-x.xcodeproj
5656
```sh
5757
cd cocos2d-x
5858
mkdir ios-build && cd ios-build
59-
cmake .. -GXcode -DCMAKE_TOOLCHAIN_FILE=../cmake/ios.toolchain.cmake
59+
cmake .. -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos
6060
open Cocos2d-x.xcodeproj
6161
```
6262

63-
The default build is for running on iOS device, if you want to run in the simulator, please add `-DIOS_PLATFORM=SIMULATOR` for architecture i386 or `-DIOS_PLATFORM=SIMULATOR64` for x86_64, but remember you can't run metal-support app in simulator because Apple limitation.
63+
The parameter `-DCMAKE_OSX_SYSROOT=iphoneos` is optional, it generates a build for running on the iOS device. If you want to run in the simulator, please add `-DCMAKE_OSX_SYSROOT=iphonesimulator`, but remember you can't run a metal-support app in the simulator until Xcode 11.
6464

6565
if you want to sign iOS app in CMake, you will need to fill development team ID into `set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "")`, or select to sign in Xcode after project files generated.
6666

0 commit comments

Comments
 (0)