diff --git a/CMakeLists.txt b/CMakeLists.txt index ac2b248..91a9ed8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,8 @@ project(cpp) set(CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}/deps" "${CMAKE_SOURCE_DIR}/deps" "${CMAKE_PREFIX_PATH}") # The libraries have the "lib" prefix even on Windows. set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "${CMAKE_FIND_LIBRARY_PREFIXES}") +# Use c++11, this is compiler-agnostic (not GCC specific) +set (CMAKE_CXX_STANDARD 11) # Set rpath for Mac and Linux. if(APPLE) @@ -41,6 +43,5 @@ install(TARGETS get_image get_gl_info ) if(CMAKE_COMPILER_IS_GNUCXX) - set(CMAKE_CXX_FLAGS "-Wall -std=c++11 ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS}") endif() - diff --git a/get_image.cpp b/get_image.cpp index c9cd529..2f7e406 100644 --- a/get_image.cpp +++ b/get_image.cpp @@ -1,4 +1,3 @@ - #include "common.h" #define GL_GLEXT_PROTOTYPES @@ -6,6 +5,8 @@ #include "GLES/gl.h" #include "GLES2/gl2.h" +#include // EXIT_SUCCESS, etc +#include // uint8_t, etc #include #include #include