Cycles: fix GLEW library build issue.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 27 May 2011 12:13:10 +0000 (12:13 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 27 May 2011 12:13:10 +0000 (12:13 +0000)
intern/cycles/app/CMakeLists.txt
intern/cycles/blender/CMakeLists.txt
intern/cycles/cmake/external_libs.cmake

index 0934124ea2554727756810aed76c28d5d3414c8f..c250662aecf399bbd976b8a15001ba10fb6ae2f6 100644 (file)
@@ -18,7 +18,7 @@ SET(LIBRARIES
        cycles_util
        ${Boost_LIBRARIES}
        ${OPENGL_LIBRARIES}
-       ${GLEW_LIBRARY}
+       ${CYCLES_GLEW_LIBRARY}
        ${OPENIMAGEIO_LIBRARY})
 
 IF(WITH_CYCLES_TEST)
index 56d08b61b65d98bb90c051dc66769f1db597e4eb..784f78a54d4137ac7b0a2fc1f80c474c3837b4ac 100644 (file)
@@ -43,7 +43,7 @@ SET(LIBRARIES
        ${OPENGL_LIBRARIES}
        ${OPENIMAGEIO_LIBRARY}
        ${GLUT_LIBRARIES}
-       ${GLEW_LIBRARIES}
+       ${CYCLES_GLEW_LIBRARY}
        ${BLENDER_LIBRARIES})
 
 IF(WITH_CYCLES_OSL)
index cfd997a6469b66ae07e7ac1bef9c816766221054..fbda3ac2e34f3debfec9791624c564d544ac5463 100644 (file)
@@ -62,6 +62,12 @@ IF(WITH_CYCLES_TEST)
        INCLUDE_DIRECTORIES(${GLUT_INCLUDE_DIR})
 ENDIF()
 
+IF(WITH_BUILTIN_GLEW)
+       SET(CYCLES_GLEW_LIBRARY extern_glew)
+ELSE()
+       SET(CYCLES_GLEW_LIBRARY ${GLEW_LIBRARY})
+ENDIF()
+
 ###########################################################################
 # OpenShadingLanguage
 
@@ -165,12 +171,12 @@ IF(WITH_CYCLES_OPENCL)
 
        IF(WIN32)
                SET(OPENCL_INCLUDES "")
-               SET(OPENCL_LIRBARIES "OpenCL")
+               SET(OPENCL_LIBRARIES "OpenCL")
        ENDIF()
 
        IF(UNIX AND NOT APPLE)
                SET(OPENCL_INCLUDES ${CYCLES_OPENCL})
-               SET(OPENCL_LIRBARIES "OpenCL")
+               SET(OPENCL_LIBRARIES "OpenCL")
        ENDIF()
 
        ADD_DEFINITIONS(-DWITH_OPENCL)