Skip to content

Commit 4408414

Browse files
authored
Update README.md
I realized I forgot to mention how to add newly created files to the CMake process. Added that step before the building project step of set up instructions
1 parent bc029ce commit 4408414

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,35 @@ The Python File `generate_cmake_presets.py` can be run with the following comman
4848
python generate_cmake_presets.py
4949
```
5050

51-
### 3. Build the Project
51+
### 3. Creating files (skip if you're not creating new file)
52+
Depending on the method you used to create a new file, you will need to somehow get that file to the src or include directories.
53+
54+
If you used add class or new item in visual studio, you will need to simply cut and paste the files into the right folder (include being .hpp files, src being .cpp files).
55+
56+
You can also just create the files in the src and include files then build the project to have them there.
57+
58+
After the files are in the src and include folders, you will need to add them into the `CMakeLists.txt`. You will scroll down to see the following
59+
60+
```txt
61+
# Define Source Files
62+
set(SOURCES
63+
src/file_1.cpp
64+
src/file_2.cpp
65+
...
66+
src/file_X.cpp
67+
)
68+
# ... means that there can be more files between them
69+
# Define Header Files
70+
set(HEADERS
71+
include/file_1.hpp
72+
...
73+
include/file_x.cpp
74+
)
75+
```
76+
77+
Just add the filename(s) to this part of the `CMakeLists.txt` and build the project for it to work :).
78+
79+
### 4. Build the Project
5280
Navigate to the project root and run the following commands:
5381

5482
#### Configure CMake

0 commit comments

Comments
 (0)