Cycles: Add some TODO comments about derivatives
[blender.git] / CMakeLists.txt
index 591942cc8fec33792221c7e3d6fb794f1acd63b2..029198f7064210f5457f418255c2a27cc1b41982 100644 (file)
@@ -158,6 +158,7 @@ option_defaults_init(
        _init_SDL
        _init_FFTW3
        _init_GAMEENGINE
+       _init_OPENSUBDIV
 )
 
 # customize...
@@ -174,11 +175,13 @@ if (UNIX AND NOT APPLE)
        set(_init_OPENCOLORIO                    OFF)
        set(_init_SDL                            OFF)
        set(_init_FFTW3                          OFF)
+       set(_init_OPENSUBDIV                     OFF)
 elseif(WIN32)
        set(_init_JACK                           OFF)
 elseif(APPLE)
        set(_init_INPUT_NDOF                     OFF)
        set(_init_JACK                           OFF)
+       set(_init_OPENSUBDIV                     OFF)
 endif()
 
 
@@ -229,7 +232,9 @@ option(WITH_COMPOSITOR         "Enable the tile based nodal compositor" ON)
 option(WITH_COMPOSITOR_WERROR  "Treat warnings as errors in compositor code" OFF)
 mark_as_advanced(WITH_COMPOSITOR_WERROR)
 
-option(WITH_OPENSUBDIV    "Enable OpenSubdiv for surface subdivision" OFF)
+option(WITH_OPENSUBDIV    "Enable OpenSubdiv for surface subdivision" _init_OPENSUBDIV)
+option(WITH_SUBSURF_WERROR  "Treat warnings as errors in subsurf code" OFF)
+mark_as_advanced(WITH_COMPOSITOR_WERROR)
 
 # GHOST Windowing Library Options
 option(WITH_GHOST_DEBUG   "Enable debugging output for the GHOST library" OFF)
@@ -506,7 +511,11 @@ if(APPLE)
        endif()
        
        execute_process(COMMAND uname -r OUTPUT_VARIABLE MAC_SYS) # check for actual system-version
-       if(${MAC_SYS} MATCHES 14)
+       if(${MAC_SYS} MATCHES 15)
+               set(OSX_SYSTEM 10.11)
+               # throw an error here, older cmake cannot handle 2 digit subversion!
+               cmake_minimum_required(VERSION 3.0.0)
+       elseif(${MAC_SYS} MATCHES 14)
                set(OSX_SYSTEM 10.10)
                # throw an error here, older cmake cannot handle 2 digit subversion!
                cmake_minimum_required(VERSION 3.0.0)
@@ -714,24 +723,29 @@ endif()
 
 if(WITH_AUDASPACE)
        if(WITH_SYSTEM_AUDASPACE)
-               add_definitions("-DAUD_DEVICE_H=<AUD_Device.h>")
-               add_definitions("-DAUD_SPECIAL_H=<AUD_Special.h>")
-               add_definitions("-DAUD_SOUND_H=<AUD_Sound.h>")
-               add_definitions("-DAUD_HANDLE_H=<AUD_Handle.h>")
-               add_definitions("-DAUD_SEQUENCE_H=<AUD_Sequence.h>")
-               add_definitions("-DAUD_TYPES_H=<AUD_Types.h>")
-               add_definitions("-DAUD_PYTHON_H=<python/PyAPI.h>")
-               set(AUDASPACE_DEFINITIONS -DWITH_AUDASPACE -DWITH_SYSTEM_AUDASPACE)
+               set(AUDASPACE_DEFINITIONS
+                       -DWITH_AUDASPACE
+                       -DWITH_SYSTEM_AUDASPACE
+                       "-DAUD_DEVICE_H=<AUD_Device.h>"
+                       "-DAUD_SPECIAL_H=<AUD_Special.h>"
+                       "-DAUD_SOUND_H=<AUD_Sound.h>"
+                       "-DAUD_HANDLE_H=<AUD_Handle.h>"
+                       "-DAUD_SEQUENCE_H=<AUD_Sequence.h>"
+                       "-DAUD_TYPES_H=<AUD_Types.h>"
+                       "-DAUD_PYTHON_H=<python/PyAPI.h>"
+               )
        else()
-               add_definitions("-DAUD_DEVICE_H=<AUD_C-API.h>")
-               add_definitions("-DAUD_SPECIAL_H=<AUD_C-API.h>")
-               add_definitions("-DAUD_SOUND_H=<AUD_C-API.h>")
-               add_definitions("-DAUD_HANDLE_H=<AUD_C-API.h>")
-               add_definitions("-DAUD_SEQUENCE_H=<AUD_C-API.h>")
-               add_definitions("-DAUD_TYPES_H=<AUD_Space.h>")
                set(AUDASPACE_C_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/intern/audaspace/intern")
                set(AUDASPACE_PY_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/intern/audaspace/intern")
-               set(AUDASPACE_DEFINITIONS -DWITH_AUDASPACE)
+               set(AUDASPACE_DEFINITIONS
+                       -DWITH_AUDASPACE
+                       "-DAUD_DEVICE_H=<AUD_C-API.h>"
+                       "-DAUD_SPECIAL_H=<AUD_C-API.h>"
+                       "-DAUD_SOUND_H=<AUD_C-API.h>"
+                       "-DAUD_HANDLE_H=<AUD_C-API.h>"
+                       "-DAUD_SEQUENCE_H=<AUD_C-API.h>"
+                       "-DAUD_TYPES_H=<AUD_Space.h>"
+               )
        endif()
 endif()
 
@@ -1140,7 +1154,7 @@ if(UNIX AND NOT APPLE)
 
                if(NOT OPENSUBDIV_FOUND)
                        set(WITH_OPENSUBDIV OFF)
-                       message(STATUS "OpenSundiv not found")
+                       message(STATUS "OpenSubdiv not found")
                endif()
        endif()
 
@@ -2310,9 +2324,14 @@ endif()
 if(WITH_IMAGE_OPENJPEG)
        if(WITH_SYSTEM_OPENJPEG)
                # dealt with above
+               set(OPENJPEG_DEFINES "")
        else()
                set(OPENJPEG_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/libopenjpeg")
-               add_definitions(-DOPJ_STATIC)
+               set(OPENJPEG_DEFINES "-DOPJ_STATIC")
+       endif()
+       # Special handling of Windows platform where openjpeg is always static.
+       if(WIN32)
+               set(OPENJPEG_DEFINES "-DOPJ_STATIC")
        endif()
 endif()