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
+29-3Lines changed: 29 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,31 @@ The template starts out very basic, but might receive additional features over t
8
8
- Basic CMake script to build your project and link SFML
9
9
- Basic [GitHub Actions](https://github.com/features/actions) script for all major platforms
10
10
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!
14
36
15
37
## More Reading
16
38
@@ -19,3 +41,7 @@ Here are some useful resources if you want to learn more about CMake:
19
41
- [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)
20
42
- [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)
21
43
- [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