Skip to content

Commit 49c9f78

Browse files
ChrisThrashereXpl0it3r
authored andcommitted
Add instructions for using this template
1 parent 581960a commit 49c9f78

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

README.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,31 @@ The template starts out very basic, but might receive additional features over t
88
- Basic CMake script to build your project and link SFML
99
- Basic [GitHub Actions](https://github.com/features/actions) script for all major platforms
1010

11-
## License
12-
13-
The source code is dual licensed under Public Domain and MIT -- choose whichever you prefer.
11+
## How to Use
12+
13+
1. Follow the above instructions about how to use GitHub's project template feature to create your own project.
14+
1. Open [CMakeLists.txt](CMakeLists.txt). Rename the project and the executable to whatever name you want. The project and executable names don't have to match.
15+
1. Install SFML 2.5.1.
16+
17+
On Ubuntu Linux:
18+
```
19+
sudo apt install libsfml-dev
20+
```
21+
On macOS
22+
```
23+
brew install sfml
24+
```
25+
1. Change the source files listed in [`add_executable`](CMakeLists.txt#L6) to match the source files your project requires.
26+
1. Configure and build your project.
27+
28+
On Linux or macOS, run these commands from the root directory of your project.
29+
```cmake
30+
cmake -B build
31+
cmake --build build
32+
```
33+
34+
Alternatively, use [VS Code](https://code.visualstudio.com) with its [CMake extension](https://code.visualstudio.com/docs/cpp/cmake-linux) on any OS.
35+
1. Enjoy!
1436
1537
## More Reading
1638
@@ -19,3 +41,7 @@ Here are some useful resources if you want to learn more about CMake:
1941
- [How to Use CMake Without the Agonizing Pain - Part 1](https://alexreinking.com/blog/how-to-use-cmake-without-the-agonizing-pain-part-1.html)
2042
- [How to Use CMake Without the Agonizing Pain - Part 2](https://alexreinking.com/blog/how-to-use-cmake-without-the-agonizing-pain-part-2.html)
2143
- [Better CMake YouTube series by Jefferon Amstutz](https://www.youtube.com/playlist?list=PL8i3OhJb4FNV10aIZ8oF0AA46HgA2ed8g)
44+
45+
## License
46+
47+
The source code is dual licensed under Public Domain and MIT -- choose whichever you prefer.

0 commit comments

Comments
 (0)