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
This will install SDL3 to your system so that cabal can find and build the sdl3 package.
37
37
38
-
Find your way back to this project's directory and run `cabal build` to build the package with examples, or `cabal build sdl3` to build just the package.
38
+
Find your way back to this project's directory and run `cabal build sdl3` to build just the package.
39
39
40
40
### Windows
41
41
@@ -79,7 +79,31 @@ package *
79
79
extra-lib-dirs: "path/to/SDL3/lib/"
80
80
```
81
81
82
-
Once all of this is done, you can find your way into this directory and run `cabal build sdl3`. If you would like to install the examples, run `cabal build` instead.
82
+
Once all of this is done, you can find your way into this directory and run `cabal build sdl3` to build just the package.
83
+
84
+
## Building and Running Examples
85
+
86
+
To build all examples:
87
+
```bash
88
+
cabal build --flag examples
89
+
```
90
+
91
+
To see a list of all available examples:
92
+
```bash
93
+
cabal run --flag examples
94
+
```
95
+
96
+
To run a specific example:
97
+
```bash
98
+
cabal run --flag examples EXAMPLE_NAME
99
+
```
100
+
101
+
For example, to run the init example:
102
+
```bash
103
+
cabal run --flag examples init
104
+
```
105
+
106
+
You can also build specific executables in a similar manner by specifying the target name.
83
107
84
108
# Working Examples
85
109
@@ -164,7 +188,7 @@ These examples are based off of the original [SDL3 GPU Examples](https://github.
0 commit comments