File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -53,13 +53,38 @@ open Cocos2d-x.xcodeproj
5353
5454### Generate iOS Project
5555
56+ * Create iOS device project*
5657``` sh
57- cd cocos2d-x
58+ cd cocos2d-
5859mkdir ios-build && cd ios-build
5960cmake .. -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos
6061open Cocos2d-x.xcodeproj
6162```
6263
64+ * Create iOS simulator project*
65+ ``` sh
66+ cd cocos2d-
67+ mkdir ios-build && cd ios-build
68+ cmake .. -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator
69+ open Cocos2d-x.xcodeproj
70+ ```
71+
72+ If you meet the error like this:
73+ ```
74+ CMake Error at CMakeLists.txt:28 (project):
75+ No CMAKE_C_COMPILER could be found.
76+
77+
78+
79+ CMake Error at CMakeLists.txt:28 (project):
80+ No CMAKE_CXX_COMPILER could be found.
81+ ```
82+
83+ Then you can set C/C++ compiler manually like this
84+ ``` sh
85+ cmake .. -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
86+ ```
87+
6388#### How do I customize the generated Xcode project?
6489
6590Xcode project settings that you want to affect both the app project and the Cocos2d-X library project should be passed on the command
You can’t perform that action at this time.
0 commit comments