Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
xyproto committed Feb 27, 2018
1 parent 279356c commit 6df4f2f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,12 @@ int main() {

template<typename T>
void equal(T a, T b) {
if (a == b) {
std::cout << "YES" << std::endl;
} else {
std::cout << "NO" << std::endl;
exit(EXIT_FAILURE);
}
if (a == b) {
std::cout << "YES" << std::endl;
} else {
std::cout << "NO" << std::endl;
exit(EXIT_FAILURE);
}
}
```
Expand Down Expand Up @@ -231,11 +231,14 @@ These defines are passed to the compiler, if the corresponding directories exist
* `IMGDIR` is defined to `./img` or `../img` (when developing) and `$PREFIX/share/application_name/img` (at installation time)
* `SHADERDIR` is defined to `./shaders` or `../shaders` (when developing) and `$PREFIX/share/application_name/shaders` (at installation time)
* `SHAREDIR` is defined to `./share` or `../share` (when developing) and `$PREFIX/share/application_name` (at installation time)
* `RESOURCEDIR` is defined to `./resources` or `../resources` (when developing) and `$PREFIX/share/application_name/resources` (at installation time)
This makes it easy to have an `img`, `data` or `resources` directory where files can be found and used both at development and at installation-time.
See `examples/sdl2` and `examples/win64crate` for examples that uses `IMGDIR`.
See `examples/mixer` for an example that uses `RESOURCEDIR`.
An alternative method to using defines (defined with `-D` when building) is to use something like `SDL_GetBasePath()`. Example: [res_path.h](https://github.com/libSDL2pp/TwinklebearDev-Lessons-libSDL2pp/blob/sdl2pp/include/res_path.h).
## C++17 on macOS
Expand Down Expand Up @@ -369,6 +372,6 @@ If you have a project written in C++17 that you think should build with `sakemak
## General info
* Version: 1.48
* Version: 1.5.0
* License: MIT
* Author: Alexander F Rødseth &lt;[email protected]&gt;

0 comments on commit 6df4f2f

Please sign in to comment.