Use infinitime_fonts target if fonts/CMakeLists.txt exists

Since https://github.com/InfiniTimeOrg/InfiniTime/pull/1097 the fonts
are generated. Support this new way of using fonts.

When InfiniTime isn't a subdirectory of InfiniSim we need to provide
the binary dir when using `add_subdirectory()`. Use `fonts`.

Update README with instructions to install `lv_font_conv`.
This commit is contained in:
Reinhold Gschweicher
2022-05-10 23:56:45 +02:00
committed by NeroBurner
parent d9d729d40f
commit f0c6ef9cd6
2 changed files with 16 additions and 2 deletions

View File

@@ -14,17 +14,18 @@ For a history on how this simulator started and the challenges on its way visit
- CMake
- SDL2 (provides the simulator window, handles mouse and keyboard input)
- Compiler (g++ or clang++)
- [lv_font_conv](https://github.com/lvgl/lv_font_conv#install-the-script) (for `font.c` generation since [InfiniTime#1097](https://github.com/InfiniTimeOrg/InfiniTime/pull/1097))
On Ubuntu/Debian install the following packages:
```sh
sudo apt install -y cmake libsdl2-dev g++
sudo apt install -y cmake libsdl2-dev g++ npm
```
On Arch Linux the following packages are needed:
```sh
sudo pacman -S cmake sdl2 gcc
sudo pacman -S cmake sdl2 gcc npm
```
On Fedora the following packages are needed:
@@ -33,6 +34,12 @@ On Fedora the following packages are needed:
sudo dnf install cmake SDL2-devel gcc
```
Then install the `lv_font_conv` executable to the source directory (will be installed at `node_modules/.bin/lv_font_conv`)
```sh
npm install lv_font_conv@1.5.2
```
## Get the Sources
Clone this repository and tell `git` to recursively download the submodules as well