Skip to content

Commit

Permalink
Fix compilation on clang
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugues Evrard committed May 2, 2017
1 parent d817164 commit d8e54d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()

3 changes: 2 additions & 1 deletion get_image.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@

#include "common.h"

#define GL_GLEXT_PROTOTYPES

#include "GLES/gl.h"
#include "GLES2/gl2.h"

#include <cstdlib> // EXIT_SUCCESS, etc
#include <cstdint> // uint8_t, etc
#include <iostream>
#include <fstream>
#include <sstream>
Expand Down

0 comments on commit d8e54d5

Please sign in to comment.