diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b4272d5f118..1088d95ab67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,6 +60,10 @@ SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) SET(BLENDER_VERSION 2.5) #----------------------------------------------------------------------------- +# Load some macros. +INCLUDE(CMake/macros.cmake) + +#----------------------------------------------------------------------------- # Set default config options # Blender internal features @@ -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) @@ -140,10 +146,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 IF(UNIX AND NOT APPLE) @@ -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) @@ -304,6 +310,12 @@ IF(UNIX AND NOT APPLE) SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -Wno-char-subscripts") + 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") # Better warnings @@ -388,6 +400,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 ) @@ -707,7 +724,12 @@ IF(APPLE) SET(OPENEXR_LIBPATH ${OPENEXR}/lib) ENDIF(WITH_OPENEXR) - # TODO: IF(WITH_LCMS) + IF(WITH_LCMS) + SET(LCMS ${LIBDIR}/lcms) + SET(LCMS_INCLUDE_DIR ${LCMS}/include) + SET(LCMS_LIBRARY lcms) + SET(LCMS_LIBPATH ${LCMS}/lib) + ENDIF(WITH_LCMS) IF(WITH_FFMPEG) SET(FFMPEG ${LIBDIR}/ffmpeg) @@ -784,6 +806,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") |