Consolidate glew into one location to speed up build.

This commit is contained in:
Matt Williams
2012-11-23 23:01:50 +00:00
parent c981ed2706
commit 989cd453fe
26 changed files with 46 additions and 111678 deletions

View File

@ -25,22 +25,14 @@ PROJECT(SmoothLODExample)
#Projects source files
SET(SRC_FILES
glew/glew.cpp
main.cpp
OpenGLWidget.cpp
)
)
#Projects headers files
SET(INC_FILES
glew/glew.h
glew/glxew.h
glew/wglew.h
OpenGLWidget.h
)
ADD_DEFINITIONS(-DGLEW_STATIC)
)
#"Sources" and "Headers" are the group names in Visual Studio.
#They may have other uses too...
@ -50,7 +42,7 @@ SOURCE_GROUP("Headers" FILES ${INC_FILES})
FIND_PACKAGE(OpenGL REQUIRED)
#Tell CMake the paths for OpenGL and for PolyVox (which is just relative to our current location)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR} ${PolyVoxCore_SOURCE_DIR}/include)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR} ${PolyVoxCore_SOURCE_DIR}/include ${GLEW_SOURCE_DIR})
LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR})
#Build
@ -58,7 +50,7 @@ ADD_EXECUTABLE(SmoothLODExample ${SRC_FILES})
IF(MSVC)
SET_TARGET_PROPERTIES(SmoothLODExample PROPERTIES COMPILE_FLAGS "/W4 /wd4127") #All warnings
ENDIF(MSVC)
TARGET_LINK_LIBRARIES(SmoothLODExample ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} PolyVoxCore)
TARGET_LINK_LIBRARIES(SmoothLODExample glew ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} PolyVoxCore)
SET_PROPERTY(TARGET SmoothLODExample PROPERTY FOLDER "Examples")
#Install - Only install the example in Windows