Bugfix: Crash in Sequencer when trying to undo after using Grease Pencil
[blender.git] / CMakeLists.txt
index 5632d211415e00475c88770e4a523a0b4b4276d2..191fb61e1b4f593c21f3197f6895ce3aeb6a39dd 100644 (file)
@@ -1,4 +1,3 @@
-# -*- mode: cmake; indent-tabs-mode: t; -*-
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
 # This program is free software; you can redistribute it and/or
@@ -161,8 +160,6 @@ 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_XDG_USER_DIRS    "Build with XDG Base Directory Specification (only config and documents for now)" OFF)
-       mark_as_advanced(WITH_XDG_USER_DIRS)
 
        # freebsd doesn't seems to support XDND
        if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
@@ -231,19 +228,17 @@ option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install fol
 set(PYTHON_NUMPY_PATH            "" CACHE PATH "Python to python site-packages or dist-packages containing 'numpy' module")
 mark_as_advanced(PYTHON_NUMPY_PATH)
 
-option(WITH_MINGW64                   "Use the 64-bit version of MinGW" OFF)
-mark_as_advanced(WITH_MINGW64)
+if(MINGW)
+       option(WITH_MINGW64                   "Use the 64-bit version of MinGW" OFF)
+       mark_as_advanced(WITH_MINGW64)
+endif()
 
 # Cycles
 option(WITH_CYCLES                                     "Enable cycles Render Engine" ON)
 option(WITH_CYCLES_TEST                                "Build cycles test application" OFF)
+option(WITH_CYCLES_OSL                         "Build Cycles with OSL support" OFF)
 option(WITH_CYCLES_CUDA_BINARIES       "Build cycles CUDA binaries" OFF)
-if(WIN32 AND NOT CMAKE_CL_64 AND NOT WITH_MINGW64)
-       set(PLATFORM_DEFAULT sm_20 sm_21)
-else()
-       set(PLATFORM_DEFAULT sm_13 sm_20 sm_21)
-endif()
-set(CYCLES_CUDA_BINARIES_ARCH ${PLATFORM_DEFAULT} CACHE STRING "CUDA architectures to build binaries for")
+set(CYCLES_CUDA_BINARIES_ARCH sm_13 sm_20 sm_21 CACHE STRING "CUDA architectures to build binaries for")
 mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
 unset(PLATFORM_DEFAULT)
 
@@ -559,7 +554,7 @@ if(UNIX AND NOT APPLE)
                endif()
 
                mark_as_advanced(FFMPEG)
-               set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
+               set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include ${FFMPEG}/include/ffmpeg)
                mark_as_advanced(FFMPEG_LIBRARIES)
                set(FFMPEG_LIBPATH ${FFMPEG}/lib)
                set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
@@ -652,10 +647,17 @@ if(UNIX AND NOT APPLE)
 
                find_package(OpenImageIO)
 
-               set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARY} ${OPENEXR_LIBRARIES} ${ZLIB_LIBRARIES} ${BOOST_LIBRARIES})
+               set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES} ${BOOST_LIBRARIES})
                set(OPENIMAGEIO_LIBPATH)  # TODO, remove and reference the absolute path everywhere
                set(OPENIMAGEIO_DEFINITIONS)
 
+               if(WITH_IMAGE_TIFF)
+                       list(APPEND OPENIMAGEIO_LIBRARIES "${TIFF_LIBRARY}")
+               endif()
+               if(WITH_IMAGE_OPENEXR)
+                       list(APPEND OPENIMAGEIO_LIBRARIES "${OPENEXR_LIBRARIES}")
+               endif()
+
                if(NOT OPENIMAGEIO_FOUND)
                        set(WITH_OPENIMAGEIO OFF)
                        set(WITH_CYCLES OFF)
@@ -1107,7 +1109,7 @@ elseif(WIN32)
 
                if(WITH_CODEC_FFMPEG)
                        set(FFMPEG ${LIBDIR}/ffmpeg)
-                       set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include ${FFMPEG}/include)
+                       set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
                        if(WITH_MINGW64)
                                set(FFMPEG_LIBRARIES avcodec.dll avformat.dll avdevice.dll avutil.dll swscale.dll swresample.dll)
                        else()