Build a static version of glew.

This commit is contained in:
hiker 2014-09-15 21:49:06 +10:00
parent 69473b1811
commit 8029bc5880
2 changed files with 4 additions and 15 deletions

View File

@ -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)

View File

@ -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 <GL/glew.h>