rename WITH_BUILTIN_GLEW, WITH_SYSTEM_GLEW & negate.
authorCampbell Barton <ideasman42@gmail.com>
Sat, 23 Jun 2012 13:42:14 +0000 (13:42 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 23 Jun 2012 13:42:14 +0000 (13:42 +0000)
CMakeLists.txt
build_files/cmake/config/blender_lite.cmake
build_files/cmake/macros.cmake
extern/CMakeLists.txt
intern/cycles/cmake/external_libs.cmake
source/blender/blenlib/intern/math_color_inline.c
source/blenderplayer/CMakeLists.txt
source/creator/CMakeLists.txt

index 824ccc7224409931e5a880fc1ef90e4afecb8643..b983a5556f6add2c9c66c4a7be58745b9e29a2a4 100644 (file)
@@ -159,7 +159,7 @@ unset(PLATFORM_DEFAULT)
 if(UNIX AND NOT APPLE)
        option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)"   ON)
        option(WITH_X11_XF86VMODE "Enable X11 video mode switching"     ON)
-       option(WITH_BUILTIN_GLEW "Use GLEW OpenGL wrapper library bundled with blender" ON)
+       option(WITH_SYSTEM_GLEW "Use GLEW OpenGL wrapper library bundled with blender" ON)
 
        # freebsd doesn't seems to support XDND
        if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
@@ -167,7 +167,7 @@ if(UNIX AND NOT APPLE)
        endif()
 else()
        # not an option for other OS's
-       set(WITH_BUILTIN_GLEW ON)
+       set(WITH_SYSTEM_GLEW OFF)
 endif()
 
 # Modifiers
@@ -1540,20 +1540,20 @@ endif()
 #-----------------------------------------------------------------------------
 # Configure GLEW
 
-if(WITH_BUILTIN_GLEW)
-       # set(GLEW_LIBRARY "")  # unused
-       set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew/include")
-else()
+if(WITH_SYSTEM_GLEW)
        find_package(GLEW)
 
        if(NOT GLEW_FOUND)
-               message(FATAL_ERROR "GLEW is required to build blender, install it or use WITH_BUILTIN_GLEW")
+               message(FATAL_ERROR "GLEW is required to build blender, install it or disable WITH_SYSTEM_GLEW")
        endif()
 
        mark_as_advanced(
                GLEW_LIBRARY
                GLEW_INCLUDE_PATH
        )
+else()
+       # set(GLEW_LIBRARY "")  # unused
+       set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew/include")
 endif()
 
 #-----------------------------------------------------------------------------
@@ -1791,7 +1791,7 @@ if(FIRST_RUN)
        info_cfg_option(WITH_INSTALL_PORTABLE)
        info_cfg_option(WITH_X11_XF86VMODE)
        info_cfg_option(WITH_X11_XINPUT)
-       info_cfg_option(WITH_BUILTIN_GLEW)
+       info_cfg_option(WITH_SYSTEM_GLEW)
        info_cfg_option(WITH_MEM_JEMALLOC)
 
        info_cfg_text("Image Formats:")
index d19f0cf32e867080cd65b62debad5e77c91490b2..e2adc17a2e8bb7ffbf698e854ffb9fe7ecfc28ac 100644 (file)
@@ -6,9 +6,9 @@
 #
 
 set(WITH_INSTALL_PORTABLE    ON  CACHE FORCE BOOL)
+set(WITH_SYSTEM_GLEW         ON  CACHE FORCE BOOL)
 
 set(WITH_BUILDINFO           OFF CACHE FORCE BOOL)
-set(WITH_BUILTIN_GLEW        OFF CACHE FORCE BOOL)
 set(WITH_BULLET              OFF CACHE FORCE BOOL)
 set(WITH_CODEC_FFMPEG        OFF CACHE FORCE BOOL)
 set(WITH_CODEC_SNDFILE       OFF CACHE FORCE BOOL)
index 2b61ddca6482f90208eb031cee59a401f8395078..6939f21d461a6c7e0796fadf4a5ff04f807344bd 100644 (file)
@@ -253,7 +253,7 @@ macro(setup_liblinks
                endif()
        endif()
 
-       if(NOT WITH_BUILTIN_GLEW)
+       if(WITH_SYSTEM_GLEW)
                target_link_libraries(${target} ${GLEW_LIBRARY})
        endif()
 
index 1d83410a3d7447c43d3d7c24b3731bced496b41f..67a899082e2b433e308711867aa05936618f27e1 100644 (file)
@@ -40,7 +40,7 @@ if(WITH_BINRELOC)
        add_subdirectory(binreloc)
 endif()
 
-if(WITH_BUILTIN_GLEW)
+if(NOT WITH_SYSTEM_GLEW)
        add_subdirectory(glew)
 endif()
 
index 7d12e2610684ad1522826f371862ca4623e84357..23a919530f9fe4db1cc59e2ad178f0e33d872a28 100644 (file)
@@ -11,10 +11,10 @@ if(WITH_CYCLES_TEST)
        include_directories(${GLUT_INCLUDE_DIR})
 endif()
 
-if(WITH_BUILTIN_GLEW)
-       set(CYCLES_GLEW_LIBRARY extern_glew)
-else()
+if(WITH_SYSTEM_GLEW)
        set(CYCLES_GLEW_LIBRARY ${GLEW_LIBRARY})
+else()
+       set(CYCLES_GLEW_LIBRARY extern_glew)
 endif()
 
 ###########################################################################
index f270a20003d120a25b9febcacf815fdf08f8fc96..23d70bd148b97d5c0b0b5a5b4ce085a9788a2436 100644 (file)
@@ -239,6 +239,7 @@ MINLINE unsigned char rgb_to_grayscale_byte(const unsigned char rgb[3])
        return (76 * (unsigned short) rgb[0] + 148 * (unsigned short) rgb[1] + 31 * (unsigned short) rgb[2]) / 255;
 }
 
+/* luma from defined by 'YCC_JFIF', see #rgb_to_ycc */
 MINLINE float rgb_to_luma(const float rgb[3])
 {
        return 0.299f * rgb[0] + 0.587f * rgb[1] + 0.114f * rgb[2];
index 99db5576fa0a31bd073712bf1fe628397a31d169..720d68ef00dadbae751eafb9c762692c40b961d1 100644 (file)
@@ -153,7 +153,7 @@ endif()
                list(APPEND BLENDER_SORTED_LIBS extern_eltopo)
        endif()
 
-       if(WITH_BUILTIN_GLEW)
+       if(NOT WITH_SYSTEM_GLEW)
                list(APPEND BLENDER_SORTED_LIBS extern_glew)
        endif()
 
index e8b951f36807e8ba1a913d1bbe70897ea79555c7..033b1352e5151caf5a633686cf9b131d2871e8e5 100644 (file)
@@ -908,7 +908,7 @@ endif()
                list(APPEND BLENDER_SORTED_LIBS extern_eltopo)
        endif()
 
-       if(WITH_BUILTIN_GLEW)
+       if(NOT WITH_SYSTEM_GLEW)
                list(APPEND BLENDER_SORTED_LIBS extern_glew)
        endif()