diff --git a/src/Contexts/CMakeLists.txt b/src/Contexts/CMakeLists.txt index 2ac978d58..9adde18b6 100644 --- a/src/Contexts/CMakeLists.txt +++ b/src/Contexts/CMakeLists.txt @@ -31,6 +31,8 @@ if(WITH_EGLCONTEXT) find_package(X11) if(EGL_FOUND AND X11_FOUND) add_library(MagnumEglContext STATIC EglContext.cpp) + # X11 macros are a mess, disable warnings for C-style casts + set_target_properties(MagnumEglContext PROPERTIES COMPILE_FLAGS "-Wno-old-style-cast") install(FILES EglContext.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Contexts) install(TARGETS MagnumEglContext DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) else() diff --git a/src/Contexts/EglContext.cpp b/src/Contexts/EglContext.cpp index 4f28ca148..a6f8a842c 100644 --- a/src/Contexts/EglContext.cpp +++ b/src/Contexts/EglContext.cpp @@ -21,7 +21,7 @@ using namespace std; namespace Magnum { namespace Contexts { -EglContext::EglContext(int& argc, char** argv, const string& title, const Math::Vector2& size): viewportSize(size) { +EglContext::EglContext(int&, char**, const string& title, const Math::Vector2& size): viewportSize(size) { /* Get default X display and root window, init EGL */ xDisplay = XOpenDisplay(0); display = eglGetDisplay(xDisplay);