SDL2/cmake
Max Krummenacher c3a7cc34fb cmake: sdlchecks.cmake: pass cflags to the appropriate cmake variable
If egl.pc sets at least two macros as the i.MX Vivante driver does, e.g.:
| Cflags: -I${includedir} -DLINUX -DWL_EGL_PLATFORM

then we get the following error during configuration:

| -- Performing Test HAVE_OPENGL_EGL
| CMake Error: Parse error in command line argument: WL_EGL_PLATFORM
|  Should be: VAR:type=value

If one changes to add a value to the macro, e.g.
| Cflags: -I${includedir} -DLINUX=1 -DWL_EGL_PLATFORM=1
then cmake does not error out but the macro is not passed to the
C compiler.

CMAKE_REQUIRED_FLAGS is the wrong variable to pass the CFLAGS in,
CMAKE_REQUIRED_DEFINITIONS should be used.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-01-11 09:00:37 -08:00
..
macros.cmake Fixed build on CMake older than 3.13 2021-12-18 06:28:22 -08:00
sdlchecks.cmake cmake: sdlchecks.cmake: pass cflags to the appropriate cmake variable 2022-01-11 09:00:37 -08:00