- saturation option for sequencer strips, runs before multiply and color balance.
[blender.git] / CMakeLists.txt
index 59e4b798a6b62ab02fdc4846aa3655d8ce157550..9c14bdd6b9efab4aaec1fa852f68a19f89603e67 100644 (file)
@@ -59,6 +59,10 @@ SET(LIBRARY_OUTPUT_PATH  ${CMAKE_BINARY_DIR}/lib)
 # ...but thats quite involved, make sure this matches the blender version.
 SET(BLENDER_VERSION  2.5)
 
+#-----------------------------------------------------------------------------
+# Load some macros.
+INCLUDE(build_files/cmake/macros.cmake)
+
 #-----------------------------------------------------------------------------
 # Set default config options
 
@@ -114,7 +118,7 @@ OPTION(WITH_RAYOPTIMIZATION "Enable use of SIMD (SSE) optimizations for the rayt
 OPTION(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation tracking" OFF)
 OPTION(WITH_INSTALL       "Install accompanying scripts and language files needed to run blender" ON)
 
-IF (APPLE)
+IF(APPLE)
        OPTION(WITH_COCOA         "Use Cocoa framework instead of deprecated Carbon" ON)
        OPTION(USE_QTKIT          "Use QtKit instead of Carbon quicktime (needed for having partial quicktime for 64bit)" OFF)
        OPTION(WITH_LIBS10.5  "Use 10.5 libs (needed for 64bit builds)" OFF)
@@ -128,6 +132,8 @@ IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
        MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
 ENDIF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
 
+TEST_SSE_SUPPORT()
+
 # disabled for now, not supported
 # OPTION(WITH_WEBPLUGIN     "Enable Web Plugin (Unix only)" OFF)
 
@@ -139,10 +145,6 @@ ENDIF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
 #
 # When changing any of this remember to update the notes in doc/blender-cmake.txt
 
-#-----------------------------------------------------------------------------
-# Load some macros.
-INCLUDE(CMake/macros.cmake)
-
 #-----------------------------------------------------------------------------
 #Platform specifics
 
@@ -228,6 +230,10 @@ IF(UNIX AND NOT APPLE)
                        /opt/include/OpenEXR
                )
                SET(OPENEXR_LIB Half IlmImf Iex Imath)
+               
+               IF(NOT OPENEXR_INC)
+                       SET(WITH_OPENEXR OFF)
+               ENDIF(NOT OPENEXR_INC)
        ENDIF(WITH_OPENEXR)
 
        IF(WITH_TIFF)
@@ -255,6 +261,7 @@ IF(UNIX AND NOT APPLE)
                SET(FFMPEG_INC ${FFMPEG}/include)
                SET(FFMPEG_LIB avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
                SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+               SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
        ENDIF(WITH_FFMPEG)
 
        IF(WITH_FFTW3)
@@ -304,9 +311,11 @@ IF(UNIX AND NOT APPLE)
 
        SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -Wno-char-subscripts")
 
-       IF(WITH_RAYOPTIMIZATION)
-               SET(PLATFORM_CFLAGS " -msse ${PLATFORM_CFLAGS}")
-       ENDIF(WITH_RAYOPTIMIZATION)
+       IF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
+               SET(PLATFORM_CFLAGS " -msse -msse2 ${PLATFORM_CFLAGS}")
+               ADD_DEFINITIONS(-D__SSE__)
+               ADD_DEFINITIONS(-D__MMX__)
+       ENDIF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
 
        SET(PLATFORM_LINKFLAGS "-pthread")
 
@@ -392,6 +401,11 @@ IF(WIN32)
                SET(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries)
        ENDIF(WITH_QUICKTIME)
 
+       IF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
+               ADD_DEFINITIONS(-D__SSE__)
+               ADD_DEFINITIONS(-D__MMX__)
+       ENDIF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
+
        IF(MSVC)
                IF(CMAKE_CL_64)
                        SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
@@ -471,7 +485,7 @@ IF(WIN32)
                        SET(PCRE_LIB pcre)
                ENDIF(WITH_OPENCOLLADA)
                
-        # TODO: IF(WITH_LCMS)
+               # TODO: IF(WITH_LCMS)
         
                IF(WITH_FFMPEG)
                        SET(FFMPEG ${LIBDIR}/ffmpeg)
@@ -520,7 +534,7 @@ IF(WIN32)
        ELSE(MSVC) # MINGW
                SET(LLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid")
 
-               SET(CMAKE_CXX_FLAGS                "-pipe -funsigned-char -fno-strict-aliasing -mwindows" CACHE STRING "Mingw C++ flags ")
+               SET(CMAKE_CXX_FLAGS                "-pipe -funsigned-char -fno-strict-aliasing" CACHE STRING "Mingw C++ flags ")
                SET(CMAKE_C_FLAGS                  "-pipe -funsigned-char -fno-strict-aliasing" CACHE STRING "Mingw C flags ")
 
                SET(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g" CACHE STRING "Mingw debug C++ flags ")
@@ -547,7 +561,7 @@ IF(WIN32)
                        SET(GETTEXT_LIB intl)
                ENDIF(WITH_INTERNATIONAL)
 
-               SET(JPEG_LIBRARY jpeg)
+               SET(JPEG_LIBRARY libjpeg)
                SET(PNG_LIBRARIES png)
 
                SET(ZLIB ${LIBDIR}/zlib)
@@ -593,7 +607,7 @@ IF(WIN32)
                IF(WITH_OPENEXR)
                        SET(OPENEXR ${LIBDIR}/gcc/openexr)
                        SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/OpenEXR)
-                       SET(OPENEXR_LIB Half IlmImf Iex)
+                       SET(OPENEXR_LIB Half IlmImf Imath IlmThread)
                        SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
                ENDIF(WITH_OPENEXR)
 
@@ -723,6 +737,7 @@ IF(APPLE)
                SET(FFMPEG_INC ${FFMPEG}/include)
                SET(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg)
                SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+               SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
        ENDIF(WITH_FFMPEG)
 
        SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
@@ -793,6 +808,12 @@ IF(APPLE)
                SET(TIFF_LIBPATH ${TIFF}/lib)
        ENDIF(WITH_TIFF)
 
+       IF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
+               SET(PLATFORM_CFLAGS " -msse -msse2 ${PLATFORM_CFLAGS}")
+               ADD_DEFINITIONS(-D__SSE__)
+               ADD_DEFINITIONS(-D__MMX__)
+       ENDIF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
+
        SET(EXETYPE MACOSX_BUNDLE)
 
        SET(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g")