I don't really know much cmake-fu, but the above is obviously not suitable for committing. I have sdl2 via brew, and pkg-config outputs the correct arguments for the linker:
$ brew info sdl2
sdl2: stable 2.0.4 (bottled), HEAD
Low-level access to audio, keyboard, mouse, joystick, and graphics
https://www.libsdl.org/
/usr/local/Cellar/sdl2/2.0.3 (75 files, 3.7M)
Poured from bottle
/usr/local/Cellar/sdl2/2.0.4 (82 files, 3.9M) *
Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/sdl2.rb
==> Options
--universal
Build a universal binary
--HEAD
Install HEAD version
$ pkg-config --libs sdl2
-L/usr/local/lib -lSDL2
Not sure if the fault is in your CMakeLists.txt file or in whatever package provides the Cmake helpers for SDL2 (perhaps SDL2-via-brew itself?)
On OS X, I need to apply the following to get things to build
I don't really know much cmake-fu, but the above is obviously not suitable for committing. I have sdl2 via brew, and
pkg-config
outputs the correct arguments for the linker:Not sure if the fault is in your
CMakeLists.txt
file or in whatever package provides the Cmake helpers for SDL2 (perhaps SDL2-via-brew itself?)