|
7 | 7 | - macOS, Ubuntu, ArchLinux: run `setup.ps1` in `axmol` root directory (recommended). |
8 | 8 | - Windows 10+: system installed PowerShell 5.x should work. You will need to run the command `Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force` in order to allow PowerShell script to run. This will allow execution of PowerShell scripts for the current user, which is required if you have downloaded the ZIP release of Axmol. If you instead cloned the Axmol repository, then you can use `Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned -Force` instead, which is more secure. |
9 | 9 | - Manual installation: [Instructions](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell) / [Download](https://github.com/PowerShell/PowerShell/releases) |
10 | | -- **CMake 3.28.1+** |
| 10 | +- **CMake 4.2.0+** |
11 | 11 | - Manual installation is recommended ([download](https://cmake.org/download/)). Make sure to add CMake bin to the system `PATH`, otherwise `axmol build` will auto-setup it to `tools/external/cmake`. |
12 | 12 |
|
13 | 13 | ## Prerequisites |
|
17 | 17 | 3. Run `setup.ps1` in windows powershell or (macOS/Linux/ArchLinux terminal). |
18 | 18 | 4. Restart the console after it has finished for environment variables to take effect. |
19 | 19 | 5. Ensure that the C / C++ compiler toolset is installed on your host machine. |
20 | | - - Windows: Visual Studio 2022 with desktop workflow |
| 20 | + - Windows: Visual Studio 2022/2026 with desktop workflow |
21 | 21 | - macOS: XCode 14.2+ |
22 | 22 | - Linux: GCC (G++) |
23 | 23 |
|
@@ -118,31 +118,55 @@ Using a PowerShell console window (command `pwsh`), go to `axmol\tests\<testdir |
118 | 118 |
|
119 | 119 | ## Manually build with CMake |
120 | 120 |
|
121 | | -### Windows (Visual Studio 2022) |
122 | | - |
123 | | - 1. Install [CMake 3.27.4+](https://cmake.org/download/). |
124 | | - 2. Install Visual Studio 2022. |
125 | | - 3. Create a new project as shown [here](#creating-a-new-project). |
126 | | - 4. In a console window, navigate into the root directory of the project you created in the previous step. |
127 | | - 5. Generate the relevant Visual Studio project using the cmake command: |
128 | | - |
129 | | - ```axmol build``` command described in the previous sections (preferred method) |
130 | | - or |
131 | | - ```cmake -S SOURCE_DIR -B BUILD_DIR -G VISUAL_STUDIO_VERSION_STRING -A [Win32|x64]``` |
132 | | - |
133 | | - For example, let's say `SOURCE_DIR` is the current path `"."`, and `BUILD_DIR` (out-of-source build directory) is named `"build"`: |
134 | | - |
135 | | - (Since Axmol 2.1 c++20 is required for all platforms) |
136 | | - - 32 bit Visual Studio 2019: |
137 | | - ```cmake -S . -B build -G "Visual Studio 16 2019" -A Win32``` |
138 | | - - 64 bit Visual Studio 2019: |
139 | | - ```cmake -S . -B build -G "Visual Studio 16 2019" -A x64``` |
140 | | - - 32 bit Visual Studio 2022: |
141 | | - ```cmake -S . -B build -G "Visual Studio 17 2022" -A Win32``` |
142 | | - - 64 bit Visual Studio 2022: |
143 | | - ```cmake -S . -B build -G "Visual Studio 17 2022" -A x64``` |
144 | | - |
145 | | - 6. Use Visual Studio to open the newly created solution file. For example, `./build/ProjectName.sln`. |
| 121 | +### Windows (Visual Studio 2022/2026) |
| 122 | + |
| 123 | +> **Note:** Visual Studio 2026 is supported, but requires [CMake 4.2.0+](https://cmake.org/download/). |
| 124 | +> Use generator string `-G "Visual Studio 18 2026"` when invoking cmake. |
| 125 | +
|
| 126 | +1. Install [CMake 4.2.0+](https://cmake.org/download/). |
| 127 | +2. Install Visual Studio 2022 (or 2026 if preferred). |
| 128 | +3. Create a new project as shown [here](#creating-a-new-project). |
| 129 | +4. In a console window, navigate to the root directory of your project. |
| 130 | +5. Generate the Visual Studio project using either: |
| 131 | + - The recommended shortcut: |
| 132 | + ```bash |
| 133 | + axmol build |
| 134 | + ``` |
| 135 | + - Or directly with cmake: |
| 136 | + ```bash |
| 137 | + cmake -S SOURCE_DIR -B BUILD_DIR -G "Visual Studio <version>" -A [Win32|x64] |
| 138 | + ``` |
| 139 | + |
| 140 | + Example (`SOURCE_DIR = "."`, `BUILD_DIR = "build"`): |
| 141 | + *(Since Axmol 2.1, C++20 is required on all platforms)* |
| 142 | + |
| 143 | + - **Visual Studio 2022 (32-bit):** |
| 144 | + ```bash |
| 145 | + cmake -S . -B build -G "Visual Studio 17 2022" -A Win32 |
| 146 | + ``` |
| 147 | + - **Visual Studio 2022 (64-bit):** |
| 148 | + ```bash |
| 149 | + cmake -S . -B build -G "Visual Studio 17 2022" -A x64 |
| 150 | + ``` |
| 151 | + - **Visual Studio 2026 (64-bit):** |
| 152 | + ```bash |
| 153 | + cmake -S . -B build -G "Visual Studio 18 2026" -A x64 |
| 154 | + ``` |
| 155 | + *(requires CMake 4.2.0+)* |
| 156 | + |
| 157 | + |
| 158 | + 6. Use Visual Studio to open the newly created solution file: |
| 159 | + |
| 160 | + - **Visual Studio 2022** |
| 161 | + ```text |
| 162 | + ./build/ProjectName.sln |
| 163 | + ``` |
| 164 | + |
| 165 | + - **Visual Studio 2026** |
| 166 | + ```text |
| 167 | + ./build/ProjectName.slnx |
| 168 | + ``` |
| 169 | + *(Note: VS2026 introduces the new `.slnx` solution file format.)* |
146 | 170 |
|
147 | 171 | #### Windows UWP (Visual Studio 2022) |
148 | 172 |
|
|
0 commit comments