From 8029bc5880326bc7f0d3f0be8c04a99f1e6a8d81 Mon Sep 17 00:00:00 2001 From: hiker Date: Mon, 15 Sep 2014 21:49:06 +1000 Subject: [PATCH] Build a static version of glew. --- lib/glew/CMakeLists.txt | 12 +++--------- src/graphics/gl_headers.hpp | 7 +------ 2 files changed, 4 insertions(+), 15 deletions(-) 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