Unify GLES1 and GLES2 (libraries are compatible and can be co-linked)
[freeglut] / progs / test-shapes-gles1 / CMakeLists.txt
index 24e97d1..fc2c1c3 100644 (file)
@@ -1,9 +1,17 @@
 cmake_minimum_required(VERSION 2.6)
 project(test-shapes-gles1)
 
+IF(CMAKE_COMPILER_IS_GNUCC)
+  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
+  IF(!ANDROID)
+    # not setting -ansi as EGL/KHR headers doesn't support it
+    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ansi")
+  ENDIF()
+ENDIF(CMAKE_COMPILER_IS_GNUCC)
+
 # FreeGLUT
 include(FindPkgConfig)
-pkg_check_modules(freeglut REQUIRED freeglut-gles1>=3.0.0)
+pkg_check_modules(freeglut REQUIRED freeglut-gles>=3.0.0)
 if(freeglut_FOUND)
   include_directories(${freeglut_STATIC_INCLUDE_DIRS})
   link_directories(${freeglut_STATIC_LIBRARY_DIRS})