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: README.md
+48-8Lines changed: 48 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,22 +48,62 @@ The Python File `generate_cmake_presets.py` can be run with the following comman
48
48
python generate_cmake_presets.py
49
49
```
50
50
51
-
### 3. Build the Project
52
-
Navigate to the project root and run the following commands:
51
+
### 3. Creating Files (Skip if You're Not Creating a New File)
53
52
54
-
#### Configure CMake
55
-
```sh
56
-
cmake --preset my-build
53
+
> ⚠️ **IMPORTANT: YOU MUST DO THIS EVERY TIME YOU CREATE A NEW `.cpp` OR `.hpp` FILE.**
54
+
> If you don’t do this, the file will not be included in the project build. You must also rebuild the project after adding new files.
55
+
56
+
Depending on how you created your new file, you may need to manually move it to the correct directory. Visual Studio, for example, might place new files inside the `./build` directory.
57
+
58
+
If you used **Add Class** or **New Item** in Visual Studio:
59
+
- Move the generated `.cpp` files to the `src/` directory.
60
+
- Move the generated `.hpp` files to the `include/` directory.
61
+
62
+
Alternatively, you can just **create the files directly inside the `src/` and `include/` folders** before building.
63
+
64
+
After the files are correctly placed, you must update the `CMakeLists.txt` file so that they are included in the build:
65
+
66
+
```cmake
67
+
# Define Source Files
68
+
set(SOURCES
69
+
src/file_1.cpp
70
+
src/file_2.cpp
71
+
...
72
+
src/file_X.cpp
73
+
)
74
+
75
+
# Define Header Files
76
+
set(HEADERS
77
+
include/file_1.hpp
78
+
...
79
+
include/file_X.hpp
80
+
)
57
81
```
58
-
(`cmake --preset my-build` will create a `build/` directory automatically)
82
+
83
+
### 4. Build the Project
84
+
You have two common ways to build and run the project: **Visual Studio** or the **Command Line**.
85
+
86
+
---
87
+
88
+
#### 🔷 Method 1: Using Visual Studio
89
+
90
+
1. Open the `.sln` file located inside the `build/` directory.
91
+
2. In the **Solution Explorer**, right-click on the project named `game` and select **"Set as Startup Project"**.
92
+
3. Press `Ctrl + F5` or click **Debug → Start Without Debugging** to run the project.
93
+
94
+
✅ That’s it! Visual Studio will automatically build and run the project.
95
+
96
+
---
97
+
98
+
#### ⚙️ Method 2: Using Command Line
99
+
100
+
Make sure you're in the root of the project and then run the following:
0 commit comments