Skip to content

Commit

Permalink
touchups for MacOS: refine brew SDL2 config, Mx support
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Haberler committed Mar 7, 2024
1 parent e563478 commit c185015
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ Note:
Use [Homebrew](https://brew.sh/):

```sh
brew install sdl2
brew install sdl2 pkg-config
```
Note:
On MacOS you need to include (uncomment in provided example [platformio.ini](./platformio.ini) file) these lines in your platformio.ini file to import the drivers:
```
; SDL2 includes
!find /opt/homebrew/Cellar/sdl2 -name "include" | sed "s/^/-I /"
!find /opt/homebrew/Cellar/sdl2 -name "libSDL2.a" | xargs dirname | sed "s/^/-L /"
!pkg-config --cflags SDL2
!pkg-config --libs SDL2
```

**Windows**
Expand Down
6 changes: 4 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ build_flags =
-D LVGL_USE_V9=0 ; lvgl v9

; SDL2 includes, uncomment the next two lines on MAC OS if you intalled sdl via homebrew
; !find /opt/homebrew/Cellar/sdl2 -name "include" | sed "s/^/-I /"
; !find /opt/homebrew/Cellar/sdl2 -name "libSDL2.a" | xargs dirname | sed "s/^/-L /"
; !pkg-config --cflags SDL2
; !pkg-config --libs SDL2
lib_deps =
https://github.com/m5stack/M5GFX#develop
lvgl=https://github.com/lvgl/lvgl/archive/refs/tags/v8.3.0.zip ; lvgl v8
Expand All @@ -35,6 +35,8 @@ lib_archive = false

[env:emulator_common]
build_flags =
; uncomment the next line if running on MacOS Mx (arm64 architecture)
; -arch arm64
-l SDL2
${env.build_flags}
-D M5GFX_SHOW_FRAME
Expand Down

0 comments on commit c185015

Please sign in to comment.