[waffle] [PATCH] cmake: use the EGL CFLAGS in the waffle CFLAGS

Mircea Gherzan mircea.gherzan at intel.com
Fri Feb 12 00:21:06 CET 2016


Without them, the build will fail with a recent Mesa from the master
branch on a system without the X headers:

include/EGL/eglplatform.h:119:22: fatal error: X11/Xlib.h: No such file
or directory

Signed-off-by: Mircea Gherzan <mircea.gherzan at intel.com>
---
 cmake/Modules/WaffleDefineCompilerFlags.cmake | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/cmake/Modules/WaffleDefineCompilerFlags.cmake b/cmake/Modules/WaffleDefineCompilerFlags.cmake
index 679d09c..69d9ff7 100644
--- a/cmake/Modules/WaffleDefineCompilerFlags.cmake
+++ b/cmake/Modules/WaffleDefineCompilerFlags.cmake
@@ -59,6 +59,10 @@ if (NOT MSVC)
         waffle_add_c_flag("-Werror=missing-prototypes" WERROR_MISSING_PROTOTYPES)
     endif()
 
+    if(egl_FOUND)
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${egl_CFLAGS_OTHER}")
+    endif(egl_FOUND)
+
     if(MINGW)
         # Avoid depending on MinGW runtime DLLs
         check_c_compiler_flag(-static-libgcc HAVE_STATIC_LIBGCC_FLAG)
-- 
2.5.0



More information about the waffle mailing list