Skip to content

Commit 52b7486

Browse files
committed
Added notes about toolchain setup, cmake usage and bad joke at end
1 parent eefda96 commit 52b7486

File tree

1 file changed

+50
-2
lines changed

1 file changed

+50
-2
lines changed

README.md

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,51 @@ handle numbers in this way. The author hopes that it is useful.
1212
Unmoving is written in C++20 and can target the PlayStation or most desktop OSes.
1313
In all cases, you will need a recent C++ compiler in order to build C++20 code.
1414

15-
_TODO: Instructions go here for using Unmoving with PSn00bSDK_
15+
For getting a toolchain that can target the PlayStation and which can compile
16+
C++20 code, you will need to compile a toolchain yourself. I recommend following
17+
the instructions in PSn00bSDK (which this project is tested with) for manually
18+
compiling toolchains
19+
([https://github.com/Lameguy64/PSn00bSDK/blob/ffa679d4d24b891cb59aba10946368f2ec00c391/toolchain.txt](https://github.com/Lameguy64/PSn00bSDK/blob/ffa679d4d24b891cb59aba10946368f2ec00c391/toolchain.txt)), **but choose newer versions of Binutils and GCC than are specified**.
1620

17-
_TODO: Instructions go here for retrieving the library with CMake or just grabbing the header_
21+
I used **Binutils 2.37** and **GCC 10.3.0**.
22+
23+
Of course, as this is a header-only library, you could just head over to the
24+
[releases page](https://github.com/saxbophone/unmoving/releases) on Github and
25+
download the latest version of it from there and then put it in your include path to use it in your projects.
26+
27+
### CMake integration
28+
29+
Alternatively, you can fetch the project with CMake if you like. You need CMake 3.15 or newer
30+
to do this.
31+
32+
A convenient way to do this is to use CPM
33+
([https://github.com/cpm-cmake/CPM.cmake](https://github.com/cpm-cmake/CPM.cmake))
34+
to fetch the project from Github for you:
35+
36+
```cmake
37+
CPMFindPackage(
38+
NAME Unmoving
39+
GIT_REPOSITORY [email protected]:saxbophone/unmoving.git
40+
GIT_TAG v0.1.0
41+
)
42+
```
43+
44+
Or if you don't want to use a third-party CMake tool, CMake's `FetchContent()`
45+
API can be used in a similar way instead.
46+
47+
You could also clone this project's source code, build and install it with CMake
48+
and then use CMake's `find_package()` to use it in your project. `CPMFindPackage()`
49+
will also use locally-installed packages if you install it this way.
50+
51+
You can then link your build targets to _Unmoving_ in the typical way:
52+
53+
```cmake
54+
# sample target "main"
55+
add_executable(main main.cpp)
56+
target_link_libraries(main Unmoving::unmoving)
57+
```
58+
59+
### License
1860

1961
> This project is licensed under the Mozilla Public License v2.0.
2062
>
@@ -152,3 +194,9 @@ programming (the fixed-point arithmetic section of which was particularly
152194
helpful in the making of this software) and for his open-source PSX SDK
153195
[PSn00bSDK](https://github.com/Lameguy64/PSn00bSDK), which this project is tested
154196
with and which I thoroughly recommend checking out. Your work inspires me, sir!
197+
198+
> "What do you call a decimal point which sticks around in the same place?"
199+
>
200+
> ...
201+
>
202+
> _UNMOVING!_

0 commit comments

Comments
 (0)