diff --git a/lib/glew/CMakeLists.txt b/lib/glew/CMakeLists.txt index 522b89e77..3401b03c3 100644 --- a/lib/glew/CMakeLists.txt +++ b/lib/glew/CMakeLists.txt @@ -8,14 +8,8 @@ if(APPLE) endif() add_library(glew STATIC - src/glew.c src/glewinfo.c src/visualinfo.c + include/GL/glew.h include/GL/glxew.h include/GL/wglew.h + src/glew.c src/glewinfo.c src/visualinfo.c ) -#if(MINGW) -# target_link_libraries(enet wsock32 ws2_32 Winmm) -#endif() - -#if(WIN32) -# find_library(WS2_LIBRARY NAMES "ws2_32" PATHS "C:/Windows/System32") -# target_link_libraries(enet ${WS2_LIBRARY}) -#endif() +add_definitions(-DGLEW_STATIC) diff --git a/src/graphics/gl_headers.hpp b/src/graphics/gl_headers.hpp index a30fabc67..2542fa7a6 100644 --- a/src/graphics/gl_headers.hpp +++ b/src/graphics/gl_headers.hpp @@ -1,12 +1,7 @@ #ifndef GL_HEADER_HPP #define GL_HEADER_HPP -#if defined(WIN32) && !defined(__CYGWIN__) - // glew in the binary distribution only comes as dynamic library. -# undef GLEW_STATIC -#else -# define GLEW_STATIC -#endif +#define GLEW_STATIC extern "C" { #include