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
+5-14
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,10 @@ The template starts out very basic, but might receive additional features over t
10
10
11
11
## How to Use
12
12
13
+
1. Install Git and CMake. Use your system's package manager if available.
13
14
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. Clone your new GitHub repo and open the repo in your text editor of choice.
16
+
1. Open [CMakeLists.txt](CMakeLists.txt). Rename the project and the executable to whatever name you want.
15
17
1. If you want to add or remove any .cpp files, change the source files listed in the [`add_executable`](CMakeLists.txt#L10) call in CMakeLists.txt to match the source files your project requires. If you plan on keeping the default main.cpp file then no changes are required.
16
18
1. If you use Linux, install SFML's dependencies using your system package manager. On Ubuntu and other Debian-based distributions you can use the following commands:
17
19
```
@@ -34,18 +36,12 @@ The template starts out very basic, but might receive additional features over t
Using CMake from the command line is straightforward as well.
39
+
Be sure to run these commands in the root directory of the project you just created.
37
40
38
-
For a single-configuration generator (typically the case on Linux and macOS):
39
41
```
40
-
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
42
+
cmake -B build
41
43
cmake --build build
42
44
```
43
-
44
-
For a multi-configuration generator (typically the case on Windows):
45
-
```
46
-
cmake -S . -B build
47
-
cmake --build build --config Release
48
-
```
49
45
1. Enjoy!
50
46
51
47
## Upgrading SFML
@@ -64,11 +60,6 @@ The nice folks in the [SFML community](https://github.com/SFML/SFML#community) c
64
60
65
61
Modify CMake options by adding them as configuration parameters (with a `-D` flag) or by modifying the contents of CMakeCache.txt and rebuilding.
66
62
67
-
### Use Static Libraries
68
-
69
-
By default SFML builds shared libraries and this default is inherited by your project.
70
-
CMake's [`BUILD_SHARED_LIBS`](https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html) option lets you pick static or shared libraries for the entire project.
71
-
72
63
### Change Compilers
73
64
74
65
See the variety of [`CMAKE_<LANG>_COMPILER`](https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER.html) options.
0 commit comments