You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmake/README.md
+17-3
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ CMake is an open-source, cross-platform family of tools designed to build, test
8
8
```sh
9
9
cmake --version
10
10
```
11
-
if the CMake version is lower than 3.1, please upgrade.
11
+
if the CMake version is lower than 3.6, please upgrade.
12
12
13
13
2. You should use __out-of-source__ builds, this means you need to create a different directory than __cocos2d-x__ to execute the `cmake` command.
14
14
@@ -33,7 +33,14 @@ mkdir win32-build && cd win32-build
33
33
cmake .. -G"Visual Studio 15 2017" -Tv141
34
34
```
35
35
36
-
Execute `cmake --build .` to compile, or open __Cocos2d-x.sln__ in Explorer to use the generated project.
36
+
Execute `cmake --build .` to compile,
37
+
```
38
+
cmake --build . --config Debug
39
+
cmake --build . --config Release
40
+
```
41
+
or open __Cocos2d-x.sln__ in Explorer to use the generated project.
42
+
43
+
If can't found `MSVCR110.dll` issue occurs to you, please install this [Visual C++ Runtime Libraries](https://www.microsoft.com/en-us/download/details.aspx?id=30679), when runing the cpp-tests project
The default build is for running on actual iOS hardware, if you want to run in the simulator, please add `-DIOS_PLATFORM=SIMULATOR` for architecture i386 or `-DIOS_PLATFORM=SIMULATOR64` for x86_64.
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.
64
+
65
+
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.
57
66
58
67
### Android Studio
59
68
@@ -91,6 +100,11 @@ If you want to add cmake build arguments, please add it at [external Native Buil
91
100
92
101
*`cmake --build ./msvc_build`, cmake will sellect corresponding build tools.
93
102
103
+
## Tips
104
+
105
+
1. Use `cmake ..` to refersh resources and code files, after you modify `Resources` or `CMakeLists.txt`.
106
+
1. Don't need `CMAKE_BUILD_TYPE` options when `-G` Xcode or Visual Studio, CMake scripts will generate both configurations, so you can switch `Debug` and `Release` in IDE.
107
+
94
108
## Useful Links
95
109
96
110
* CMake Official website: [cmake.org](https://cmake.org/)
0 commit comments