Cleanup: use 2 space indentation for CMake
authorCampbell Barton <ideasman42@gmail.com>
Wed, 17 Apr 2019 04:35:54 +0000 (06:35 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 17 Apr 2019 04:35:54 +0000 (06:35 +0200)
121 files changed:
CMakeLists.txt
build_files/build_environment/CMakeLists.txt
build_files/build_environment/cmake/alembic.cmake
build_files/build_environment/cmake/blendthumb.cmake
build_files/build_environment/cmake/blosc.cmake
build_files/build_environment/cmake/boost.cmake
build_files/build_environment/cmake/bzip2.cmake
build_files/build_environment/cmake/clang.cmake
build_files/build_environment/cmake/clew.cmake
build_files/build_environment/cmake/cuew.cmake
build_files/build_environment/cmake/embree.cmake
build_files/build_environment/cmake/faad.cmake
build_files/build_environment/cmake/ffi.cmake
build_files/build_environment/cmake/ffmpeg.cmake
build_files/build_environment/cmake/fftw.cmake
build_files/build_environment/cmake/flac.cmake
build_files/build_environment/cmake/flexbison.cmake
build_files/build_environment/cmake/freeglut.cmake
build_files/build_environment/cmake/freetype.cmake
build_files/build_environment/cmake/glew.cmake
build_files/build_environment/cmake/glfw.cmake
build_files/build_environment/cmake/harvest.cmake
build_files/build_environment/cmake/hdf5.cmake
build_files/build_environment/cmake/hidapi.cmake
build_files/build_environment/cmake/iconv.cmake
build_files/build_environment/cmake/ilmbase.cmake
build_files/build_environment/cmake/jemalloc.cmake
build_files/build_environment/cmake/jpeg.cmake
build_files/build_environment/cmake/lame.cmake
build_files/build_environment/cmake/lcms.cmake
build_files/build_environment/cmake/llvm.cmake
build_files/build_environment/cmake/lzma.cmake
build_files/build_environment/cmake/numpy.cmake
build_files/build_environment/cmake/ogg.cmake
build_files/build_environment/cmake/openal.cmake
build_files/build_environment/cmake/opencollada.cmake
build_files/build_environment/cmake/opencolorio.cmake
build_files/build_environment/cmake/openexr.cmake
build_files/build_environment/cmake/openimageio.cmake
build_files/build_environment/cmake/openjpeg.cmake
build_files/build_environment/cmake/openmp.cmake
build_files/build_environment/cmake/opensubdiv.cmake
build_files/build_environment/cmake/openvdb.cmake
build_files/build_environment/cmake/options.cmake
build_files/build_environment/cmake/osl.cmake
build_files/build_environment/cmake/png.cmake
build_files/build_environment/cmake/pthreads.cmake
build_files/build_environment/cmake/pugixml.cmake
build_files/build_environment/cmake/python.cmake
build_files/build_environment/cmake/python_site_packages.cmake
build_files/build_environment/cmake/sdl.cmake
build_files/build_environment/cmake/setup_mingw32.cmake
build_files/build_environment/cmake/setup_mingw64.cmake
build_files/build_environment/cmake/sndfile.cmake
build_files/build_environment/cmake/spnav.cmake
build_files/build_environment/cmake/sqlite.cmake
build_files/build_environment/cmake/ssl.cmake
build_files/build_environment/cmake/tbb.cmake
build_files/build_environment/cmake/theora.cmake
build_files/build_environment/cmake/tiff.cmake
build_files/build_environment/cmake/tinyxml.cmake
build_files/build_environment/cmake/versions.cmake
build_files/build_environment/cmake/vorbis.cmake
build_files/build_environment/cmake/vpx.cmake
build_files/build_environment/cmake/webp.cmake
build_files/build_environment/cmake/x264.cmake
build_files/build_environment/cmake/xml2.cmake
build_files/build_environment/cmake/xvidcore.cmake
build_files/build_environment/cmake/yamlcpp.cmake
build_files/build_environment/cmake/zlib.cmake
build_files/build_environment/cmake/zlib_mingw.cmake
build_files/buildbot/config/blender_linux.cmake
build_files/cmake/Modules/FindGLEW.cmake
build_files/cmake/Modules/FindLLVM.cmake
build_files/cmake/Modules/FindSndFile.cmake
build_files/cmake/Modules/GTestTesting.cmake
build_files/cmake/RpmBuild.cmake
build_files/cmake/buildinfo.cmake
build_files/cmake/config/blender_full.cmake
build_files/cmake/config/blender_release.cmake
build_files/cmake/config/bpy_module.cmake
build_files/cmake/macros.cmake
build_files/cmake/packaging.cmake
build_files/cmake/platform/platform_apple.cmake
build_files/cmake/platform/platform_apple_xcode.cmake
build_files/cmake/platform/platform_unix.cmake
build_files/cmake/platform/platform_win32.cmake
extern/CMakeLists.txt
extern/audaspace/CMakeLists.txt
extern/audaspace/blender_config.cmake
extern/binreloc/CMakeLists.txt
extern/bullet2/CMakeLists.txt
extern/ceres/CMakeLists.txt
extern/ceres/bundle.sh
extern/clew/CMakeLists.txt
extern/cuew/CMakeLists.txt
extern/curve_fit_nd/CMakeLists.txt
extern/draco/dracoenc/CMakeLists.txt
extern/gflags/CMakeLists.txt
extern/glew-es/CMakeLists.txt
extern/glew/CMakeLists.txt
extern/glog/CMakeLists.txt
extern/gtest/CMakeLists.txt
extern/lzma/CMakeLists.txt
extern/lzo/CMakeLists.txt
extern/rangetree/CMakeLists.txt
extern/sdlew/CMakeLists.txt
extern/wcwidth/CMakeLists.txt
extern/xdnd/CMakeLists.txt
intern/CMakeLists.txt
intern/elbeem/CMakeLists.txt
intern/itasc/CMakeLists.txt
intern/libmv/CMakeLists.txt
intern/libmv/bundle.sh
intern/numaapi/CMakeLists.txt
intern/smoke/CMakeLists.txt
release/windows/blendthumb/CMakeLists.txt
tests/CMakeLists.txt
tests/python/CMakeLists.txt
tests/python/collada/CMakeLists.txt
tests/python/view_layer/CMakeLists.txt

index 2f5b824..7ab5655 100644 (file)
 # build the libs and objects in it.
 
 if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
-       if(NOT DEFINED WITH_IN_SOURCE_BUILD)
-               message(FATAL_ERROR
-                       "CMake generation for blender is not allowed within the source directory!"
-                       "\n Remove \"${CMAKE_SOURCE_DIR}/CMakeCache.txt\" and try again from another folder, e.g.:"
-                       "\n "
-                       "\n rm CMakeCache.txt"
-                       "\n cd .."
-                       "\n mkdir cmake-make"
-                       "\n cd cmake-make"
-                       "\n cmake ../blender"
-                       "\n "
-                       "\n Alternately define WITH_IN_SOURCE_BUILD to force this option (not recommended!)"
-               )
-       endif()
+  if(NOT DEFINED WITH_IN_SOURCE_BUILD)
+    message(FATAL_ERROR
+      "CMake generation for blender is not allowed within the source directory!"
+      "\n Remove \"${CMAKE_SOURCE_DIR}/CMakeCache.txt\" and try again from another folder, e.g.:"
+      "\n "
+      "\n rm CMakeCache.txt"
+      "\n cd .."
+      "\n mkdir cmake-make"
+      "\n cd cmake-make"
+      "\n cmake ../blender"
+      "\n "
+      "\n Alternately define WITH_IN_SOURCE_BUILD to force this option (not recommended!)"
+    )
+  endif()
 endif()
 
 cmake_minimum_required(VERSION 3.5)
@@ -46,13 +46,13 @@ cmake_minimum_required(VERSION 3.5)
 # platforms which don't hare GLVND yet. Only do it if preference was not set
 # externally.
 if(NOT DEFINED OpenGL_GL_PREFERENCE)
-       set(OpenGL_GL_PREFERENCE "LEGACY")
+  set(OpenGL_GL_PREFERENCE "LEGACY")
 endif()
 
 if(NOT EXECUTABLE_OUTPUT_PATH)
-       set(FIRST_RUN TRUE)
+  set(FIRST_RUN TRUE)
 else()
-       set(FIRST_RUN FALSE)
+  set(FIRST_RUN FALSE)
 endif()
 
 # this starts out unset
@@ -61,12 +61,12 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build_files/cmake/platform")
 
 # avoid having empty buildtype
 if(NOT DEFINED CMAKE_BUILD_TYPE_INIT)
-       set(CMAKE_BUILD_TYPE_INIT "Release")
+  set(CMAKE_BUILD_TYPE_INIT "Release")
 endif()
 
 # Omit superfluous "Up-to-date" messages.
 if(NOT DEFINED CMAKE_INSTALL_MESSAGE)
-       set(CMAKE_INSTALL_MESSAGE "LAZY")
+  set(CMAKE_INSTALL_MESSAGE "LAZY")
 endif()
 
 # quiet output for Makefiles, 'make -s' helps too
@@ -74,10 +74,10 @@ endif()
 
 # global compile definitions since add_definitions() adds for all.
 set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
-       $<$<CONFIG:Debug>:DEBUG;_DEBUG>
-       $<$<CONFIG:Release>:NDEBUG>
-       $<$<CONFIG:MinSizeRel>:NDEBUG>
-       $<$<CONFIG:RelWithDebInfo>:NDEBUG>
+  $<$<CONFIG:Debug>:DEBUG;_DEBUG>
+  $<$<CONFIG:Release>:NDEBUG>
+  $<$<CONFIG:MinSizeRel>:NDEBUG>
+  $<$<CONFIG:RelWithDebInfo>:NDEBUG>
 )
 
 #-----------------------------------------------------------------------------
@@ -118,9 +118,9 @@ enable_testing()
 set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL "" FORCE)
 set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE)
 if(MSVC)
-       set(TESTS_OUTPUT_DIR ${EXECUTABLE_OUTPUT_PATH}/tests/$<CONFIG>/ CACHE INTERNAL "" FORCE)
+  set(TESTS_OUTPUT_DIR ${EXECUTABLE_OUTPUT_PATH}/tests/$<CONFIG>/ CACHE INTERNAL "" FORCE)
 else()
-       set(TESTS_OUTPUT_DIR ${EXECUTABLE_OUTPUT_PATH}/tests/ CACHE INTERNAL "" FORCE)
+  set(TESTS_OUTPUT_DIR ${EXECUTABLE_OUTPUT_PATH}/tests/ CACHE INTERNAL "" FORCE)
 endif()
 
 #-----------------------------------------------------------------------------
@@ -137,55 +137,55 @@ set(_init_vars)
 
 # initialize to ON
 macro(option_defaults_init)
-       foreach(_var ${ARGV})
-               set(${_var} ON)
-               list(APPEND _init_vars "${_var}")
-       endforeach()
-       unset(_var)
+  foreach(_var ${ARGV})
+    set(${_var} ON)
+    list(APPEND _init_vars "${_var}")
+  endforeach()
+  unset(_var)
 endmacro()
 
 # remove from namespace
 macro(option_defaults_clear)
-       foreach(_var ${_init_vars})
-               unset(${_var})
-       endforeach()
-       unset(_var)
-       unset(_init_vars)
+  foreach(_var ${_init_vars})
+    unset(${_var})
+  endforeach()
+  unset(_var)
+  unset(_init_vars)
 endmacro()
 
 
 # values to initialize WITH_****
 option_defaults_init(
-       _init_BUILDINFO
-       _init_CODEC_FFMPEG
-       _init_CYCLES_OSL
-       _init_IMAGE_OPENEXR
-       _init_INPUT_NDOF
-       _init_JACK
-       _init_OPENCOLLADA
-       _init_OPENCOLORIO
-       _init_SDL
-       _init_FFTW3
-       _init_OPENSUBDIV
+  _init_BUILDINFO
+  _init_CODEC_FFMPEG
+  _init_CYCLES_OSL
+  _init_IMAGE_OPENEXR
+  _init_INPUT_NDOF
+  _init_JACK
+  _init_OPENCOLLADA
+  _init_OPENCOLORIO
+  _init_SDL
+  _init_FFTW3
+  _init_OPENSUBDIV
 )
 
 # customize...
 if(UNIX AND NOT APPLE)
-       # some of these libraries are problematic on Linux
-       # disable less important dependencies by default
-       set(_init_CODEC_FFMPEG                   OFF)
-       set(_init_CYCLES_OSL                     OFF)
-       set(_init_IMAGE_OPENEXR                  OFF)
-       set(_init_JACK                           OFF)
-       set(_init_OPENCOLLADA                    OFF)
-       set(_init_OPENCOLORIO                    OFF)
-       set(_init_SDL                            OFF)
-       set(_init_FFTW3                          OFF)
-       set(_init_OPENSUBDIV                     OFF)
+  # some of these libraries are problematic on Linux
+  # disable less important dependencies by default
+  set(_init_CODEC_FFMPEG                   OFF)
+  set(_init_CYCLES_OSL                     OFF)
+  set(_init_IMAGE_OPENEXR                  OFF)
+  set(_init_JACK                           OFF)
+  set(_init_OPENCOLLADA                    OFF)
+  set(_init_OPENCOLORIO                    OFF)
+  set(_init_SDL                            OFF)
+  set(_init_FFTW3                          OFF)
+  set(_init_OPENSUBDIV                     OFF)
 elseif(WIN32)
-       set(_init_JACK                           OFF)
+  set(_init_JACK                           OFF)
 elseif(APPLE)
-       set(_init_JACK                           OFF)
+  set(_init_JACK                           OFF)
 endif()
 
 
@@ -194,7 +194,7 @@ endif()
 
 # First platform specific non-cached vars
 if(UNIX AND NOT (APPLE OR HAIKU))
-       set(WITH_X11 ON)
+  set(WITH_X11 ON)
 endif()
 
 # Blender internal features
@@ -212,13 +212,13 @@ option(WITH_PYTHON_SAFETY "Enable internal API error checking to track invalid d
 mark_as_advanced(WITH_PYTHON_SAFETY)
 option(WITH_PYTHON_MODULE "Enable building as a python module which runs without a user interface, like running regular blender in background mode (experimental, only enable for development), installs to PYTHON_SITE_PACKAGES (or CMAKE_INSTALL_PREFIX if WITH_INSTALL_PORTABLE is enabled)." OFF)
 if(APPLE)
-       option(WITH_PYTHON_FRAMEWORK "Enable building using the Python available in the framework (OSX only)" OFF)
+  option(WITH_PYTHON_FRAMEWORK "Enable building using the Python available in the framework (OSX only)" OFF)
 endif()
 
 option(WITH_BUILDINFO     "Include extra build details (only disable for development & faster builds)" ${_init_BUILDINFO})
 if(${CMAKE_VERSION} VERSION_LESS 2.8.8)
-       # add_library OBJECT arg unsupported
-       set(WITH_BUILDINFO OFF)
+  # add_library OBJECT arg unsupported
+  set(WITH_BUILDINFO OFF)
 endif()
 set(BUILDINFO_OVERRIDE_DATE "" CACHE STRING "Use instead of the current date for reproducible builds (empty string disables this option)")
 set(BUILDINFO_OVERRIDE_TIME "" CACHE STRING "Use instead of the current time for reproducible builds (empty string disables this option)")
@@ -253,7 +253,7 @@ option(WITH_GHOST_SDL    "Enable building Blender against SDL for windowing rath
 mark_as_advanced(WITH_GHOST_SDL)
 
 if(WITH_X11)
-       option(WITH_GHOST_XDND    "Enable drag'n'drop support on X11 using XDND protocol" ON)
+  option(WITH_GHOST_XDND    "Enable drag'n'drop support on X11 using XDND protocol" ON)
 endif()
 
 # Misc...
@@ -266,34 +266,34 @@ mark_as_advanced(WITH_AUDASPACE)
 mark_as_advanced(WITH_SYSTEM_AUDASPACE)
 
 if(NOT WITH_AUDASPACE)
-       set(WITH_SYSTEM_AUDASPACE OFF)
+  set(WITH_SYSTEM_AUDASPACE OFF)
 endif()
 
 option(WITH_OPENMP        "Enable OpenMP (has to be supported by the compiler)" ON)
 if(UNIX AND NOT APPLE)
-       option(WITH_OPENMP_STATIC "Link OpenMP statically (only used by the release environment)" OFF)
-       mark_as_advanced(WITH_OPENMP_STATIC)
+  option(WITH_OPENMP_STATIC "Link OpenMP statically (only used by the release environment)" OFF)
+  mark_as_advanced(WITH_OPENMP_STATIC)
 endif()
 
 if(WITH_X11)
-       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_X11_XFIXES    "Enable X11 XWayland cursor warping workaround"         ON)
-       option(WITH_X11_ALPHA     "Enable X11 transparent background"                     ON)
+  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_X11_XFIXES    "Enable X11 XWayland cursor warping workaround"         ON)
+  option(WITH_X11_ALPHA     "Enable X11 transparent background"                     ON)
 endif()
 
 if(UNIX AND NOT APPLE)
-       option(WITH_SYSTEM_GLEW "Use GLEW OpenGL wrapper library provided by the operating system" OFF)
-       option(WITH_SYSTEM_GLES "Use OpenGL ES library provided by the operating system"           ON)
+  option(WITH_SYSTEM_GLEW "Use GLEW OpenGL wrapper library provided by the operating system" OFF)
+  option(WITH_SYSTEM_GLES "Use OpenGL ES library provided by the operating system"           ON)
 else()
-       # not an option for other OS's
-       set(WITH_SYSTEM_GLEW OFF)
-       set(WITH_SYSTEM_GLES OFF)
+  # not an option for other OS's
+  set(WITH_SYSTEM_GLEW OFF)
+  set(WITH_SYSTEM_GLES OFF)
 endif()
 
 
 if(UNIX AND NOT APPLE)
-       option(WITH_SYSTEM_EIGEN3 "Use the systems Eigen3 library" OFF)
+  option(WITH_SYSTEM_EIGEN3 "Use the systems Eigen3 library" OFF)
 endif()
 
 
@@ -332,17 +332,17 @@ option(WITH_SDL           "Enable SDL for sound and joystick support" ${_init_SD
 option(WITH_OPENAL        "Enable OpenAL Support (http://www.openal.org)" ON)
 option(WITH_JACK          "Enable JACK Support (http://www.jackaudio.org)" ${_init_JACK})
 if(UNIX AND NOT APPLE)
-       option(WITH_JACK_DYNLOAD  "Enable runtime dynamic JACK libraries loading" OFF)
+  option(WITH_JACK_DYNLOAD  "Enable runtime dynamic JACK libraries loading" OFF)
 endif()
 if(UNIX AND NOT APPLE)
-       option(WITH_SDL_DYNLOAD  "Enable runtime dynamic SDL libraries loading" OFF)
+  option(WITH_SDL_DYNLOAD  "Enable runtime dynamic SDL libraries loading" OFF)
 endif()
 
 # Compression
 option(WITH_LZO           "Enable fast LZO compression (used for pointcache)" ON)
 option(WITH_LZMA          "Enable best LZMA compression, (used for pointcache)" ON)
 if(UNIX AND NOT APPLE)
-       option(WITH_SYSTEM_LZO    "Use the system LZO library" OFF)
+  option(WITH_SYSTEM_LZO    "Use the system LZO library" OFF)
 endif()
 option(WITH_DRACO         "Enable Draco mesh compression Python module (used for glTF)" ON)
 
@@ -362,65 +362,65 @@ option(WITH_FREESTYLE     "Enable Freestyle (advanced edges rendering)" ON)
 
 # Misc
 if(WIN32)
-       option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON)
+  option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON)
 endif()
 option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ${_init_INPUT_NDOF})
-option(WITH_RAYOPTIMIZATION    "Enable use of SIMD (SSE) optimizations for the raytracer" ON)
+option(WITH_RAYOPTIMIZATION "Enable use of SIMD (SSE) optimizations for the raytracer" ON)
 if(UNIX AND NOT APPLE)
-       option(WITH_INSTALL_PORTABLE "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
-       option(WITH_STATIC_LIBS "Try to link with static libraries, as much as possible, to make blender more portable across distributions" OFF)
-       if(WITH_STATIC_LIBS)
-               option(WITH_BOOST_ICU "Boost uses ICU library (required for linking with static Boost built with libicu)." OFF)
-               mark_as_advanced(WITH_BOOST_ICU)
-       endif()
+  option(WITH_INSTALL_PORTABLE "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
+  option(WITH_STATIC_LIBS "Try to link with static libraries, as much as possible, to make blender more portable across distributions" OFF)
+  if(WITH_STATIC_LIBS)
+    option(WITH_BOOST_ICU "Boost uses ICU library (required for linking with static Boost built with libicu)." OFF)
+    mark_as_advanced(WITH_BOOST_ICU)
+  endif()
 endif()
 
 option(WITH_PYTHON_INSTALL       "Copy system python into the blender install folder" ON)
 if(WIN32 OR APPLE)
-       # Windows and macOS have this bundled with Python libraries.
+  # Windows and macOS have this bundled with Python libraries.
 elseif(WITH_PYTHON_INSTALL OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE))
-       set(PYTHON_NUMPY_PATH            "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module")
-       mark_as_advanced(PYTHON_NUMPY_PATH)
-       set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module")
-       mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS)
+  set(PYTHON_NUMPY_PATH            "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module")
+  mark_as_advanced(PYTHON_NUMPY_PATH)
+  set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module")
+  mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS)
 endif()
 if(WITH_PYTHON_INSTALL)
-       option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install folder"  ON)
+  option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install folder"  ON)
 
-       if(UNIX AND NOT APPLE)
-               option(WITH_PYTHON_INSTALL_REQUESTS "Copy system requests into the blender install folder" ON)
-               set(PYTHON_REQUESTS_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'requests' module")
-               mark_as_advanced(PYTHON_REQUESTS_PATH)
-       endif()
+  if(UNIX AND NOT APPLE)
+    option(WITH_PYTHON_INSTALL_REQUESTS "Copy system requests into the blender install folder" ON)
+    set(PYTHON_REQUESTS_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'requests' module")
+    mark_as_advanced(PYTHON_REQUESTS_PATH)
+  endif()
 endif()
 
 option(WITH_CPU_SSE              "Enable SIMD instruction if they're detected on the host machine" ON)
 mark_as_advanced(WITH_CPU_SSE)
 
 # Cycles
-option(WITH_CYCLES                                     "Enable Cycles Render Engine" ON)
-option(WITH_CYCLES_STANDALONE          "Build Cycles standalone application" OFF)
-option(WITH_CYCLES_STANDALONE_GUI      "Build Cycles standalone with GUI" OFF)
-option(WITH_CYCLES_OSL                         "Build Cycles with OSL support" ${_init_CYCLES_OSL})
-option(WITH_CYCLES_EMBREE                      "Build Cycles with Embree support" OFF)
-option(WITH_CYCLES_CUDA_BINARIES       "Build Cycles CUDA binaries" OFF)
-option(WITH_CYCLES_CUBIN_COMPILER      "Build cubins with nvrtc based compiler instead of nvcc" OFF)
+option(WITH_CYCLES                  "Enable Cycles Render Engine" ON)
+option(WITH_CYCLES_STANDALONE       "Build Cycles standalone application" OFF)
+option(WITH_CYCLES_STANDALONE_GUI   "Build Cycles standalone with GUI" OFF)
+option(WITH_CYCLES_OSL              "Build Cycles with OSL support" ${_init_CYCLES_OSL})
+option(WITH_CYCLES_EMBREE           "Build Cycles with Embree support" OFF)
+option(WITH_CYCLES_CUDA_BINARIES    "Build Cycles CUDA binaries" OFF)
+option(WITH_CYCLES_CUBIN_COMPILER   "Build cubins with nvrtc based compiler instead of nvcc" OFF)
 option(WITH_CYCLES_CUDA_BUILD_SERIAL "Build cubins one after another (useful on machines with limited RAM)" OFF)
 mark_as_advanced(WITH_CYCLES_CUDA_BUILD_SERIAL)
 set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 CACHE STRING "CUDA architectures to build binaries for")
 mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
 unset(PLATFORM_DEFAULT)
-option(WITH_CYCLES_LOGGING     "Build Cycles with logging support" ON)
-option(WITH_CYCLES_DEBUG       "Build Cycles with extra debug capabilities" OFF)
-option(WITH_CYCLES_NATIVE_ONLY "Build Cycles with native kernel only (which fits current CPU, use for development only)" OFF)
+option(WITH_CYCLES_LOGGING  "Build Cycles with logging support" ON)
+option(WITH_CYCLES_DEBUG    "Build Cycles with extra debug capabilities" OFF)
+option(WITH_CYCLES_NATIVE_ONLY  "Build Cycles with native kernel only (which fits current CPU, use for development only)" OFF)
 mark_as_advanced(WITH_CYCLES_CUBIN_COMPILER)
 mark_as_advanced(WITH_CYCLES_LOGGING)
 mark_as_advanced(WITH_CYCLES_DEBUG)
 mark_as_advanced(WITH_CYCLES_NATIVE_ONLY)
 
-option(WITH_CYCLES_DEVICE_CUDA                         "Enable Cycles CUDA compute support" ON)
-option(WITH_CYCLES_DEVICE_OPENCL                       "Enable Cycles OpenCL compute support" ON)
-option(WITH_CYCLES_NETWORK                             "Enable Cycles compute over network support (EXPERIMENTAL and unfinished)" OFF)
+option(WITH_CYCLES_DEVICE_CUDA              "Enable Cycles CUDA compute support" ON)
+option(WITH_CYCLES_DEVICE_OPENCL            "Enable Cycles OpenCL compute support" ON)
+option(WITH_CYCLES_NETWORK              "Enable Cycles compute over network support (EXPERIMENTAL and unfinished)" OFF)
 mark_as_advanced(WITH_CYCLES_DEVICE_CUDA)
 mark_as_advanced(WITH_CYCLES_DEVICE_OPENCL)
 mark_as_advanced(WITH_CYCLES_NETWORK)
@@ -429,11 +429,11 @@ option(WITH_CUDA_DYNLOAD "Dynamically load CUDA libraries at runtime" ON)
 mark_as_advanced(WITH_CUDA_DYNLOAD)
 
 # LLVM
-option(WITH_LLVM                                       "Use LLVM" OFF)
+option(WITH_LLVM                    "Use LLVM" OFF)
 if(APPLE)
-       option(LLVM_STATIC                                      "Link with LLVM static libraries" ON) # we prefer static llvm build on Apple, dyn build possible though
+  option(LLVM_STATIC                  "Link with LLVM static libraries" ON) # we prefer static llvm build on Apple, dyn build possible though
 else()
-       option(LLVM_STATIC                                      "Link with LLVM static libraries" OFF)
+  option(LLVM_STATIC                  "Link with LLVM static libraries" OFF)
 endif()
 mark_as_advanced(LLVM_STATIC)
 
@@ -452,7 +452,7 @@ mark_as_advanced(WITH_CXX_GUARDEDALLOC)
 option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" ON)
 mark_as_advanced(WITH_ASSERT_ABORT)
 
-option(WITH_BOOST                                      "Enable features depending on boost" ON)
+option(WITH_BOOST                   "Enable features depending on boost" ON)
 
 # Unit testsing
 option(WITH_GTESTS "Enable GTest unit testing" OFF)
@@ -462,7 +462,7 @@ option(WITH_OPENGL_DRAW_TESTS "Enable OpenGL UI drawing related unit testing (Ex
 
 # Documentation
 if(UNIX AND NOT APPLE)
-       option(WITH_DOC_MANPAGE "Create a manual page (Unix manpage)" OFF)
+  option(WITH_DOC_MANPAGE "Create a manual page (Unix manpage)" OFF)
 endif()
 
 
@@ -474,39 +474,39 @@ option(WITH_GL_EGL              "Use the EGL OpenGL system library instead of th
 option(WITH_GL_PROFILE_ES20     "Support using OpenGL ES 2.0. (thru either EGL or the AGL/WGL/XGL 'es20' profile)"                                  OFF)
 
 mark_as_advanced(
-       WITH_OPENGL
-       WITH_GLEW_ES
-       WITH_GL_EGL
-       WITH_GL_PROFILE_ES20
+  WITH_OPENGL
+  WITH_GLEW_ES
+  WITH_GL_EGL
+  WITH_GL_PROFILE_ES20
 )
 
 if(WIN32)
-       option(WITH_GL_ANGLE "Link with the ANGLE library, an OpenGL ES 2.0 implementation based on Direct3D, instead of the system OpenGL library." OFF)
-       mark_as_advanced(WITH_GL_ANGLE)
+  option(WITH_GL_ANGLE "Link with the ANGLE library, an OpenGL ES 2.0 implementation based on Direct3D, instead of the system OpenGL library." OFF)
+  mark_as_advanced(WITH_GL_ANGLE)
 endif()
 
 if(WITH_GLEW_ES AND WITH_SYSTEM_GLEW)
-       message(WARNING Ignoring WITH_SYSTEM_GLEW and using WITH_GLEW_ES)
-       set(WITH_SYSTEM_GLEW OFF)
+  message(WARNING Ignoring WITH_SYSTEM_GLEW and using WITH_GLEW_ES)
+  set(WITH_SYSTEM_GLEW OFF)
 endif()
 
 if(WIN32)
-       getDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
-       set(CPACK_INSTALL_PREFIX ${CMAKE_GENERIC_PROGRAM_FILES}/${})
+  getDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
+  set(CPACK_INSTALL_PREFIX ${CMAKE_GENERIC_PROGRAM_FILES}/${})
 endif()
 
 # Compiler toolchain
 if(CMAKE_COMPILER_IS_GNUCC)
-       option(WITH_LINKER_GOLD "Use ld.gold linker which is usually faster than ld.bfd" ON)
-       mark_as_advanced(WITH_LINKER_GOLD)
+  option(WITH_LINKER_GOLD "Use ld.gold linker which is usually faster than ld.bfd" ON)
+  mark_as_advanced(WITH_LINKER_GOLD)
 endif()
 
 if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
-       option(WITH_COMPILER_ASAN "Build and link against address sanitizer (only for Debug & RelWithDebInfo targets)." OFF)
-       mark_as_advanced(WITH_COMPILER_ASAN)
+  option(WITH_COMPILER_ASAN "Build and link against address sanitizer (only for Debug & RelWithDebInfo targets)." OFF)
+  mark_as_advanced(WITH_COMPILER_ASAN)
 
-       if(WITH_COMPILER_ASAN)
-               set(_asan_defaults "\
+  if(WITH_COMPILER_ASAN)
+    set(_asan_defaults "\
 -fsanitize=address \
 -fsanitize=bool \
 -fsanitize=bounds \
@@ -521,27 +521,27 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
 -fno-sanitize=alignment \
 ")
 
-               if(NOT MSVC) # not all sanitizers are supported with clang-cl, these two however are very vocal about it
-                       set(_asan_defaults "${_asan_defaults} -fsanitize=leak -fsanitize=object-size" )
-               endif()
-               set(COMPILER_ASAN_CFLAGS "${_asan_defaults}" CACHE STRING "C flags for address sanitizer")
-               mark_as_advanced(COMPILER_ASAN_CFLAGS)
-               set(COMPILER_ASAN_CXXFLAGS "${_asan_defaults}" CACHE STRING "C++ flags for address sanitizer")
-               mark_as_advanced(COMPILER_ASAN_CXXFLAGS)
-
-               unset(_asan_defaults)
-
-               if(NOT MSVC)
-                       find_library(COMPILER_ASAN_LIBRARY asan ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
-               else()
-                       find_library( COMPILER_ASAN_LIBRARY NAMES clang_rt.asan-x86_64
-                               PATHS
-                               [HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/7.0.0/lib/windows
-                               [HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/6.0.0/lib/windows
-                       )
-               endif()
-               mark_as_advanced(COMPILER_ASAN_LIBRARY)
-       endif()
+    if(NOT MSVC) # not all sanitizers are supported with clang-cl, these two however are very vocal about it
+      set(_asan_defaults "${_asan_defaults} -fsanitize=leak -fsanitize=object-size" )
+    endif()
+    set(COMPILER_ASAN_CFLAGS "${_asan_defaults}" CACHE STRING "C flags for address sanitizer")
+    mark_as_advanced(COMPILER_ASAN_CFLAGS)
+    set(COMPILER_ASAN_CXXFLAGS "${_asan_defaults}" CACHE STRING "C++ flags for address sanitizer")
+    mark_as_advanced(COMPILER_ASAN_CXXFLAGS)
+
+    unset(_asan_defaults)
+
+    if(NOT MSVC)
+      find_library(COMPILER_ASAN_LIBRARY asan ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
+    else()
+      find_library( COMPILER_ASAN_LIBRARY NAMES clang_rt.asan-x86_64
+        PATHS
+        [HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/7.0.0/lib/windows
+        [HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/6.0.0/lib/windows
+      )
+    endif()
+    mark_as_advanced(COMPILER_ASAN_LIBRARY)
+  endif()
 endif()
 
 # Dependency graph
@@ -549,24 +549,24 @@ option(WITH_LEGACY_DEPSGRAPH "Build Blender with legacy dependency graph" ON)
 mark_as_advanced(WITH_LEGACY_DEPSGRAPH)
 
 if(WIN32)
-       # Use hardcoded paths or find_package to find externals
-       option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF)
-       mark_as_advanced(WITH_WINDOWS_FIND_MODULES)
+  # Use hardcoded paths or find_package to find externals
+  option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF)
+  mark_as_advanced(WITH_WINDOWS_FIND_MODULES)
 
-       option(WITH_WINDOWS_CODESIGN "Use signtool to sign the final binary." OFF)
-       mark_as_advanced(WITH_WINDOWS_CODESIGN)
+  option(WITH_WINDOWS_CODESIGN "Use signtool to sign the final binary." OFF)
+  mark_as_advanced(WITH_WINDOWS_CODESIGN)
 
-       set(WINDOWS_CODESIGN_PFX CACHE FILEPATH  "Path to pfx file to use for codesigning.")
-       mark_as_advanced(WINDOWS_CODESIGN_PFX)
+  set(WINDOWS_CODESIGN_PFX CACHE FILEPATH  "Path to pfx file to use for codesigning.")
+  mark_as_advanced(WINDOWS_CODESIGN_PFX)
 
-       set(WINDOWS_CODESIGN_PFX_PASSWORD CACHE STRING  "password for pfx file used for codesigning.")
-       mark_as_advanced(WINDOWS_CODESIGN_PFX_PASSWORD)
+  set(WINDOWS_CODESIGN_PFX_PASSWORD CACHE STRING  "password for pfx file used for codesigning.")
+  mark_as_advanced(WINDOWS_CODESIGN_PFX_PASSWORD)
 
-       option(WINDOWS_USE_VISUAL_STUDIO_FOLDERS "Organize the visual studio project according to source folders." ON)
-       mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_FOLDERS)
+  option(WINDOWS_USE_VISUAL_STUDIO_FOLDERS "Organize the visual studio project according to source folders." ON)
+  mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_FOLDERS)
 
-       option(WINDOWS_PYTHON_DEBUG "Include the files needed for debugging python scripts with visual studio 2017+." OFF)
-       mark_as_advanced(WINDOWS_PYTHON_DEBUG)
+  option(WINDOWS_PYTHON_DEBUG "Include the files needed for debugging python scripts with visual studio 2017+." OFF)
+  mark_as_advanced(WINDOWS_PYTHON_DEBUG)
 endif()
 
 # avoid using again
@@ -579,15 +579,15 @@ option_defaults_clear()
 # By default we want to install to the directory we are compiling our executables
 # unless specified otherwise, which we currently do not allow
 if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-       if(WIN32)
-               set(CMAKE_INSTALL_PREFIX ${EXECUTABLE_OUTPUT_PATH}/\${BUILD_TYPE} CACHE PATH "default install path" FORCE)
-       elseif(APPLE)
-               set(CMAKE_INSTALL_PREFIX ${EXECUTABLE_OUTPUT_PATH}/\${BUILD_TYPE} CACHE PATH "default install path" FORCE)
-       else()
-               if(WITH_INSTALL_PORTABLE)
-                       set(CMAKE_INSTALL_PREFIX ${EXECUTABLE_OUTPUT_PATH} CACHE PATH "default install path" FORCE)
-               endif()
-       endif()
+  if(WIN32)
+    set(CMAKE_INSTALL_PREFIX ${EXECUTABLE_OUTPUT_PATH}/\${BUILD_TYPE} CACHE PATH "default install path" FORCE)
+  elseif(APPLE)
+    set(CMAKE_INSTALL_PREFIX ${EXECUTABLE_OUTPUT_PATH}/\${BUILD_TYPE} CACHE PATH "default install path" FORCE)
+  else()
+    if(WITH_INSTALL_PORTABLE)
+      set(CMAKE_INSTALL_PREFIX ${EXECUTABLE_OUTPUT_PATH} CACHE PATH "default install path" FORCE)
+    endif()
+  endif()
 endif()
 
 
@@ -595,7 +595,7 @@ endif()
 # Apple
 
 if(APPLE)
-       include(platform_apple_xcode)
+  include(platform_apple_xcode)
 endif()
 
 
@@ -603,140 +603,140 @@ endif()
 # Check for conflicting/unsupported configurations
 
 if(NOT WITH_BLENDER AND NOT WITH_CYCLES_STANDALONE)
-       message(FATAL_ERROR
-               "At least one of WITH_BLENDER or WITH_CYCLES_STANDALONE "
-               "must be enabled, nothing to do!"
-       )
+  message(FATAL_ERROR
+    "At least one of WITH_BLENDER or WITH_CYCLES_STANDALONE "
+    "must be enabled, nothing to do!"
+  )
 endif()
 
 if(NOT WITH_AUDASPACE)
-       if(WITH_OPENAL)
-               message(WARNING "WITH_OPENAL requires WITH_AUDASPACE which is disabled")
-               set(WITH_OPENAL OFF)
-       endif()
-       if(WITH_JACK)
-               message(WARNING "WITH_JACK requires WITH_AUDASPACE which is disabled")
-               set(WITH_JACK OFF)
-       endif()
+  if(WITH_OPENAL)
+    message(WARNING "WITH_OPENAL requires WITH_AUDASPACE which is disabled")
+    set(WITH_OPENAL OFF)
+  endif()
+  if(WITH_JACK)
+    message(WARNING "WITH_JACK requires WITH_AUDASPACE which is disabled")
+    set(WITH_JACK OFF)
+  endif()
 endif()
 
 if(NOT WITH_SDL AND WITH_GHOST_SDL)
-       message(FATAL_ERROR "WITH_GHOST_SDL requires WITH_SDL")
+  message(FATAL_ERROR "WITH_GHOST_SDL requires WITH_SDL")
 endif()
 
 # python module, needs some different options
 if(WITH_PYTHON_MODULE AND WITH_PYTHON_INSTALL)
-       message(FATAL_ERROR "WITH_PYTHON_MODULE requires WITH_PYTHON_INSTALL to be OFF")
+  message(FATAL_ERROR "WITH_PYTHON_MODULE requires WITH_PYTHON_INSTALL to be OFF")
 endif()
 
 
 # may as well build python module without a UI
 if(WITH_PYTHON_MODULE)
-       set(WITH_HEADLESS ON)
+  set(WITH_HEADLESS ON)
 endif()
 
 if(NOT WITH_PYTHON)
-       set(WITH_CYCLES OFF)
-       set(WITH_DRACO OFF)
+  set(WITH_CYCLES OFF)
+  set(WITH_DRACO OFF)
 endif()
 
 if(WITH_DRACO AND NOT WITH_PYTHON_INSTALL)
-       message(STATUS "WITH_DRACO requires WITH_PYTHON_INSTALL to be ON, disabling WITH_DRACO for now")
-       set(WITH_DRACO OFF)
+  message(STATUS "WITH_DRACO requires WITH_PYTHON_INSTALL to be ON, disabling WITH_DRACO for now")
+  set(WITH_DRACO OFF)
 endif()
 
 # enable boost for cycles, audaspace or i18n
 # otherwise if the user disabled
 if(NOT WITH_BOOST)
-       # Explicitly disabled. so disable all deps.
-       macro(set_and_warn
-               _setting _val)
-               if(${${_setting}})
-                       message(STATUS "'WITH_BOOST' is disabled: forcing 'set(${_setting} ${_val})'")
-               endif()
-               set(${_setting} ${_val})
-       endmacro()
-
-       set_and_warn(WITH_CYCLES         OFF)
-       set_and_warn(WITH_INTERNATIONAL  OFF)
-       set_and_warn(WITH_OPENVDB        OFF)
-       set_and_warn(WITH_OPENCOLORIO    OFF)
+  # Explicitly disabled. so disable all deps.
+  macro(set_and_warn
+    _setting _val)
+    if(${${_setting}})
+      message(STATUS "'WITH_BOOST' is disabled: forcing 'set(${_setting} ${_val})'")
+    endif()
+    set(${_setting} ${_val})
+  endmacro()
+
+  set_and_warn(WITH_CYCLES         OFF)
+  set_and_warn(WITH_INTERNATIONAL  OFF)
+  set_and_warn(WITH_OPENVDB        OFF)
+  set_and_warn(WITH_OPENCOLORIO    OFF)
 elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
        WITH_OPENVDB OR WITH_OPENCOLORIO)
-       # Keep enabled
+  # Keep enabled
 else()
-       # Disable boost if not needed.
-       set(WITH_BOOST OFF)
+  # Disable boost if not needed.
+  set(WITH_BOOST OFF)
 endif()
 
 # auto enable openimageio for cycles
 if(WITH_CYCLES)
-       set(WITH_OPENIMAGEIO ON)
+  set(WITH_OPENIMAGEIO ON)
 
-       # auto enable llvm for cycles_osl
-       if(WITH_CYCLES_OSL)
-               set(WITH_LLVM ON CACHE BOOL "" FORCE)
-       endif()
+  # auto enable llvm for cycles_osl
+  if(WITH_CYCLES_OSL)
+    set(WITH_LLVM ON CACHE BOOL "" FORCE)
+  endif()
 else()
-       set(WITH_CYCLES_OSL OFF)
+  set(WITH_CYCLES_OSL OFF)
 endif()
 
 # auto enable openimageio linking dependencies
 if(WITH_OPENIMAGEIO)
-       set(WITH_IMAGE_OPENEXR ON)
-       set(WITH_IMAGE_TIFF ON)
+  set(WITH_IMAGE_OPENEXR ON)
+  set(WITH_IMAGE_TIFF ON)
 endif()
 
 # auto enable alembic linking dependencies
 if(WITH_ALEMBIC)
-       set(WITH_IMAGE_OPENEXR ON)
+  set(WITH_IMAGE_OPENEXR ON)
 endif()
 
 # don't store paths to libs for portable distribution
 if(WITH_INSTALL_PORTABLE)
-       set(CMAKE_SKIP_BUILD_RPATH TRUE)
+  set(CMAKE_SKIP_BUILD_RPATH TRUE)
 endif()
 
 if(WITH_GHOST_SDL OR WITH_HEADLESS)
-       set(WITH_X11           OFF)
-       set(WITH_X11_XINPUT    OFF)
-       set(WITH_X11_XF86VMODE OFF)
-       set(WITH_X11_XFIXES    OFF)
-       set(WITH_X11_ALPHA     OFF)
-       set(WITH_GHOST_XDND    OFF)
-       set(WITH_INPUT_IME     OFF)
+  set(WITH_X11           OFF)
+  set(WITH_X11_XINPUT    OFF)
+  set(WITH_X11_XF86VMODE OFF)
+  set(WITH_X11_XFIXES    OFF)
+  set(WITH_X11_ALPHA     OFF)
+  set(WITH_GHOST_XDND    OFF)
+  set(WITH_INPUT_IME     OFF)
 endif()
 
 if(WITH_CPU_SSE)
-       TEST_SSE_SUPPORT(COMPILER_SSE_FLAG COMPILER_SSE2_FLAG)
+  TEST_SSE_SUPPORT(COMPILER_SSE_FLAG COMPILER_SSE2_FLAG)
 else()
-       message(STATUS "SSE and SSE2 optimizations are DISABLED!")
-       set(COMPILER_SSE_FLAG)
-       set(COMPILER_SSE2_FLAG)
+  message(STATUS "SSE and SSE2 optimizations are DISABLED!")
+  set(COMPILER_SSE_FLAG)
+  set(COMPILER_SSE2_FLAG)
 endif()
 
 if(WITH_BUILDINFO)
-       find_package(Git)
-       if(NOT GIT_FOUND)
-               message(WARNING "Git was not found, disabling WITH_BUILDINFO")
-               set(WITH_BUILDINFO OFF)
-       endif()
+  find_package(Git)
+  if(NOT GIT_FOUND)
+    message(WARNING "Git was not found, disabling WITH_BUILDINFO")
+    set(WITH_BUILDINFO OFF)
+  endif()
 endif()
 
 if(WITH_AUDASPACE)
-       if(NOT WITH_SYSTEM_AUDASPACE)
-               set(AUDASPACE_C_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/audaspace/bindings/C" "${CMAKE_BINARY_DIR}/extern/audaspace")
-               set(AUDASPACE_PY_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/audaspace/bindings")
-       endif()
+  if(NOT WITH_SYSTEM_AUDASPACE)
+    set(AUDASPACE_C_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/audaspace/bindings/C" "${CMAKE_BINARY_DIR}/extern/audaspace")
+    set(AUDASPACE_PY_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/audaspace/bindings")
+  endif()
 endif()
 
 # Auto-enable CUDA dynload if toolkit is not found.
 if(NOT WITH_CUDA_DYNLOAD)
-       find_package(CUDA)
-       if (NOT CUDA_FOUND)
-               message("CUDA toolkit not found, using dynamic runtime loading of libraries instead")
-               set(WITH_CUDA_DYNLOAD ON)
-       endif()
+  find_package(CUDA)
+  if (NOT CUDA_FOUND)
+    message("CUDA toolkit not found, using dynamic runtime loading of libraries instead")
+    set(WITH_CUDA_DYNLOAD ON)
+  endif()
 endif()
 
 #-----------------------------------------------------------------------------
@@ -747,35 +747,35 @@ endif()
 #       since uninitialized git submodules will give blank dirs
 
 if(WITH_INTERNATIONAL)
-       if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/datafiles/locale/languages")
-               message(WARNING
-                       "Translation path '${CMAKE_SOURCE_DIR}/release/datafiles/locale' is missing, "
-                       "This is a 'git submodule', which are known not to work with bridges to other version "
-                       "control systems, disabling 'WITH_INTERNATIONAL'."
-               )
-               set(WITH_INTERNATIONAL OFF)
-       endif()
+  if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/datafiles/locale/languages")
+    message(WARNING
+      "Translation path '${CMAKE_SOURCE_DIR}/release/datafiles/locale' is missing, "
+      "This is a 'git submodule', which are known not to work with bridges to other version "
+      "control systems, disabling 'WITH_INTERNATIONAL'."
+    )
+    set(WITH_INTERNATIONAL OFF)
+  endif()
 endif()
 
 if(WITH_PYTHON)
-       # While we have this as an '#error' in 'bpy_capi_utils.h',
-       # upgrading Python tends to cause confusion for users who build.
-       # Give the error message early to make this more obvious.
-       #
-       # Do this before main 'platform_*' checks,
-       # because UNIX will search for the old Python paths which may not exist.
-       # giving errors about missing paths before this case is met.
-       if(DEFINED PYTHON_VERSION AND "${PYTHON_VERSION}" VERSION_LESS "3.7")
-               message(FATAL_ERROR "At least Python 3.7 is required to build")
-       endif()
-
-       if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/scripts/addons/modules")
-               message(WARNING
-                       "Addons path '${CMAKE_SOURCE_DIR}/release/scripts/addons' is missing, "
-                       "This is a 'git submodule', which are known not to work with bridges to other version "
-                       "control systems: * CONTINUING WITHOUT ADDONS *"
-               )
-       endif()
+  # While we have this as an '#error' in 'bpy_capi_utils.h',
+  # upgrading Python tends to cause confusion for users who build.
+  # Give the error message early to make this more obvious.
+  #
+  # Do this before main 'platform_*' checks,
+  # because UNIX will search for the old Python paths which may not exist.
+  # giving errors about missing paths before this case is met.
+  if(DEFINED PYTHON_VERSION AND "${PYTHON_VERSION}" VERSION_LESS "3.7")
+    message(FATAL_ERROR "At least Python 3.7 is required to build")
+  endif()
+
+  if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/scripts/addons/modules")
+    message(WARNING
+      "Addons path '${CMAKE_SOURCE_DIR}/release/scripts/addons' is missing, "
+      "This is a 'git submodule', which are known not to work with bridges to other version "
+      "control systems: * CONTINUING WITHOUT ADDONS *"
+    )
+  endif()
 endif()
 
 #-----------------------------------------------------------------------------
@@ -809,68 +809,68 @@ set(PLATFORM_LINKFLAGS "")
 set(PLATFORM_LINKFLAGS_DEBUG "")
 
 if (NOT CMAKE_BUILD_TYPE MATCHES "Release")
-       if(WITH_COMPILER_ASAN)
-               set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${COMPILER_ASAN_CFLAGS}")
-               set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${COMPILER_ASAN_CFLAGS}")
+  if(WITH_COMPILER_ASAN)
+    set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${COMPILER_ASAN_CFLAGS}")
+    set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${COMPILER_ASAN_CFLAGS}")
 
-               set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMPILER_ASAN_CXXFLAGS}")
-               set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMPILER_ASAN_CXXFLAGS}")
-               if(MSVC)
-                       set(COMPILER_ASAN_LINKER_FLAGS "/FUNCTIONPADMIN:6")
-               endif()
-               set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS};${COMPILER_ASAN_LIBRARY}")
-               set(PLATFORM_LINKFLAGS "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}")
-               set(PLATFORM_LINKFLAGS_DEBUG "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}")
-       endif()
+    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMPILER_ASAN_CXXFLAGS}")
+    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMPILER_ASAN_CXXFLAGS}")
+    if(MSVC)
+      set(COMPILER_ASAN_LINKER_FLAGS "/FUNCTIONPADMIN:6")
+    endif()
+    set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS};${COMPILER_ASAN_LIBRARY}")
+    set(PLATFORM_LINKFLAGS "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}")
+    set(PLATFORM_LINKFLAGS_DEBUG "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}")
+  endif()
 endif()
 
 #-----------------------------------------------------------------------------
 #Platform specifics
 
 if(WITH_X11)
-       find_package(X11 REQUIRED)
-
-       find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
-       mark_as_advanced(X11_XF86keysym_INCLUDE_PATH)
-
-       list(APPEND PLATFORM_LINKLIBS ${X11_X11_LIB})
-
-       if(WITH_X11_XINPUT)
-               if(X11_Xinput_LIB)
-                       list(APPEND PLATFORM_LINKLIBS ${X11_Xinput_LIB})
-               else()
-                       set(WITH_X11_XINPUT OFF)
-               endif()
-       endif()
-
-       if(WITH_X11_XF86VMODE)
-               # XXX, why doesn't cmake make this available?
-               find_library(X11_Xxf86vmode_LIB Xxf86vm   ${X11_LIB_SEARCH_PATH})
-               mark_as_advanced(X11_Xxf86vmode_LIB)
-               if(X11_Xxf86vmode_LIB)
-                       list(APPEND PLATFORM_LINKLIBS ${X11_Xxf86vmode_LIB})
-               else()
-                       set(WITH_X11_XF86VMODE OFF)
-               endif()
-       endif()
-
-       if(WITH_X11_XFIXES)
-               if(X11_Xfixes_LIB)
-                       list(APPEND PLATFORM_LINKLIBS ${X11_Xfixes_LIB})
-               else()
-                       set(WITH_X11_XFIXES OFF)
-               endif()
-       endif()
-
-       if(WITH_X11_ALPHA)
-               find_library(X11_Xrender_LIB Xrender  ${X11_LIB_SEARCH_PATH})
-               mark_as_advanced(X11_Xrender_LIB)
-               if(X11_Xrender_LIB)
-                       list(APPEND PLATFORM_LINKLIBS ${X11_Xrender_LIB})
-               else()
-                       set(WITH_X11_ALPHA OFF)
-               endif()
-       endif()
+  find_package(X11 REQUIRED)
+
+  find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
+  mark_as_advanced(X11_XF86keysym_INCLUDE_PATH)
+
+  list(APPEND PLATFORM_LINKLIBS ${X11_X11_LIB})
+
+  if(WITH_X11_XINPUT)
+    if(X11_Xinput_LIB)
+      list(APPEND PLATFORM_LINKLIBS ${X11_Xinput_LIB})
+    else()
+      set(WITH_X11_XINPUT OFF)
+    endif()
+  endif()
+
+  if(WITH_X11_XF86VMODE)
+    # XXX, why doesn't cmake make this available?
+    find_library(X11_Xxf86vmode_LIB Xxf86vm   ${X11_LIB_SEARCH_PATH})
+    mark_as_advanced(X11_Xxf86vmode_LIB)
+    if(X11_Xxf86vmode_LIB)
+      list(APPEND PLATFORM_LINKLIBS ${X11_Xxf86vmode_LIB})
+    else()
+      set(WITH_X11_XF86VMODE OFF)
+    endif()
+  endif()
+
+  if(WITH_X11_XFIXES)
+    if(X11_Xfixes_LIB)
+      list(APPEND PLATFORM_LINKLIBS ${X11_Xfixes_LIB})
+    else()
+      set(WITH_X11_XFIXES OFF)
+    endif()
+  endif()
+
+  if(WITH_X11_ALPHA)
+    find_library(X11_Xrender_LIB Xrender  ${X11_LIB_SEARCH_PATH})
+    mark_as_advanced(X11_Xrender_LIB)
+    if(X11_Xrender_LIB)
+      list(APPEND PLATFORM_LINKLIBS ${X11_Xrender_LIB})
+    else()
+      set(WITH_X11_ALPHA OFF)
+    endif()
+  endif()
 
 endif()
 
@@ -883,51 +883,51 @@ endif()
 # - APPLE
 
 if(UNIX AND NOT APPLE)
-       include(platform_unix)
+  include(platform_unix)
 elseif(WIN32)
-       include(platform_win32)
+  include(platform_win32)
 elseif(APPLE)
-       include(platform_apple)
+  include(platform_apple)
 endif()
 
 #-----------------------------------------------------------------------------
 # Common.
 
 if(NOT WITH_FFTW3 AND WITH_MOD_OCEANSIM)
-       message(FATAL_ERROR "WITH_MOD_OCEANSIM requires WITH_FFTW3 to be ON")
+  message(FATAL_ERROR "WITH_MOD_OCEANSIM requires WITH_FFTW3 to be ON")
 endif()
 
 if(WITH_CYCLES)
-       if(NOT WITH_OPENIMAGEIO)
-               message(FATAL_ERROR
-                       "Cycles requires WITH_OPENIMAGEIO, the library may not have been found. "
-                       "Configure OIIO or disable WITH_CYCLES"
-               )
-       endif()
-       if(NOT WITH_BOOST)
-               message(FATAL_ERROR
-                       "Cycles requires WITH_BOOST, the library may not have been found. "
-                       "Configure BOOST or disable WITH_CYCLES"
-               )
-       endif()
-
-       if(WITH_CYCLES_OSL)
-               if(NOT WITH_LLVM)
-                       message(FATAL_ERROR
-                               "Cycles OSL requires WITH_LLVM, the library may not have been found. "
-                               "Configure LLVM or disable WITH_CYCLES_OSL"
-                       )
-               endif()
-       endif()
+  if(NOT WITH_OPENIMAGEIO)
+    message(FATAL_ERROR
+      "Cycles requires WITH_OPENIMAGEIO, the library may not have been found. "
+      "Configure OIIO or disable WITH_CYCLES"
+    )
+  endif()
+  if(NOT WITH_BOOST)
+    message(FATAL_ERROR
+      "Cycles requires WITH_BOOST, the library may not have been found. "
+      "Configure BOOST or disable WITH_CYCLES"
+    )
+  endif()
+
+  if(WITH_CYCLES_OSL)
+    if(NOT WITH_LLVM)
+      message(FATAL_ERROR
+        "Cycles OSL requires WITH_LLVM, the library may not have been found. "
+        "Configure LLVM or disable WITH_CYCLES_OSL"
+      )
+    endif()
+  endif()
 endif()
 
 if(WITH_INTERNATIONAL)
-       if(NOT WITH_BOOST)
-               message(FATAL_ERROR
-                       "Internationalization requires WITH_BOOST, the library may not have been found. "
-                       "Configure BOOST or disable WITH_INTERNATIONAL"
-               )
-       endif()
+  if(NOT WITH_BOOST)
+    message(FATAL_ERROR
+      "Internationalization requires WITH_BOOST, the library may not have been found. "
+      "Configure BOOST or disable WITH_INTERNATIONAL"
+    )
+  endif()
 endif()
 
 # See TEST_SSE_SUPPORT() for how this is defined.
@@ -935,53 +935,53 @@ endif()
 # Do it globally, SSE2 is required for quite some time now.
 # Doing it now allows to use SSE/SSE2 in inline headers.
 if(SUPPORT_SSE_BUILD)
-       set(PLATFORM_CFLAGS " ${COMPILER_SSE_FLAG} ${PLATFORM_CFLAGS}")
-       add_definitions(-D__SSE__ -D__MMX__)
+  set(PLATFORM_CFLAGS " ${COMPILER_SSE_FLAG} ${PLATFORM_CFLAGS}")
+  add_definitions(-D__SSE__ -D__MMX__)
 endif()
 if(SUPPORT_SSE2_BUILD)
-       set(PLATFORM_CFLAGS " ${PLATFORM_CFLAGS} ${COMPILER_SSE2_FLAG}")
-       add_definitions(-D__SSE2__)
-       if(NOT SUPPORT_SSE_BUILD) # don't double up
-               add_definitions(-D__MMX__)
-       endif()
+  set(PLATFORM_CFLAGS " ${PLATFORM_CFLAGS} ${COMPILER_SSE2_FLAG}")
+  add_definitions(-D__SSE2__)
+  if(NOT SUPPORT_SSE_BUILD) # don't double up
+    add_definitions(-D__MMX__)
+  endif()
 endif()
 
 
 # set the endian define
 if(MSVC)
-       # for some reason this fails on msvc
-       add_definitions(-D__LITTLE_ENDIAN__)
+  # for some reason this fails on msvc
+  add_definitions(-D__LITTLE_ENDIAN__)
 
 # OSX-Note: as we do cross-compiling with specific set architecture,
 # endianess-detection and auto-setting is counterproductive
 # so we just set endianness according CMAKE_OSX_ARCHITECTURES
 
 elseif(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64)
-       add_definitions(-D__LITTLE_ENDIAN__)
+  add_definitions(-D__LITTLE_ENDIAN__)
 elseif(CMAKE_OSX_ARCHITECTURES MATCHES ppc OR CMAKE_OSX_ARCHITECTURES MATCHES ppc64)
-       add_definitions(-D__BIG_ENDIAN__)
+  add_definitions(-D__BIG_ENDIAN__)
 
 else()
-       include(TestBigEndian)
-       test_big_endian(_SYSTEM_BIG_ENDIAN)
-       if(_SYSTEM_BIG_ENDIAN)
-               add_definitions(-D__BIG_ENDIAN__)
-       else()
-               add_definitions(-D__LITTLE_ENDIAN__)
-       endif()
-       unset(_SYSTEM_BIG_ENDIAN)
+  include(TestBigEndian)
+  test_big_endian(_SYSTEM_BIG_ENDIAN)
+  if(_SYSTEM_BIG_ENDIAN)
+    add_definitions(-D__BIG_ENDIAN__)
+  else()
+    add_definitions(-D__LITTLE_ENDIAN__)
+  endif()
+  unset(_SYSTEM_BIG_ENDIAN)
 endif()
 if(WITH_IMAGE_OPENJPEG)
-       # Special handling of Windows platform where openjpeg is always static.
-       if(WIN32)
-               set(OPENJPEG_DEFINES "-DOPJ_STATIC")
-       else()
-               set(OPENJPEG_DEFINES "")
-       endif()
+  # Special handling of Windows platform where openjpeg is always static.
+  if(WIN32)
+    set(OPENJPEG_DEFINES "-DOPJ_STATIC")
+  else()
+    set(OPENJPEG_DEFINES "")
+  endif()
 endif()
 
 if(NOT WITH_SYSTEM_EIGEN3)
-       set(EIGEN3_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/Eigen3)
+  set(EIGEN3_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/Eigen3)
 endif()
 
 #-----------------------------------------------------------------------------
@@ -991,224 +991,224 @@ find_package(OpenGL)
 blender_include_dirs_sys("${OPENGL_INCLUDE_DIR}")
 
 if(WITH_OPENGL)
-       add_definitions(-DWITH_OPENGL)
+  add_definitions(-DWITH_OPENGL)
 endif()
 
 if(WITH_SYSTEM_GLES)
-       find_package_wrapper(OpenGLES)
+  find_package_wrapper(OpenGLES)
 endif()
 
 if(WITH_GL_PROFILE_ES20)
-       if(WITH_SYSTEM_GLES)
-               if(NOT OPENGLES_LIBRARY)
-                       message(FATAL_ERROR
-                               "Unable to find OpenGL ES libraries. "
-                               "Install them or disable WITH_SYSTEM_GLES."
-                       )
-               endif()
+  if(WITH_SYSTEM_GLES)
+    if(NOT OPENGLES_LIBRARY)
+      message(FATAL_ERROR
+        "Unable to find OpenGL ES libraries. "
+        "Install them or disable WITH_SYSTEM_GLES."
+      )
+    endif()
 
-               list(APPEND BLENDER_GL_LIBRARIES OPENGLES_LIBRARY)
+    list(APPEND BLENDER_GL_LIBRARIES OPENGLES_LIBRARY)
 
-       else()
-               set(OPENGLES_LIBRARY "" CACHE FILEPATH "OpenGL ES 2.0 library file")
-               mark_as_advanced(OPENGLES_LIBRARY)
+  else()
+    set(OPENGLES_LIBRARY "" CACHE FILEPATH "OpenGL ES 2.0 library file")
+    mark_as_advanced(OPENGLES_LIBRARY)
 
-               list(APPEND BLENDER_GL_LIBRARIES "${OPENGLES_LIBRARY}")
+    list(APPEND BLENDER_GL_LIBRARIES "${OPENGLES_LIBRARY}")
 
-               if(NOT OPENGLES_LIBRARY)
-                       message(FATAL_ERROR
-                               "To compile WITH_GL_EGL you need to set OPENGLES_LIBRARY "
-                               "to the file path of an OpenGL ES 2.0 library."
-                       )
-               endif()
+    if(NOT OPENGLES_LIBRARY)
+      message(FATAL_ERROR
+        "To compile WITH_GL_EGL you need to set OPENGLES_LIBRARY "
+        "to the file path of an OpenGL ES 2.0 library."
+      )
+    endif()
 
-       endif()
+  endif()
 
-       if(WIN32)
-               # Setup paths to files needed to install and redistribute Windows Blender with OpenGL ES
+  if(WIN32)
+    # Setup paths to files needed to install and redistribute Windows Blender with OpenGL ES
 
-               set(OPENGLES_DLL "" CACHE FILEPATH "OpenGL ES 2.0 redistributable DLL file")
-               mark_as_advanced(OPENGLES_DLL)
+    set(OPENGLES_DLL "" CACHE FILEPATH "OpenGL ES 2.0 redistributable DLL file")
+    mark_as_advanced(OPENGLES_DLL)
 
-               if(NOT OPENGLES_DLL)
-                       message(FATAL_ERROR
-                               "To compile WITH_GL_PROFILE_ES20 you need to set OPENGLES_DLL to the file "
-                               "path of an OpenGL ES 2.0 runtime dynamic link library (DLL)."
-                       )
-               endif()
+    if(NOT OPENGLES_DLL)
+      message(FATAL_ERROR
+        "To compile WITH_GL_PROFILE_ES20 you need to set OPENGLES_DLL to the file "
+        "path of an OpenGL ES 2.0 runtime dynamic link library (DLL)."
+      )
+    endif()
 
-               if(WITH_GL_ANGLE)
-                       list(APPEND GL_DEFINITIONS -DWITH_ANGLE)
+    if(WITH_GL_ANGLE)
+      list(APPEND GL_DEFINITIONS -DWITH_ANGLE)
 
-                       set(D3DCOMPILER_DLL "" CACHE FILEPATH "Direct3D Compiler redistributable DLL file (needed by ANGLE)")
+      set(D3DCOMPILER_DLL "" CACHE FILEPATH "Direct3D Compiler redistributable DLL file (needed by ANGLE)")
 
-                       get_filename_component(D3DCOMPILER_FILENAME "${D3DCOMPILER_DLL}" NAME)
-                       list(APPEND GL_DEFINITIONS "-DD3DCOMPILER=\"\\\"${D3DCOMPILER_FILENAME}\\\"\"")
+      get_filename_component(D3DCOMPILER_FILENAME "${D3DCOMPILER_DLL}" NAME)
+      list(APPEND GL_DEFINITIONS "-DD3DCOMPILER=\"\\\"${D3DCOMPILER_FILENAME}\\\"\"")
 
-                       mark_as_advanced(D3DCOMPILER_DLL)
+      mark_as_advanced(D3DCOMPILER_DLL)
 
-                       if(D3DCOMPILER_DLL STREQUAL "")
-                               message(FATAL_ERROR
-                                       "To compile WITH_GL_ANGLE you need to set D3DCOMPILER_DLL to the file "
-                                       "path of a copy of the DirectX redistributable DLL file: D3DCompiler_46.dll"
-                               )
-                       endif()
+      if(D3DCOMPILER_DLL STREQUAL "")
+        message(FATAL_ERROR
+          "To compile WITH_GL_ANGLE you need to set D3DCOMPILER_DLL to the file "
+          "path of a copy of the DirectX redistributable DLL file: D3DCompiler_46.dll"
+        )
+      endif()
 
-               endif()
+    endif()
 
-       endif()
+  endif()
 
 else()
-       if(OpenGL_GL_PREFERENCE STREQUAL "LEGACY" AND OPENGL_gl_LIBRARY)
-               list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_gl_LIBRARY})
-       else()
-               list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_opengl_LIBRARY} ${OPENGL_glx_LIBRARY})
-       endif()
+  if(OpenGL_GL_PREFERENCE STREQUAL "LEGACY" AND OPENGL_gl_LIBRARY)
+    list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_gl_LIBRARY})
+  else()
+    list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_opengl_LIBRARY} ${OPENGL_glx_LIBRARY})
+  endif()
 endif()
 
 if(WITH_GL_EGL)
-       list(APPEND GL_DEFINITIONS -DWITH_GL_EGL)
+  list(APPEND GL_DEFINITIONS -DWITH_GL_EGL)
 
-       if(WITH_SYSTEM_GLES)
-               if(NOT OPENGLES_EGL_LIBRARY)
-                       message(FATAL_ERROR
-                               "Unable to find OpenGL ES libraries. "
-                               "Install them or disable WITH_SYSTEM_GLES."
-                       )
-               endif()
+  if(WITH_SYSTEM_GLES)
+    if(NOT OPENGLES_EGL_LIBRARY)
+      message(FATAL_ERROR
+        "Unable to find OpenGL ES libraries. "
+        "Install them or disable WITH_SYSTEM_GLES."
+      )
+    endif()
 
-               list(APPEND BLENDER_GL_LIBRARIES OPENGLES_EGL_LIBRARY)
+    list(APPEND BLENDER_GL_LIBRARIES OPENGLES_EGL_LIBRARY)
 
-       else()
-               set(OPENGLES_EGL_LIBRARY "" CACHE FILEPATH "EGL library file")
-               mark_as_advanced(OPENGLES_EGL_LIBRARY)
+  else()
+    set(OPENGLES_EGL_LIBRARY "" CACHE FILEPATH "EGL library file")
+    mark_as_advanced(OPENGLES_EGL_LIBRARY)
 
-               list(APPEND BLENDER_GL_LIBRARIES "${OPENGLES_LIBRARY}" "${OPENGLES_EGL_LIBRARY}")
+    list(APPEND BLENDER_GL_LIBRARIES "${OPENGLES_LIBRARY}" "${OPENGLES_EGL_LIBRARY}")
 
-               if(NOT OPENGLES_EGL_LIBRARY)
-                       message(FATAL_ERROR
-                               "To compile WITH_GL_EGL you need to set OPENGLES_EGL_LIBRARY "
-                               "to the file path of an EGL library."
-                       )
-               endif()
+    if(NOT OPENGLES_EGL_LIBRARY)
+      message(FATAL_ERROR
+        "To compile WITH_GL_EGL you need to set OPENGLES_EGL_LIBRARY "
+        "to the file path of an EGL library."
+      )
+    endif()
 
-       endif()
+  endif()
 
-       if(WIN32)
-               # Setup paths to files needed to install and redistribute Windows Blender with OpenGL ES
+  if(WIN32)
+    # Setup paths to files needed to install and redistribute Windows Blender with OpenGL ES
 
-               set(OPENGLES_EGL_DLL "" CACHE FILEPATH "EGL redistributable DLL file")
-               mark_as_advanced(OPENGLES_EGL_DLL)
+    set(OPENGLES_EGL_DLL "" CACHE FILEPATH "EGL redistributable DLL file")
+    mark_as_advanced(OPENGLES_EGL_DLL)
 
-               if(NOT OPENGLES_EGL_DLL)
-                       message(FATAL_ERROR
-                               "To compile WITH_GL_EGL you need to set OPENGLES_EGL_DLL "
-                               "to the file path of an EGL runtime dynamic link library (DLL)."
-                       )
-               endif()
+    if(NOT OPENGLES_EGL_DLL)
+      message(FATAL_ERROR
+        "To compile WITH_GL_EGL you need to set OPENGLES_EGL_DLL "
+        "to the file path of an EGL runtime dynamic link library (DLL)."
+      )
+    endif()
 
-       endif()
+  endif()
 
 endif()
 
 if(WITH_GL_PROFILE_ES20)
-       list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_ES20)
+  list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_ES20)
 else()
-       list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_CORE)
+  list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_CORE)
 endif()
 
 if(WITH_GL_EGL)
-       list(APPEND GL_DEFINITIONS -DWITH_EGL)
+  list(APPEND GL_DEFINITIONS -DWITH_EGL)
 endif()
 
 #-----------------------------------------------------------------------------
 # Configure OpenMP.
 if(WITH_OPENMP)
-       if(NOT OPENMP_CUSTOM)
-               find_package(OpenMP)
-       endif()
-
-       if(OPENMP_FOUND)
-               if(NOT WITH_OPENMP_STATIC)
-                       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
-                       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
-               else()
-                       # Typically avoid adding flags as defines but we can't
-                       # pass OpenMP flags to the linker for static builds, meaning
-                       # we can't add any OpenMP related flags to CFLAGS variables
-                       # since they're passed to the linker as well.
-                       add_definitions("${OpenMP_C_FLAGS}")
-
-                       find_library_static(OpenMP_LIBRARIES gomp ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
-               endif()
-       else()
-               set(WITH_OPENMP OFF)
-       endif()
-
-       mark_as_advanced(
-               OpenMP_C_FLAGS
-               OpenMP_CXX_FLAGS
-       )
+  if(NOT OPENMP_CUSTOM)
+    find_package(OpenMP)
+  endif()
+
+  if(OPENMP_FOUND)
+    if(NOT WITH_OPENMP_STATIC)
+      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+    else()
+      # Typically avoid adding flags as defines but we can't
+      # pass OpenMP flags to the linker for static builds, meaning
+      # we can't add any OpenMP related flags to CFLAGS variables
+      # since they're passed to the linker as well.
+      add_definitions("${OpenMP_C_FLAGS}")
+
+      find_library_static(OpenMP_LIBRARIES gomp ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
+    endif()
+  else()
+    set(WITH_OPENMP OFF)
+  endif()
+
+  mark_as_advanced(
+    OpenMP_C_FLAGS
+    OpenMP_CXX_FLAGS
+  )
 endif()
 
 #-----------------------------------------------------------------------------
 # Configure GLEW
 
 if(WITH_SYSTEM_GLEW)
-       find_package(GLEW)
+  find_package(GLEW)
 
-       # Note: There is an assumption here that the system GLEW is not a static library.
+  # Note: There is an assumption here that the system GLEW is not a static library.
 
-       if(NOT GLEW_FOUND)
-               message(FATAL_ERROR "GLEW is required to build Blender. Install it or disable WITH_SYSTEM_GLEW.")
-       endif()
+  if(NOT GLEW_FOUND)
+    message(FATAL_ERROR "GLEW is required to build Blender. Install it or disable WITH_SYSTEM_GLEW.")
+  endif()
 
-       set(BLENDER_GLEW_LIBRARIES ${GLEW_LIBRARY})
+  set(BLENDER_GLEW_LIBRARIES ${GLEW_LIBRARY})
 else()
-       if(WITH_GLEW_ES)
-               set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew-es/include")
+  if(WITH_GLEW_ES)
+    set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew-es/include")
 
-               list(APPEND GL_DEFINITIONS -DGLEW_STATIC -DWITH_GLEW_ES)
+    list(APPEND GL_DEFINITIONS -DGLEW_STATIC -DWITH_GLEW_ES)
 
-               # These definitions remove APIs from glew.h, making GLEW smaller, and catching unguarded API usage
-               if(WITH_GL_PROFILE_ES20)
-                       list(APPEND GL_DEFINITIONS -DGLEW_ES_ONLY)
-               else()
-                       # No ES functions are needed
-                       list(APPEND GL_DEFINITIONS -DGLEW_NO_ES)
-               endif()
+    # These definitions remove APIs from glew.h, making GLEW smaller, and catching unguarded API usage
+    if(WITH_GL_PROFILE_ES20)
+      list(APPEND GL_DEFINITIONS -DGLEW_ES_ONLY)
+    else()
+      # No ES functions are needed
+      list(APPEND GL_DEFINITIONS -DGLEW_NO_ES)
+    endif()
 
-               if(WITH_GL_PROFILE_ES20)
-                       if(WITH_GL_EGL)
-                               list(APPEND GL_DEFINITIONS -DGLEW_USE_LIB_ES20)
-                       endif()
+    if(WITH_GL_PROFILE_ES20)
+      if(WITH_GL_EGL)
+        list(APPEND GL_DEFINITIONS -DGLEW_USE_LIB_ES20)
+      endif()
 
-                       # ToDo: This is an experiment to eliminate ES 1 symbols,
-                       # GLEW doesn't really properly provide this level of control
-                       # (for example, without modification it eliminates too many symbols)
-                       # so there are lots of modifications to GLEW to make this work,
-                       # and no attempt to make it work beyond Blender at this point.
-                       list(APPEND GL_DEFINITIONS -DGL_ES_VERSION_1_0=0 -DGL_ES_VERSION_CL_1_1=0 -DGL_ES_VERSION_CM_1_1=0)
-               endif()
+      # ToDo: This is an experiment to eliminate ES 1 symbols,
+      # GLEW doesn't really properly provide this level of control
+      # (for example, without modification it eliminates too many symbols)
+      # so there are lots of modifications to GLEW to make this work,
+      # and no attempt to make it work beyond Blender at this point.
+      list(APPEND GL_DEFINITIONS -DGL_ES_VERSION_1_0=0 -DGL_ES_VERSION_CL_1_1=0 -DGL_ES_VERSION_CM_1_1=0)
+    endif()
 
-               if(WITH_GL_EGL)
-                       list(APPEND GL_DEFINITIONS -DGLEW_INC_EGL)
-               endif()
+    if(WITH_GL_EGL)
+      list(APPEND GL_DEFINITIONS -DGLEW_INC_EGL)
+    endif()
 
-               set(BLENDER_GLEW_LIBRARIES extern_glew_es bf_intern_glew_mx)
+    set(BLENDER_GLEW_LIBRARIES extern_glew_es bf_intern_glew_mx)
 
-       else()
-               set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew/include")
+  else()
+    set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew/include")
 
-               list(APPEND GL_DEFINITIONS -DGLEW_STATIC)
+    list(APPEND GL_DEFINITIONS -DGLEW_STATIC)
 
-               # This won't affect the non-experimental glew library,
-               # but is used for conditional compilation elsewhere.
-               list(APPEND GL_DEFINITIONS -DGLEW_NO_ES)
+    # This won't affect the non-experimental glew library,
+    # but is used for conditional compilation elsewhere.
+    list(APPEND GL_DEFINITIONS -DGLEW_NO_ES)
 
-               set(BLENDER_GLEW_LIBRARIES extern_glew)
+    set(BLENDER_GLEW_LIBRARIES extern_glew)
 
-       endif()
+  endif()
 
 endif()
 
@@ -1218,70 +1218,70 @@ list(APPEND GL_DEFINITIONS -DGLEW_NO_GLU)
 # Configure Bullet
 
 if(WITH_BULLET AND WITH_SYSTEM_BULLET)
-       find_package(Bullet)
-       if(NOT BULLET_FOUND)
-               set(WITH_BULLET OFF)
-       endif()
+  find_package(Bullet)
+  if(NOT BULLET_FOUND)
+    set(WITH_BULLET OFF)
+  endif()
 else()
-       set(BULLET_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/bullet2/src")
-       # set(BULLET_LIBRARIES "")
+  set(BULLET_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/bullet2/src")
+  # set(BULLET_LIBRARIES "")
 endif()
 
 #-----------------------------------------------------------------------------
 # Configure Python.
 
 if(WITH_PYTHON_MODULE)
-       add_definitions(-DPy_ENABLE_SHARED)
+  add_definitions(-DPy_ENABLE_SHARED)
 endif()
 
 #-----------------------------------------------------------------------------
 # Configure GLog/GFlags
 
 if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
-       if(WITH_SYSTEM_GFLAGS)
-               find_package(Gflags)
-               if(NOT GFLAGS_FOUND)
-                       message(FATAL_ERROR "System wide Gflags is requested but was not found")
-               endif()
-               # FindGflags does not define this, and we are not even sure what to use here.
-               set(GFLAGS_DEFINES)
-       else()
-               set(GFLAGS_DEFINES
-                       -DGFLAGS_DLL_DEFINE_FLAG=
-                       -DGFLAGS_DLL_DECLARE_FLAG=
-                       -DGFLAGS_DLL_DECL=
-               )
-               set(GFLAGS_NAMESPACE "gflags")
-               set(GFLAGS_LIBRARIES extern_gflags)
-               set(GFLAGS_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/extern/gflags/src")
-       endif()
-
-       if(WITH_SYSTEM_GLOG)
-               find_package(Glog)
-               if(NOT GLOG_FOUND)
-                       message(FATAL_ERROR "System wide Glog is requested but was not found")
-               endif()
-               # FindGlog does not define this, and we are not even sure what to use here.
-               set(GLOG_DEFINES)
-       else()
-               set(GLOG_DEFINES
-                       -DGOOGLE_GLOG_DLL_DECL=
-               )
-               set(GLOG_LIBRARIES extern_glog)
-               if(WIN32)
-                       set(GLOG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/glog/src/windows)
-               else()
-                       set(GLOG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/glog/include)
-               endif()
-       endif()
+  if(WITH_SYSTEM_GFLAGS)
+    find_package(Gflags)
+    if(NOT GFLAGS_FOUND)
+      message(FATAL_ERROR "System wide Gflags is requested but was not found")
+    endif()
+    # FindGflags does not define this, and we are not even sure what to use here.
+    set(GFLAGS_DEFINES)
+  else()
+    set(GFLAGS_DEFINES
+      -DGFLAGS_DLL_DEFINE_FLAG=
+      -DGFLAGS_DLL_DECLARE_FLAG=
+      -DGFLAGS_DLL_DECL=
+    )
+    set(GFLAGS_NAMESPACE "gflags")
+    set(GFLAGS_LIBRARIES extern_gflags)
+    set(GFLAGS_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/extern/gflags/src")
+  endif()
+
+  if(WITH_SYSTEM_GLOG)
+    find_package(Glog)
+    if(NOT GLOG_FOUND)
+      message(FATAL_ERROR "System wide Glog is requested but was not found")
+    endif()
+    # FindGlog does not define this, and we are not even sure what to use here.
+    set(GLOG_DEFINES)
+  else()
+    set(GLOG_DEFINES
+      -DGOOGLE_GLOG_DLL_DECL=
+    )
+    set(GLOG_LIBRARIES extern_glog)
+    if(WIN32)
+      set(GLOG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/glog/src/windows)
+    else()
+      set(GLOG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/glog/include)
+    endif()
+  endif()
 endif()
 
 #-----------------------------------------------------------------------------
 # Configure Ceres
 
 if(WITH_LIBMV)
-       # We always have C++11 which includes unordered_map.
-       set(CERES_DEFINES -DCERES_STD_UNORDERED_MAP)
+  # We always have C++11 which includes unordered_map.
+  set(CERES_DEFINES -DCERES_STD_UNORDERED_MAP)
 endif()
 
 #-----------------------------------------------------------------------------
@@ -1289,259 +1289,259 @@ endif()
 
 if(CMAKE_COMPILER_IS_GNUCC)
 
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_CAST_ALIGN -Wcast-align)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_RETURN_TYPE  -Werror=return-type)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_VLA -Werror=vla)
-       # system headers sometimes do this, disable for now, was: -Werror=strict-prototypes
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_STRICT_PROTOTYPES  -Wstrict-prototypes)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_MISSING_PROTOTYPES -Wmissing-prototypes)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_CHAR_SUBSCRIPTS -Wno-char-subscripts)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_POINTER_ARITH -Wpointer-arith)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNUSED_PARAMETER -Wunused-parameter)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_WRITE_STRINGS -Wwrite-strings)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_LOGICAL_OP -Wlogical-op)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNDEF -Wundef)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_INIT_SELF -Winit-self)  # needs -Wuninitialized
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_NULL -Wnonnull)  # C only
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_MISSING_INCLUDE_DIRS -Wmissing-include-dirs)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_TYPE_LIMITS -Wtype-limits)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_FORMAT_SIGN -Wformat-signedness)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_RESTRICT -Wrestrict)
-
-       # gcc 4.2 gives annoying warnings on every file with this
-       if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
-               ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNINITIALIZED -Wuninitialized)
-       endif()
-
-       # versions before gcc4.6 give many BLI_math warnings
-       if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.6")
-               ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_REDUNDANT_DECLS       -Wredundant-decls)
-               ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_REDUNDANT_DECLS -Wredundant-decls)
-       endif()
-
-       # versions before gcc4.8 include global name-space.
-       if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.8")
-               ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_SHADOW -Wshadow)
-       endif()
-
-       # disable because it gives warnings for printf() & friends.
-       # ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_DOUBLE_PROMOTION -Wdouble-promotion -Wno-error=double-promotion)
-
-       if(NOT APPLE)
-               ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE -Wno-error=unused-but-set-variable)
-       endif()
-
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ALL -Wall)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_INVALID_OFFSETOF -Wno-invalid-offsetof)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SIGN_COMPARE -Wno-sign-compare)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_LOGICAL_OP -Wlogical-op)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_INIT_SELF -Winit-self)  # needs -Wuninitialized
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_MISSING_INCLUDE_DIRS -Wmissing-include-dirs)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_TYPE_LIMITS -Wtype-limits)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ERROR_RETURN_TYPE  -Werror=return-type)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_CHAR_SUBSCRIPTS -Wno-char-subscripts)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_POINTER_ARITH -Wpointer-arith)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNUSED_PARAMETER -Wunused-parameter)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_WRITE_STRINGS -Wwrite-strings)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNDEF -Wundef)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_FORMAT_SIGN -Wformat-signedness)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_RESTRICT -Wrestrict)
-
-       # gcc 4.2 gives annoying warnings on every file with this
-       if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
-               ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNINITIALIZED -Wuninitialized)
-       endif()
-
-       # causes too many warnings
-       if(NOT APPLE)
-               ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNDEF -Wundef)
-               ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_MISSING_DECLARATIONS -Wmissing-declarations)
-       endif()
-
-       # Use 'ATTR_FALLTHROUGH' macro to suppress.
-       if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "7.0"))
-               ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_IMPLICIT_FALLTHROUGH -Wimplicit-fallthrough=5)
-               ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_IMPLICIT_FALLTHROUGH -Wimplicit-fallthrough=5)
-       endif()
-
-       # flags to undo strict flags
-       ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_DEPRECATED_DECLARATIONS -Wno-deprecated-declarations)
-       ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER        -Wno-unused-parameter)
-       ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_FUNCTION         -Wno-unused-function)
-       ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_TYPE_LIMITS             -Wno-type-limits)
-       ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INT_IN_BOOL_CONTEXT     -Wno-int-in-bool-context)
-       ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_FORMAT                  -Wno-format)
-       ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_SWITCH                  -Wno-switch)
-
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CLASS_MEMACCESS     -Wno-class-memaccess)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_COMMENT             -Wno-comment)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_TYPEDEFS     -Wno-unused-local-typedefs)
-
-       if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "7.0"))
-               ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_IMPLICIT_FALLTHROUGH    -Wno-implicit-fallthrough)
-       endif()
-
-       if(NOT APPLE)
-               ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE -Wno-error=unused-but-set-variable)
-       endif()
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_CAST_ALIGN -Wcast-align)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_RETURN_TYPE  -Werror=return-type)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_VLA -Werror=vla)
+  # system headers sometimes do this, disable for now, was: -Werror=strict-prototypes
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_STRICT_PROTOTYPES  -Wstrict-prototypes)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_MISSING_PROTOTYPES -Wmissing-prototypes)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_CHAR_SUBSCRIPTS -Wno-char-subscripts)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_POINTER_ARITH -Wpointer-arith)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNUSED_PARAMETER -Wunused-parameter)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_WRITE_STRINGS -Wwrite-strings)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_LOGICAL_OP -Wlogical-op)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNDEF -Wundef)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_INIT_SELF -Winit-self)  # needs -Wuninitialized
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_NULL -Wnonnull)  # C only
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_MISSING_INCLUDE_DIRS -Wmissing-include-dirs)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_TYPE_LIMITS -Wtype-limits)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_FORMAT_SIGN -Wformat-signedness)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_RESTRICT -Wrestrict)
+
+  # gcc 4.2 gives annoying warnings on every file with this
+  if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
+    ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNINITIALIZED -Wuninitialized)
+  endif()
+
+  # versions before gcc4.6 give many BLI_math warnings
+  if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.6")
+    ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_REDUNDANT_DECLS       -Wredundant-decls)
+    ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_REDUNDANT_DECLS -Wredundant-decls)
+  endif()
+
+  # versions before gcc4.8 include global name-space.
+  if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.8")
+    ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_SHADOW -Wshadow)
+  endif()
+
+  # disable because it gives warnings for printf() & friends.
+  # ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_DOUBLE_PROMOTION -Wdouble-promotion -Wno-error=double-promotion)
+
+  if(NOT APPLE)
+    ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE -Wno-error=unused-but-set-variable)
+  endif()
+
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ALL -Wall)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_INVALID_OFFSETOF -Wno-invalid-offsetof)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SIGN_COMPARE -Wno-sign-compare)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_LOGICAL_OP -Wlogical-op)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_INIT_SELF -Winit-self)  # needs -Wuninitialized
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_MISSING_INCLUDE_DIRS -Wmissing-include-dirs)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_TYPE_LIMITS -Wtype-limits)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ERROR_RETURN_TYPE  -Werror=return-type)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_CHAR_SUBSCRIPTS -Wno-char-subscripts)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_POINTER_ARITH -Wpointer-arith)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNUSED_PARAMETER -Wunused-parameter)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_WRITE_STRINGS -Wwrite-strings)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNDEF -Wundef)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_FORMAT_SIGN -Wformat-signedness)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_RESTRICT -Wrestrict)
+
+  # gcc 4.2 gives annoying warnings on every file with this
+  if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
+    ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNINITIALIZED -Wuninitialized)
+  endif()
+
+  # causes too many warnings
+  if(NOT APPLE)
+    ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNDEF -Wundef)
+    ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_MISSING_DECLARATIONS -Wmissing-declarations)
+  endif()
+
+  # Use 'ATTR_FALLTHROUGH' macro to suppress.
+  if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "7.0"))
+    ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_IMPLICIT_FALLTHROUGH -Wimplicit-fallthrough=5)
+    ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_IMPLICIT_FALLTHROUGH -Wimplicit-fallthrough=5)
+  endif()
+
+  # flags to undo strict flags
+  ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_DEPRECATED_DECLARATIONS -Wno-deprecated-declarations)
+  ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER        -Wno-unused-parameter)
+  ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_FUNCTION         -Wno-unused-function)
+  ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_TYPE_LIMITS             -Wno-type-limits)
+  ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INT_IN_BOOL_CONTEXT     -Wno-int-in-bool-context)
+  ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_FORMAT                  -Wno-format)
+  ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_SWITCH                  -Wno-switch)
+
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CLASS_MEMACCESS     -Wno-class-memaccess)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_COMMENT             -Wno-comment)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_TYPEDEFS     -Wno-unused-local-typedefs)
+
+  if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "7.0"))
+    ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_IMPLICIT_FALLTHROUGH    -Wno-implicit-fallthrough)
+  endif()
+
+  if(NOT APPLE)
+    ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE -Wno-error=unused-but-set-variable)
+  endif()
 
 elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
 
-       # strange, clang complains these are not supported, but then uses them.
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_RETURN_TYPE  -Werror=return-type)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_AUTOLOGICAL_COMPARE -Wno-tautological-compare)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_CHAR_SUBSCRIPTS -Wno-char-subscripts)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_STRICT_PROTOTYPES  -Wstrict-prototypes)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_MISSING_PROTOTYPES -Wmissing-prototypes)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNUSED_PARAMETER -Wunused-parameter)
-
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ALL -Wall)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_AUTOLOGICAL_COMPARE -Wno-tautological-compare)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_UNKNOWN_PRAGMAS     -Wno-unknown-pragmas)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_CHAR_SUBSCRIPTS     -Wno-char-subscripts)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_OVERLOADED_VIRTUAL  -Wno-overloaded-virtual)  # we get a lot of these, if its a problem a dev needs to look into it.
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SIGN_COMPARE        -Wno-sign-compare)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_INVALID_OFFSETOF    -Wno-invalid-offsetof)
-
-       # gives too many unfixable warnings
-       # ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNUSED_MACROS      -Wunused-macros)
-       # ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNUSED_MACROS          -Wunused-macros)
-
-       # flags to undo strict flags
-       ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
-       ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_MACROS    -Wno-unused-macros)
-
-       ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_VARIABLE_DECLARATIONS -Wno-missing-variable-declarations)
-       ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INCOMPAT_PTR_DISCARD_QUAL -Wno-incompatible-pointer-types-discards-qualifiers)
-       ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_FUNCTION -Wno-unused-function)
-       ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INT_TO_VOID_POINTER_CAST -Wno-int-to-void-pointer-cast)
-       ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_PROTOTYPES -Wno-missing-prototypes)
-       ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_DUPLICATE_ENUM -Wno-duplicate-enum)
-       ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNDEF -Wno-undef)
-       ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_NORETURN -Wno-missing-noreturn)
-
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_PRIVATE_FIELD -Wno-unused-private-field)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CXX11_NARROWING -Wno-c++11-narrowing)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_NON_VIRTUAL_DTOR -Wno-non-virtual-dtor)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_REORDER -Wno-reorder)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_COMMENT -Wno-comment)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_TYPEDEFS -Wno-unused-local-typedefs)
+  # strange, clang complains these are not supported, but then uses them.
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_RETURN_TYPE  -Werror=return-type)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_AUTOLOGICAL_COMPARE -Wno-tautological-compare)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_CHAR_SUBSCRIPTS -Wno-char-subscripts)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_STRICT_PROTOTYPES  -Wstrict-prototypes)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_MISSING_PROTOTYPES -Wmissing-prototypes)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNUSED_PARAMETER -Wunused-parameter)
+
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ALL -Wall)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_AUTOLOGICAL_COMPARE -Wno-tautological-compare)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_UNKNOWN_PRAGMAS     -Wno-unknown-pragmas)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_CHAR_SUBSCRIPTS     -Wno-char-subscripts)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_OVERLOADED_VIRTUAL  -Wno-overloaded-virtual)  # we get a lot of these, if its a problem a dev needs to look into it.
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SIGN_COMPARE        -Wno-sign-compare)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_INVALID_OFFSETOF    -Wno-invalid-offsetof)
+
+  # gives too many unfixable warnings
+  # ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNUSED_MACROS      -Wunused-macros)
+  # ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNUSED_MACROS          -Wunused-macros)
+
+  # flags to undo strict flags
+  ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
+  ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_MACROS    -Wno-unused-macros)
+
+  ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_VARIABLE_DECLARATIONS -Wno-missing-variable-declarations)
+  ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INCOMPAT_PTR_DISCARD_QUAL -Wno-incompatible-pointer-types-discards-qualifiers)
+  ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_FUNCTION -Wno-unused-function)
+  ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INT_TO_VOID_POINTER_CAST -Wno-int-to-void-pointer-cast)
+  ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_PROTOTYPES -Wno-missing-prototypes)
+  ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_DUPLICATE_ENUM -Wno-duplicate-enum)
+  ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNDEF -Wno-undef)
+  ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_NORETURN -Wno-missing-noreturn)
+
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_PRIVATE_FIELD -Wno-unused-private-field)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CXX11_NARROWING -Wno-c++11-narrowing)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_NON_VIRTUAL_DTOR -Wno-non-virtual-dtor)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_REORDER -Wno-reorder)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_COMMENT -Wno-comment)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_TYPEDEFS -Wno-unused-local-typedefs)
 
 elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
 
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_POINTER_ARITH -Wpointer-arith)
-       ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_POINTER_ARITH -Wpointer-arith)
+  ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
 
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ALL -Wall)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_INVALID_OFFSETOF -Wno-invalid-offsetof)
-       ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SIGN_COMPARE -Wno-sign-compare)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ALL -Wall)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_INVALID_OFFSETOF -Wno-invalid-offsetof)
+  ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SIGN_COMPARE -Wno-sign-compare)
 
-       # disable numbered, false positives
-       set(C_WARNINGS "${C_WARNINGS} -wd188,186,144,913,556,858,597,177,1292,167,279,592,94,2722,3199")
-       set(CXX_WARNINGS "${CXX_WARNINGS} -wd188,186,144,913,556,858,597,177,1292,167,279,592,94,2722,3199")
+  # disable numbered, false positives
+  set(C_WARNINGS "${C_WARNINGS} -wd188,186,144,913,556,858,597,177,1292,167,279,592,94,2722,3199")
+  set(CXX_WARNINGS "${CXX_WARNINGS} -wd188,186,144,913,556,858,597,177,1292,167,279,592,94,2722,3199")
 elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
-       # most msvc warnings are C & C++
-       set(_WARNINGS
-               # warning level:
-               "/W3"
-               "/w34062"  # switch statement contains 'default' but no 'case' labels
-               "/w34115"  # 'type' : named type definition in parentheses
-               "/w34189"  # local variable is initialized but not referenced
-               # disable:
-               "/wd4018"  # signed/unsigned mismatch
-               "/wd4146"  # unary minus operator applied to unsigned type, result still unsigned
-               "/wd4065"  # switch statement contains 'default' but no 'case' labels
-               "/wd4127"  # conditional expression is constant
-               "/wd4181"  # qualifier applied to reference type; ignored
-               "/wd4200"  # zero-sized array in struct/union
-               "/wd4244"  # conversion from 'type1' to 'type2', possible loss of data
-               "/wd4267"  # conversion from 'size_t' to 'type', possible loss of data
-               "/wd4305"  # truncation from 'type1' to 'type2'
-               "/wd4800"  # forcing value to bool 'true' or 'false'
-               "/wd4828"  # The file contains a character that is illegal
-               "/wd4996"  # identifier was declared deprecated
-               # errors:
-               "/we4013"  # 'function' undefined; assuming extern returning int
-               "/we4133"  # incompatible pointer types
-               "/we4431"  # missing type specifier - int assumed
-       )
-
-       if(MSVC_VERSION GREATER_EQUAL 1911)
-               # see https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5038?view=vs-2017
-               set(_WARNINGS "${_WARNINGS} /w35038") #order of initialisation in c++ constructors
-       endif()
-
-       string(REPLACE ";" " " _WARNINGS "${_WARNINGS}")
-       set(C_WARNINGS "${_WARNINGS}")
-       set(CXX_WARNINGS "${_WARNINGS}")
-       unset(_WARNINGS)
+  # most msvc warnings are C & C++
+  set(_WARNINGS
+    # warning level:
+    "/W3"
+    "/w34062"  # switch statement contains 'default' but no 'case' labels
+    "/w34115"  # 'type' : named type definition in parentheses
+    "/w34189"  # local variable is initialized but not referenced
+    # disable:
+    "/wd4018"  # signed/unsigned mismatch
+    "/wd4146"  # unary minus operator applied to unsigned type, result still unsigned
+    "/wd4065"  # switch statement contains 'default' but no 'case' labels
+    "/wd4127"  # conditional expression is constant
+    "/wd4181"  # qualifier applied to reference type; ignored
+    "/wd4200"  # zero-sized array in struct/union
+    "/wd4244"  # conversion from 'type1' to 'type2', possible loss of data
+    "/wd4267"  # conversion from 'size_t' to 'type', possible loss of data
+    "/wd4305"  # truncation from 'type1' to 'type2'
+    "/wd4800"  # forcing value to bool 'true' or 'false'
+    "/wd4828"  # The file contains a character that is illegal
+    "/wd4996"  # identifier was declared deprecated
+    # errors:
+    "/we4013"  # 'function' undefined; assuming extern returning int
+    "/we4133"  # incompatible pointer types
+    "/we4431"  # missing type specifier - int assumed
+  )
+
+  if(MSVC_VERSION GREATER_EQUAL 1911)
+    # see https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5038?view=vs-2017
+    set(_WARNINGS "${_WARNINGS} /w35038") #order of initialisation in c++ constructors
+  endif()
+
+  string(REPLACE ";" " " _WARNINGS "${_WARNINGS}")
+  set(C_WARNINGS "${_WARNINGS}")
+  set(CXX_WARNINGS "${_WARNINGS}")
+  unset(_WARNINGS)
 endif()
 
 # ensure python header is found since detection can fail, this could happen
 # with _any_ library but since we used a fixed python version this tends to
 # be most problematic.
 if(WITH_PYTHON)
-       if(NOT EXISTS "${PYTHON_INCLUDE_DIR}/Python.h")
-               message(FATAL_ERROR
-                       "Missing: \"${PYTHON_INCLUDE_DIR}/Python.h\",\n"
-                       "Set the cache entry 'PYTHON_INCLUDE_DIR' to point "
-                       "to a valid python include path. Containing "
-                       "Python.h for python version \"${PYTHON_VERSION}\""
-               )
-       endif()
-
-       if(WIN32 OR APPLE)
-               # Windows and macOS have this bundled with Python libraries.
-       elseif((WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY) OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE))
-               if(("${PYTHON_NUMPY_PATH}" STREQUAL "") OR (${PYTHON_NUMPY_PATH} MATCHES NOTFOUND))
-                       find_python_package(numpy)
-                       unset(PYTHON_NUMPY_INCLUDE_DIRS CACHE)
-                       set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module")
-                       mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS)
-               endif()
-       endif()
-
-       if(WIN32 OR APPLE)
-               # pass, we have this in lib/python/site-packages
-       elseif(WITH_PYTHON_INSTALL_REQUESTS)
-               find_python_package(requests)
-       endif()
+  if(NOT EXISTS "${PYTHON_INCLUDE_DIR}/Python.h")
+    message(FATAL_ERROR
+      "Missing: \"${PYTHON_INCLUDE_DIR}/Python.h\",\n"
+      "Set the cache entry 'PYTHON_INCLUDE_DIR' to point "
+      "to a valid python include path. Containing "
+      "Python.h for python version \"${PYTHON_VERSION}\""
+    )
+  endif()
+
+  if(WIN32 OR APPLE)
+    # Windows and macOS have this bundled with Python libraries.
+  elseif((WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY) OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE))
+    if(("${PYTHON_NUMPY_PATH}" STREQUAL "") OR (${PYTHON_NUMPY_PATH} MATCHES NOTFOUND))
+      find_python_package(numpy)
+      unset(PYTHON_NUMPY_INCLUDE_DIRS CACHE)
+      set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module")
+      mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS)
+    endif()
+  endif()
+
+  if(WIN32 OR APPLE)
+    # pass, we have this in lib/python/site-packages
+  elseif(WITH_PYTHON_INSTALL_REQUESTS)
+    find_python_package(requests)
+  endif()
 endif()
 
 if(
-       CMAKE_COMPILER_IS_GNUCC OR
-       CMAKE_C_COMPILER_ID MATCHES "Clang" OR
-       CMAKE_C_COMPILER_ID MATCHES "Intel"
+  CMAKE_COMPILER_IS_GNUCC OR
+  CMAKE_C_COMPILER_ID MATCHES "Clang" OR
+  CMAKE_C_COMPILER_ID MATCHES "Intel"
 )
-       # TODO(sergey): Do we want c++11 or gnu-c++11 here?
-       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+  # TODO(sergey): Do we want c++11 or gnu-c++11 here?
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 elseif(MSVC)
-       # Nothing special is needed, C++11 features are available by default.
+  # Nothing special is needed, C++11 features are available by default.
 else()
-       message(FATAL_ERROR "Unknown compiler ${CMAKE_C_COMPILER_ID}, can't enable C++11 build")
+  message(FATAL_ERROR "Unknown compiler ${CMAKE_C_COMPILER_ID}, can't enable C++11 build")
 endif()
 
 # Visual Studio has all standards it supports available by default
 # Clang on windows copies this behavior and does not support these switches
 if(
-       CMAKE_COMPILER_IS_GNUCC OR
-       (CMAKE_C_COMPILER_ID MATCHES "Clang" AND (NOT MSVC)) OR
-       (CMAKE_C_COMPILER_ID MATCHES "Intel")
+  CMAKE_COMPILER_IS_GNUCC OR
+  (CMAKE_C_COMPILER_ID MATCHES "Clang" AND (NOT MSVC)) OR
+  (CMAKE_C_COMPILER_ID MATCHES "Intel")
 )
-       # Use C11 + GNU extensions, works with GCC, Clang, ICC
-       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
+  # Use C11 + GNU extensions, works with GCC, Clang, ICC
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
 endif()
 
 # Include warnings first, so its possible to disable them with user defined flags
@@ -1551,19 +1551,19 @@ set(CMAKE_CXX_FLAGS "${CXX_WARNINGS} ${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS}")
 
 # defined above, platform specific but shared names
 mark_as_advanced(
-       CYCLES_OSL
-       OSL_LIB_EXEC
-       OSL_COMPILER
-       OSL_LIB_COMP
-       OSL_LIB_QUERY
-       OSL_INCLUDE_DIR
+  CYCLES_OSL
+  OSL_LIB_EXEC
+  OSL_COMPILER
+  OSL_LIB_COMP
+  OSL_LIB_QUERY
+  OSL_INCLUDE_DIR
 )
 
 mark_as_advanced(
-       LLVM_CONFIG
-       LLVM_ROOT_DIR
-       LLVM_LIBRARY
-       LLVM_VERSION
+  LLVM_CONFIG
+  LLVM_ROOT_DIR
+  LLVM_LIBRARY
+  LLVM_VERSION
 )
 
 #-------------------------------------------------------------------------------
@@ -1571,12 +1571,12 @@ mark_as_advanced(
 
 # better not set includes here but this debugging option is off by default.
 if(WITH_CXX_GUARDEDALLOC)
-       include_directories(${CMAKE_SOURCE_DIR}/intern/guardedalloc)
-       add_definitions(-DWITH_CXX_GUARDEDALLOC)
+  include_directories(${CMAKE_SOURCE_DIR}/intern/guardedalloc)
+  add_definitions(-DWITH_CXX_GUARDEDALLOC)
 endif()
 
 if(WITH_ASSERT_ABORT)
-       add_definitions(-DWITH_ASSERT_ABORT)
+  add_definitions(-DWITH_ASSERT_ABORT)
 endif()
 
 # message(STATUS "Using CFLAGS: ${CMAKE_C_FLAGS}")
@@ -1586,31 +1586,31 @@ endif()
 # Libraries
 
 if(WITH_GTESTS)
-       include(GTestTesting)
+  include(GTestTesting)
 endif()
 
 if(WITH_BLENDER)
-       add_subdirectory(intern)
-       add_subdirectory(extern)
+  add_subdirectory(intern)
+  add_subdirectory(extern)
 
-       # source after intern and extern to gather all
-       # internal and external library information first, for test linking
-       add_subdirectory(source)
+  # source after intern and extern to gather all
+  # internal and external library information first, for test linking
+  add_subdirectory(source)
 elseif(WITH_CYCLES_STANDALONE)
-       add_subdirectory(intern/cycles)
-       add_subdirectory(extern/clew)
-       if(WITH_CUDA_DYNLOAD)
-               add_subdirectory(extern/cuew)
-       endif()
-       if(NOT WITH_SYSTEM_GLEW)
-               add_subdirectory(extern/glew)
-       endif()
+  add_subdirectory(intern/cycles)
+  add_subdirectory(extern/clew)
+  if(WITH_CUDA_DYNLOAD)
+    add_subdirectory(extern/cuew)
+  endif()
+  if(NOT WITH_SYSTEM_GLEW)
+    add_subdirectory(extern/glew)
+  endif()
 endif()
 
 #-----------------------------------------------------------------------------
 # Blender Application
 if(WITH_BLENDER)
-       add_subdirectory(source/creator)
+  add_subdirectory(source/creator)
 endif()
 
 
@@ -1626,7 +1626,7 @@ include(build_files/cmake/packaging.cmake)
 #-----------------------------------------------------------------------------
 # Use dynamic loading for OpenMP
 if(WITH_BLENDER)
-       openmp_delayload(blender)
+  openmp_delayload(blender)
 endif()
 
 #-----------------------------------------------------------------------------
@@ -1634,111 +1634,111 @@ endif()
 
 if(FIRST_RUN)
 
-       set(_config_msg "\nBlender Configuration\n=====================")
-
-       function(info_cfg_option
-               _setting
-               )
-
-               set(_msg "  - ${_setting}")
-               string(LENGTH "${_msg}" _len)
-               while("32" GREATER "${_len}")
-                       set(_msg "${_msg} ")
-                       math(EXPR _len "${_len} + 1")
-               endwhile()
-
-               set(_config_msg "${_config_msg}\n${_msg}${${_setting}}" PARENT_SCOPE)
-       endfunction()
-
-       function(info_cfg_text
-               _text
-               )
-
-               set(_config_msg "${_config_msg}\n\n  ${_text}" PARENT_SCOPE)
-       endfunction()
-
-       message(STATUS "C Compiler:   \"${CMAKE_C_COMPILER_ID}\"")
-       message(STATUS "C++ Compiler: \"${CMAKE_CXX_COMPILER_ID}\"")
-
-       info_cfg_text("Build Options:")
-       info_cfg_option(WITH_BULLET)
-       info_cfg_option(WITH_IK_SOLVER)
-       info_cfg_option(WITH_IK_ITASC)
-       info_cfg_option(WITH_OPENCOLLADA)
-       info_cfg_option(WITH_FFTW3)
-       info_cfg_option(WITH_INTERNATIONAL)
-       info_cfg_option(WITH_INPUT_NDOF)
-       info_cfg_option(WITH_CYCLES)
-       info_cfg_option(WITH_FREESTYLE)
-       info_cfg_option(WITH_OPENCOLORIO)
-       info_cfg_option(WITH_OPENVDB)
-       info_cfg_option(WITH_ALEMBIC)
-
-       info_cfg_text("Compiler Options:")
-       info_cfg_option(WITH_BUILDINFO)
-       info_cfg_option(WITH_OPENMP)
-       info_cfg_option(WITH_RAYOPTIMIZATION)
-
-       info_cfg_text("System Options:")
-       info_cfg_option(WITH_INSTALL_PORTABLE)
-       info_cfg_option(WITH_X11_ALPHA)
-       info_cfg_option(WITH_X11_XF86VMODE)
-       info_cfg_option(WITH_X11_XFIXES)
-       info_cfg_option(WITH_X11_XINPUT)
-       info_cfg_option(WITH_MEM_JEMALLOC)
-       info_cfg_option(WITH_MEM_VALGRIND)
-       info_cfg_option(WITH_SYSTEM_GLEW)
-
-       info_cfg_text("Image Formats:")
-       info_cfg_option(WITH_OPENIMAGEIO)
-       info_cfg_option(WITH_IMAGE_CINEON)
-       info_cfg_option(WITH_IMAGE_DDS)
-       info_cfg_option(WITH_IMAGE_HDR)
-       info_cfg_option(WITH_IMAGE_OPENEXR)
-       info_cfg_option(WITH_IMAGE_OPENJPEG)
-       info_cfg_option(WITH_IMAGE_TIFF)
-
-       info_cfg_text("Audio:")
-       info_cfg_option(WITH_OPENAL)
-       info_cfg_option(WITH_SDL)
-       info_cfg_option(WITH_SDL_DYNLOAD)
-       info_cfg_option(WITH_JACK)
-       info_cfg_option(WITH_JACK_DYNLOAD)
-       info_cfg_option(WITH_CODEC_AVI)
-       info_cfg_option(WITH_CODEC_FFMPEG)
-       info_cfg_option(WITH_CODEC_SNDFILE)
-
-       info_cfg_text("Compression:")
-       info_cfg_option(WITH_LZMA)
-       info_cfg_option(WITH_LZO)
-
-       info_cfg_text("Python:")
-       info_cfg_option(WITH_PYTHON_INSTALL)
-       info_cfg_option(WITH_PYTHON_INSTALL_NUMPY)
-       info_cfg_option(WITH_PYTHON_MODULE)
-       info_cfg_option(WITH_PYTHON_SAFETY)
-       if(APPLE)
-               info_cfg_option(WITH_PYTHON_FRAMEWORK)
-       endif()
-
-       info_cfg_text("Modifiers:")
-       info_cfg_option(WITH_MOD_REMESH)
-       info_cfg_option(WITH_MOD_FLUID)
-       info_cfg_option(WITH_MOD_OCEANSIM)
-
-       info_cfg_text("OpenGL:")
-       info_cfg_option(WITH_GLEW_ES)
-       info_cfg_option(WITH_GL_EGL)
-       info_cfg_option(WITH_GL_PROFILE_ES20)
-       if(WIN32)
-               info_cfg_option(WITH_GL_ANGLE)
-       endif()
-
-       info_cfg_text("")
-
-       message("${_config_msg}")
+  set(_config_msg "\nBlender Configuration\n=====================")
+
+  function(info_cfg_option
+    _setting
+    )
+
+    set(_msg "  - ${_setting}")
+    string(LENGTH "${_msg}" _len)
+    while("32" GREATER "${_len}")
+      set(_msg "${_msg} ")
+      math(EXPR _len "${_len} + 1")
+    endwhile()
+
+    set(_config_msg "${_config_msg}\n${_msg}${${_setting}}" PARENT_SCOPE)
+  endfunction()
+
+  function(info_cfg_text
+    _text
+    )
+
+    set(_config_msg "${_config_msg}\n\n  ${_text}" PARENT_SCOPE)
+  endfunction()
+
+  message(STATUS "C Compiler:   \"${CMAKE_C_COMPILER_ID}\"")
+  message(STATUS "C++ Compiler: \"${CMAKE_CXX_COMPILER_ID}\"")
+
+  info_cfg_text("Build Options:")
+  info_cfg_option(WITH_BULLET)
+  info_cfg_option(WITH_IK_SOLVER)
+  info_cfg_option(WITH_IK_ITASC)
+  info_cfg_option(WITH_OPENCOLLADA)
+  info_cfg_option(WITH_FFTW3)
+  info_cfg_option(WITH_INTERNATIONAL)
+  info_cfg_option(WITH_INPUT_NDOF)
+  info_cfg_option(WITH_CYCLES)
+  info_cfg_option(WITH_FREESTYLE)
+  info_cfg_option(WITH_OPENCOLORIO)
+  info_cfg_option(WITH_OPENVDB)
+  info_cfg_option(WITH_ALEMBIC)
+
+  info_cfg_text("Compiler Options:")
+  info_cfg_option(WITH_BUILDINFO)
+  info_cfg_option(WITH_OPENMP)
+  info_cfg_option(WITH_RAYOPTIMIZATION)
+
+  info_cfg_text("System Options:")
+  info_cfg_option(WITH_INSTALL_PORTABLE)
+  info_cfg_option(WITH_X11_ALPHA)
+  info_cfg_option(WITH_X11_XF86VMODE)
+  info_cfg_option(WITH_X11_XFIXES)
+  info_cfg_option(WITH_X11_XINPUT)
+  info_cfg_option(WITH_MEM_JEMALLOC)
+  info_cfg_option(WITH_MEM_VALGRIND)
+  info_cfg_option(WITH_SYSTEM_GLEW)
+
+  info_cfg_text("Image Formats:")
+  info_cfg_option(WITH_OPENIMAGEIO)
+  info_cfg_option(WITH_IMAGE_CINEON)
+  info_cfg_option(WITH_IMAGE_DDS)
+  info_cfg_option(WITH_IMAGE_HDR)
+  info_cfg_option(WITH_IMAGE_OPENEXR)
+  info_cfg_option(WITH_IMAGE_OPENJPEG)
+  info_cfg_option(WITH_IMAGE_TIFF)
+
+  info_cfg_text("Audio:")
+  info_cfg_option(WITH_OPENAL)
+  info_cfg_option(WITH_SDL)
+  info_cfg_option(WITH_SDL_DYNLOAD)
+  info_cfg_option(WITH_JACK)
+  info_cfg_option(WITH_JACK_DYNLOAD)
+  info_cfg_option(WITH_CODEC_AVI)
+  info_cfg_option(WITH_CODEC_FFMPEG)
+  info_cfg_option(WITH_CODEC_SNDFILE)
+
+  info_cfg_text("Compression:")
+  info_cfg_option(WITH_LZMA)
+  info_cfg_option(WITH_LZO)
+
+  info_cfg_text("Python:")
+  info_cfg_option(WITH_PYTHON_INSTALL)
+  info_cfg_option(WITH_PYTHON_INSTALL_NUMPY)
+  info_cfg_option(WITH_PYTHON_MODULE)
+  info_cfg_option(WITH_PYTHON_SAFETY)
+  if(APPLE)
+    info_cfg_option(WITH_PYTHON_FRAMEWORK)
+  endif()
+
+  info_cfg_text("Modifiers:")
+  info_cfg_option(WITH_MOD_REMESH)
+  info_cfg_option(WITH_MOD_FLUID)
+  info_cfg_option(WITH_MOD_OCEANSIM)
+
+  info_cfg_text("OpenGL:")
+  info_cfg_option(WITH_GLEW_ES)
+  info_cfg_option(WITH_GL_EGL)
+  info_cfg_option(WITH_GL_PROFILE_ES20)
+  if(WIN32)
+    info_cfg_option(WITH_GL_ANGLE)
+  endif()
+
+  info_cfg_text("")
+
+  message("${_config_msg}")
 endif()
 
 if(0)
-       print_all_vars()
+  print_all_vars()
 endif()
index 1760e00..c21ed82 100644 (file)
@@ -47,13 +47,13 @@ include(cmake/options.cmake)
 include(cmake/versions.cmake)
 
 if(ENABLE_MINGW64)
-       if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
-               include(cmake/setup_mingw64.cmake)
-       else()
-               include(cmake/setup_mingw32.cmake)
-       endif()
+  if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+    include(cmake/setup_mingw64.cmake)
+  else()
+    include(cmake/setup_mingw32.cmake)
+  endif()
 else()
-       set(mingw_LIBDIR ${LIBDIR})
+  set(mingw_LIBDIR ${LIBDIR})
 endif()
 
 include(cmake/zlib.cmake)
@@ -94,61 +94,61 @@ include(cmake/numpy.cmake)
 include(cmake/pugixml.cmake)
 
 if(WITH_WEBP)
-       include(cmake/webp.cmake)
+  include(cmake/webp.cmake)
 endif()
 
 if(WITH_EMBREE)
-       include(cmake/embree.cmake)
+  include(cmake/embree.cmake)
 endif()
 
 if(WIN32)
-       # HMD branch deps
-       include(cmake/hidapi.cmake)
-       # OCIO deps
-       include(cmake/tinyxml.cmake)
-       include(cmake/yamlcpp.cmake)
-       # LCMS is an OCIO dep, but only if you build the apps, leaving it here for convenience
-       #include(cmake/lcms.cmake)
+  # HMD branch deps
+  include(cmake/hidapi.cmake)
+  # OCIO deps
+  include(cmake/tinyxml.cmake)
+  include(cmake/yamlcpp.cmake)
+  # LCMS is an OCIO dep, but only if you build the apps, leaving it here for convenience
+  #include(cmake/lcms.cmake)
 
 endif()
 
 if(NOT WIN32 OR ENABLE_MINGW64)
-       include(cmake/openjpeg.cmake)
-       if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
-               if(WIN32)
-                       include(cmake/zlib_mingw.cmake)
-               endif()
-               include(cmake/lame.cmake)
-               include(cmake/ogg.cmake)
-               include(cmake/vorbis.cmake)
-               include(cmake/theora.cmake)
-               include(cmake/vpx.cmake)
-               include(cmake/x264.cmake)
-               include(cmake/xvidcore.cmake)
-               include(cmake/faad.cmake)
-               include(cmake/ffmpeg.cmake)
-               include(cmake/fftw.cmake)
-               include(cmake/sndfile.cmake)
-               if(WIN32)
-                       include(cmake/iconv.cmake)
-               endif()
-               if(UNIX)
-                       include(cmake/flac.cmake)
-                       include(cmake/xml2.cmake)
-                       if(NOT APPLE)
-                               include(cmake/spnav.cmake)
-                               include(cmake/jemalloc.cmake)
-                       endif()
-               endif()
-       endif()
+  include(cmake/openjpeg.cmake)
+  if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
+    if(WIN32)
+      include(cmake/zlib_mingw.cmake)
+    endif()
+    include(cmake/lame.cmake)
+    include(cmake/ogg.cmake)
+    include(cmake/vorbis.cmake)
+    include(cmake/theora.cmake)
+    include(cmake/vpx.cmake)
+    include(cmake/x264.cmake)
+    include(cmake/xvidcore.cmake)
+    include(cmake/faad.cmake)
+    include(cmake/ffmpeg.cmake)
+    include(cmake/fftw.cmake)
+    include(cmake/sndfile.cmake)
+    if(WIN32)
+      include(cmake/iconv.cmake)
+    endif()
+    if(UNIX)
+      include(cmake/flac.cmake)
+      include(cmake/xml2.cmake)
+      if(NOT APPLE)
+        include(cmake/spnav.cmake)
+        include(cmake/jemalloc.cmake)
+      endif()
+    endif()
+  endif()
 endif()
 
 if(UNIX)
-       include(cmake/bzip2.cmake)
-       include(cmake/ffi.cmake)
-       include(cmake/lzma.cmake)
-       include(cmake/ssl.cmake)
-       include(cmake/sqlite.cmake)
+  include(cmake/bzip2.cmake)
+  include(cmake/ffi.cmake)
+  include(cmake/lzma.cmake)
+  include(cmake/ssl.cmake)
+  include(cmake/sqlite.cmake)
 endif()
 
 include(cmake/harvest.cmake)
index e6323d5..fa2d724 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 if(ALEMBIC_HDF5)
-       set(ALEMBIC_HDF5_HL)
-       # in debug mode we do not build HDF5_hdf5_hl_LIBRARY which makes cmake really
-       # unhappy, stub it with the debug mode lib. it's not linking it in at this
-       # point in time anyhow
-       if(BUILD_MODE STREQUAL Debug)
-               set(ALEMBIC_HDF5_HL -DHDF5_hdf5_hl_LIBRARY=${LIBDIR}/hdf5/lib/libhdf5_hl_D.${LIBEXT})
-       endif()
+  set(ALEMBIC_HDF5_HL)
+  # in debug mode we do not build HDF5_hdf5_hl_LIBRARY which makes cmake really
+  # unhappy, stub it with the debug mode lib. it's not linking it in at this
+  # point in time anyhow
+  if(BUILD_MODE STREQUAL Debug)
+    set(ALEMBIC_HDF5_HL -DHDF5_hdf5_hl_LIBRARY=${LIBDIR}/hdf5/lib/libhdf5_hl_D.${LIBEXT})
+  endif()
 endif()
 
 if(WIN32)
-       set(ALEMBIC_ILMBASE ${LIBDIR}/openexr)
+  set(ALEMBIC_ILMBASE ${LIBDIR}/openexr)
 else()
-       set(ALEMBIC_ILMBASE ${LIBDIR}/ilmbase)
+  set(ALEMBIC_ILMBASE ${LIBDIR}/ilmbase)
 endif()
 
 set(ALEMBIC_EXTRA_ARGS
-       -DBUILDSTATIC=ON
-       -DLINKSTATIC=ON
-       -DALEMBIC_LIB_USES_BOOST=ON
-       -DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-       -DBoost_USE_MULTITHREADED=ON
-       -DUSE_STATIC_BOOST=On
-       -DBoost_USE_STATIC_LIBS=ON
-       -DBoost_USE_STATIC_RUNTIME=ON
-       -DBoost_DEBUG=ON
-       -DBOOST_ROOT=${LIBDIR}/boost
-       -DBoost_NO_SYSTEM_PATHS=ON
-       -DILMBASE_ROOT=${ALEMBIC_ILMBASE}
-       -DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${ALEMBIC_ILMBASE}/include/OpenEXR
-       -DALEMBIC_ILMBASE_HALF_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-       -DALEMBIC_ILMBASE_IMATH_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-       -DALEMBIC_ILMBASE_ILMTHREAD_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-       -DALEMBIC_ILMBASE_IEX_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-       -DALEMBIC_ILMBASE_IEXMATH_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}IexMath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-       -DUSE_PYILMBASE=0
-       -DUSE_PYALEMBIC=0
-       -DUSE_ARNOLD=0
-       -DUSE_MAYA=0
-       -DUSE_PRMAN=0
-       -DUSE_HDF5=Off
-       -DUSE_STATIC_HDF5=Off
-       -DHDF5_ROOT=${LIBDIR}/hdf5
-       -DUSE_TESTS=Off
-       -DALEMBIC_NO_OPENGL=1
-       -DUSE_BINARIES=ON
-       -DALEMBIC_ILMBASE_LINK_STATIC=On
-       -DALEMBIC_SHARED_LIBS=OFF
-       -DGLUT_INCLUDE_DIR=""
-       -DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-       -DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-       ${ALEMBIC_HDF5_HL}
+  -DBUILDSTATIC=ON
+  -DLINKSTATIC=ON
+  -DALEMBIC_LIB_USES_BOOST=ON
+  -DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
+  -DBoost_USE_MULTITHREADED=ON
+  -DUSE_STATIC_BOOST=On
+  -DBoost_USE_STATIC_LIBS=ON
+  -DBoost_USE_STATIC_RUNTIME=ON
+  -DBoost_DEBUG=ON
+  -DBOOST_ROOT=${LIBDIR}/boost
+  -DBoost_NO_SYSTEM_PATHS=ON
+  -DILMBASE_ROOT=${ALEMBIC_ILMBASE}
+  -DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${ALEMBIC_ILMBASE}/include/OpenEXR
+  -DALEMBIC_ILMBASE_HALF_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
+  -DALEMBIC_ILMBASE_IMATH_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
+  -DALEMBIC_ILMBASE_ILMTHREAD_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
+  -DALEMBIC_ILMBASE_IEX_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
+  -DALEMBIC_ILMBASE_IEXMATH_LIB=${ALEMBIC_ILMBASE}/lib/${LIBPREFIX}IexMath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
+  -DUSE_PYILMBASE=0
+  -DUSE_PYALEMBIC=0
+  -DUSE_ARNOLD=0
+  -DUSE_MAYA=0
+  -DUSE_PRMAN=0
+  -DUSE_HDF5=Off
+  -DUSE_STATIC_HDF5=Off
+  -DHDF5_ROOT=${LIBDIR}/hdf5
+  -DUSE_TESTS=Off
+  -DALEMBIC_NO_OPENGL=1
+  -DUSE_BINARIES=ON
+  -DALEMBIC_ILMBASE_LINK_STATIC=On
+  -DALEMBIC_SHARED_LIBS=OFF
+  -DGLUT_INCLUDE_DIR=""
+  -DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
+  -DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
+  ${ALEMBIC_HDF5_HL}
 )
 
 ExternalProject_Add(external_alembic
-       URL ${ALEMBIC_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${ALEMBIC_MD5}
-       PREFIX ${BUILD_DIR}/alembic
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/alembic -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ALEMBIC_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/alembic
+  URL ${ALEMBIC_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${ALEMBIC_MD5}
+  PREFIX ${BUILD_DIR}/alembic
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/alembic -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ALEMBIC_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/alembic
 )
 
 if(WIN32)
-       if(BUILD_MODE STREQUAL Release)
-               ExternalProject_Add_Step(external_alembic after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/alembic ${HARVEST_TARGET}/alembic
-                       DEPENDEES install
-               )
-       endif()
-       if(BUILD_MODE STREQUAL Debug)
-               ExternalProject_Add_Step(external_alembic after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/alembic/lib/alembic.lib ${HARVEST_TARGET}/alembic/lib/alembic_d.lib
-                       DEPENDEES install
-               )
-       endif()
+  if(BUILD_MODE STREQUAL Release)
+    ExternalProject_Add_Step(external_alembic after_install
+      COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/alembic ${HARVEST_TARGET}/alembic
+      DEPENDEES install
+    )
+  endif()
+  if(BUILD_MODE STREQUAL Debug)
+    ExternalProject_Add_Step(external_alembic after_install
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/alembic/lib/alembic.lib ${HARVEST_TARGET}/alembic/lib/alembic_d.lib
+      DEPENDEES install
+    )
+  endif()
 endif()
 
 
 
 add_dependencies(
-       external_alembic
-       external_boost
-       external_zlib
-       external_ilmbase
-       external_openexr
+  external_alembic
+  external_boost
+  external_zlib
+  external_ilmbase
+  external_openexr
 )
index b306401..f4cc6ee 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 if(BUILD_MODE STREQUAL Release)
-       if(WIN32)
-               set(THUMB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../release/windows/blendthumb)
+  if(WIN32)
+    set(THUMB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../release/windows/blendthumb)
 
-               ExternalProject_Add(external_zlib_32
-                       URL ${ZLIB_URI}
-                       CMAKE_GENERATOR ${GENERATOR_32}
-                       URL_HASH MD5=${ZLIB_HASH}
-                       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-                       PREFIX ${BUILD_DIR}/zlib32
-                       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib32 ${DEFAULT_CMAKE_FLAGS}
-                       INSTALL_DIR ${LIBDIR}/zlib32
-               )
+    ExternalProject_Add(external_zlib_32
+      URL ${ZLIB_URI}
+      CMAKE_GENERATOR ${GENERATOR_32}
+      URL_HASH MD5=${ZLIB_HASH}
+      DOWNLOAD_DIR ${DOWNLOAD_DIR}
+      PREFIX ${BUILD_DIR}/zlib32
+      CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib32 ${DEFAULT_CMAKE_FLAGS}
+      INSTALL_DIR ${LIBDIR}/zlib32
+    )
 
-               ExternalProject_Add(external_zlib_64
-                       URL ${ZLIB_URI}
-                       CMAKE_GENERATOR ${GENERATOR_64}
-                       URL_HASH MD5=${ZLIB_HASH}
-                       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-                       PREFIX ${BUILD_DIR}/zlib64
-                       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib64 ${DEFAULT_CMAKE_FLAGS}
-                       INSTALL_DIR ${LIBDIR}/zlib64
-               )
+    ExternalProject_Add(external_zlib_64
+      URL ${ZLIB_URI}
+      CMAKE_GENERATOR ${GENERATOR_64}
+      URL_HASH MD5=${ZLIB_HASH}
+      DOWNLOAD_DIR ${DOWNLOAD_DIR}
+      PREFIX ${BUILD_DIR}/zlib64
+      CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib64 ${DEFAULT_CMAKE_FLAGS}
+      INSTALL_DIR ${LIBDIR}/zlib64
+    )
 
-               ExternalProject_Add(external_blendthumb_32
-                       CMAKE_GENERATOR ${GENERATOR_32}
-                       SOURCE_DIR ${THUMB_DIR}
-                       PREFIX ${BUILD_DIR}/blendthumb32
-                       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb32 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib32/include -DZLIB_LIBS=${LIBDIR}/zlib32/lib/zlibstatic.lib
-                       INSTALL_DIR ${LIBDIR}/blendthumb32
-               )
-               add_dependencies(
-                       external_blendthumb_32
-                       external_zlib_32
-               )
+    ExternalProject_Add(external_blendthumb_32
+      CMAKE_GENERATOR ${GENERATOR_32}
+      SOURCE_DIR ${THUMB_DIR}
+      PREFIX ${BUILD_DIR}/blendthumb32
+      CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb32 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib32/include -DZLIB_LIBS=${LIBDIR}/zlib32/lib/zlibstatic.lib
+      INSTALL_DIR ${LIBDIR}/blendthumb32
+    )
+    add_dependencies(
+      external_blendthumb_32
+      external_zlib_32
+    )
 
-               ExternalProject_Add(external_blendthumb_64
-                       CMAKE_GENERATOR ${GENERATOR_64}
-                       SOURCE_DIR ${THUMB_DIR}
-                       PREFIX ${BUILD_DIR}/blendthumb64
-                       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb64 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib64/include -DZLIB_LIBS=${LIBDIR}/zlib64/lib/zlibstatic.lib
-                       INSTALL_DIR ${LIBDIR}/blendthumb64
-               )
-               add_dependencies(
-                       external_blendthumb_64
-                       external_zlib_64
-               )
-       endif()
+    ExternalProject_Add(external_blendthumb_64
+      CMAKE_GENERATOR ${GENERATOR_64}
+      SOURCE_DIR ${THUMB_DIR}
+      PREFIX ${BUILD_DIR}/blendthumb64
+      CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb64 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib64/include -DZLIB_LIBS=${LIBDIR}/zlib64/lib/zlibstatic.lib
+      INSTALL_DIR ${LIBDIR}/blendthumb64
+    )
+    add_dependencies(
+      external_blendthumb_64
+      external_zlib_64
+    )
+  endif()
 endif()
index 1cbf970..c7f3cbb 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 set(BLOSC_EXTRA_ARGS
-       -DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-       -DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-       -DBUILD_TESTS=OFF
-       -DBUILD_BENCHMARKS=OFF
-       -DCMAKE_DEBUG_POSTFIX=_d
-       -DThreads_FOUND=1
-       -DPTHREAD_LIBS=${LIBDIR}/pthreads/lib/pthreadVC3.lib
-       -DPTHREAD_INCLUDE_DIR=${LIBDIR}/pthreads/inc
-       -DDEACTIVATE_SNAPPY=ON
-       -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+  -DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
+  -DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
+  -DBUILD_TESTS=OFF
+  -DBUILD_BENCHMARKS=OFF
+  -DCMAKE_DEBUG_POSTFIX=_d
+  -DThreads_FOUND=1
+  -DPTHREAD_LIBS=${LIBDIR}/pthreads/lib/pthreadVC3.lib
+  -DPTHREAD_INCLUDE_DIR=${LIBDIR}/pthreads/inc
+  -DDEACTIVATE_SNAPPY=ON
+  -DCMAKE_POSITION_INDEPENDENT_CODE=ON
 )
 
 if(WIN32)
-       #prevent blosc from including it's own local copy of zlib in the object file
-       #and cause linker errors with everybody else
-       set(BLOSC_EXTRA_ARGS ${BLOSC_EXTRA_ARGS}
-               -DPREFER_EXTERNAL_ZLIB=ON
-       )
+  #prevent blosc from including it's own local copy of zlib in the object file
+  #and cause linker errors with everybody else
+  set(BLOSC_EXTRA_ARGS ${BLOSC_EXTRA_ARGS}
+    -DPREFER_EXTERNAL_ZLIB=ON
+  )
 endif()
 
 ExternalProject_Add(external_blosc
-       URL ${BLOSC_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${BLOSC_HASH}
-       PREFIX ${BUILD_DIR}/blosc
-       PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/blosc/src/external_blosc < ${PATCH_DIR}/blosc.diff
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blosc ${DEFAULT_CMAKE_FLAGS} ${BLOSC_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/blosc
+  URL ${BLOSC_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${BLOSC_HASH}
+  PREFIX ${BUILD_DIR}/blosc
+  PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/blosc/src/external_blosc < ${PATCH_DIR}/blosc.diff
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blosc ${DEFAULT_CMAKE_FLAGS} ${BLOSC_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/blosc
 )
 
 add_dependencies(
-       external_blosc
-       external_zlib
+  external_blosc
+  external_zlib
 )
 if(WIN32)
-       add_dependencies(
-               external_blosc
-               external_pthreads
-       )
+  add_dependencies(
+    external_blosc
+    external_pthreads
+  )
 endif()
 
 if (WIN32)
-       if(BUILD_MODE STREQUAL Release)
-               ExternalProject_Add_Step(external_blosc after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc.lib ${HARVEST_TARGET}/blosc/lib/libblosc.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/blosc/include/ ${HARVEST_TARGET}/blosc/include/
-                       DEPENDEES install
-               )
-       endif()
-       if(BUILD_MODE STREQUAL Debug)
-               ExternalProject_Add_Step(external_blosc after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc_d.lib ${HARVEST_TARGET}/blosc/lib/libblosc_d.lib
-                       DEPENDEES install
-               )
-       endif()
+  if(BUILD_MODE STREQUAL Release)
+    ExternalProject_Add_Step(external_blosc after_install
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc.lib ${HARVEST_TARGET}/blosc/lib/libblosc.lib
+      COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/blosc/include/ ${HARVEST_TARGET}/blosc/include/
+      DEPENDEES install
+    )
+  endif()
+  if(BUILD_MODE STREQUAL Debug)
+    ExternalProject_Add_Step(external_blosc after_install
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc_d.lib ${HARVEST_TARGET}/blosc/lib/libblosc_d.lib
+      DEPENDEES install
+    )
+  endif()
 endif()
index 33bfa1d..7fcd7e7 100644 (file)
 set(BOOST_ADDRESS_MODEL 64)
 
 if(WIN32)
-       if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
-               set(PYTHON_ARCH x64)
-               set(PYTHON_ARCH2 win-AMD64)
-               set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/amd64/)
-       else()
-               set(PYTHON_ARCH x86)
-               set(PYTHON_ARCH2 win32)
-               set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/win32/)
-               set(BOOST_ADDRESS_MODEL 32)
-       endif()
-       if(MSVC14)
-               set(BOOST_TOOLSET toolset=msvc-14.0)
-               set(BOOST_COMPILER_STRING -vc140)
-       endif()
-       set(JAM_FILE ${BUILD_DIR}/boost/src/external_boost/user-config.jam)
-       set(semi_path "${PATCH_DIR}/semi.txt")
-       FILE(TO_NATIVE_PATH ${semi_path} semi_path)
-       set(BOOST_CONFIGURE_COMMAND bootstrap.bat &&
-                                                               echo using python : ${PYTHON_OUTPUTDIR}\\python.exe > "${JAM_FILE}" &&
-                                                               echo.   : ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/pc >> "${JAM_FILE}" &&
-                                                               echo.   : ${BUILD_DIR}/python/src/external_python/pcbuild >> "${JAM_FILE}" &&
-                                                               type ${semi_path} >> "${JAM_FILE}"
-       )
-       set(BOOST_BUILD_COMMAND bjam)
-       #--user-config=user-config.jam
-       set(BOOST_BUILD_OPTIONS runtime-link=static )
-       #set(BOOST_WITH_PYTHON --with-python)
-       set(BOOST_HARVEST_CMD   ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ )
-       if(BUILD_MODE STREQUAL Release)
-               set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-1_68/ ${HARVEST_TARGET}/boost/include/)
-       endif()
+  if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+    set(PYTHON_ARCH x64)
+    set(PYTHON_ARCH2 win-AMD64)
+    set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/amd64/)
+  else()
+    set(PYTHON_ARCH x86)
+    set(PYTHON_ARCH2 win32)
+    set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/win32/)
+    set(BOOST_ADDRESS_MODEL 32)
+  endif()
+  if(MSVC14)
+    set(BOOST_TOOLSET toolset=msvc-14.0)
+    set(BOOST_COMPILER_STRING -vc140)
+  endif()
+  set(JAM_FILE ${BUILD_DIR}/boost/src/external_boost/user-config.jam)
+  set(semi_path "${PATCH_DIR}/semi.txt")
+  FILE(TO_NATIVE_PATH ${semi_path} semi_path)
+  set(BOOST_CONFIGURE_COMMAND bootstrap.bat &&
+                echo using python : ${PYTHON_OUTPUTDIR}\\python.exe > "${JAM_FILE}" &&
+                echo.   : ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/pc >> "${JAM_FILE}" &&
+                echo.   : ${BUILD_DIR}/python/src/external_python/pcbuild >> "${JAM_FILE}" &&
+                type ${semi_path} >> "${JAM_FILE}"
+  )
+  set(BOOST_BUILD_COMMAND bjam)
+  #--user-config=user-config.jam
+  set(BOOST_BUILD_OPTIONS runtime-link=static )
+  #set(BOOST_WITH_PYTHON --with-python)
+  set(BOOST_HARVEST_CMD   ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ )
+  if(BUILD_MODE STREQUAL Release)
+    set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-1_68/ ${HARVEST_TARGET}/boost/include/)
+  endif()
 
 elseif(APPLE)
-       set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
-       set(BOOST_BUILD_COMMAND ./b2)
-       set(BOOST_BUILD_OPTIONS toolset=darwin cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} --disable-icu boost.locale.icu=off)
-       set(BOOST_HARVEST_CMD echo .)
-       set(BOOST_PATCH_COMMAND echo .)
+  set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
+  set(BOOST_BUILD_COMMAND ./b2)
+  set(BOOST_BUILD_OPTIONS toolset=darwin cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} --disable-icu boost.locale.icu=off)
+  set(BOOST_HARVEST_CMD echo .)
+  set(BOOST_PATCH_COMMAND echo .)
 else()
-       set(BOOST_HARVEST_CMD echo .)
-       set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
-       set(BOOST_BUILD_COMMAND ./b2)
-       set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
-       set(BOOST_PATCH_COMMAND echo .)
-       if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
-               set(BOOST_ADDRESS_MODEL 64)
-       else()
-               set(BOOST_ADDRESS_MODEL 32)
-       endif()
+  set(BOOST_HARVEST_CMD echo .)
+  set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
+  set(BOOST_BUILD_COMMAND ./b2)
+  set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
+  set(BOOST_PATCH_COMMAND echo .)
+  if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+    set(BOOST_ADDRESS_MODEL 64)
+  else()
+    set(BOOST_ADDRESS_MODEL 32)
+  endif()
 endif()
 
 set(BOOST_OPTIONS
-       --with-filesystem
-       --with-locale
-       --with-thread
-       --with-regex
-       --with-system
-       --with-date_time
-       --with-wave
-       --with-atomic
-       --with-serialization
-       --with-program_options
-       --with-iostreams
-       ${BOOST_WITH_PYTHON}
-       ${BOOST_TOOLSET}
+  --with-filesystem
+  --with-locale
+  --with-thread
+  --with-regex
+  --with-system
+  --with-date_time
+  --with-wave
+  --with-atomic
+  --with-serialization
+  --with-program_options
+  --with-iostreams
+  ${BOOST_WITH_PYTHON}
+  ${BOOST_TOOLSET}
 )
 
 string(TOLOWER ${BUILD_MODE} BOOST_BUILD_TYPE)
 
 ExternalProject_Add(external_boost
-       URL ${BOOST_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${BOOST_HASH}
-       PREFIX ${BUILD_DIR}/boost
-       UPDATE_COMMAND  ""
-       PATCH_COMMAND ${BOOST_PATCH_COMMAND}
-       CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
-       BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=x86 address-model=${BOOST_ADDRESS_MODEL} link=static threading=multi ${BOOST_OPTIONS}        --prefix=${LIBDIR}/boost install
-       BUILD_IN_SOURCE 1
-       INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
+  URL ${BOOST_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${BOOST_HASH}
+  PREFIX ${BUILD_DIR}/boost
+  UPDATE_COMMAND  ""
+  PATCH_COMMAND ${BOOST_PATCH_COMMAND}
+  CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
+  BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=x86 address-model=${BOOST_ADDRESS_MODEL} link=static threading=multi ${BOOST_OPTIONS}    --prefix=${LIBDIR}/boost install
+  BUILD_IN_SOURCE 1
+  INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
 )
 
 if(WIN32)
-       add_dependencies(
-               external_boost
-               Make_Python_Environment
-       )
+  add_dependencies(
+    external_boost
+    Make_Python_Environment
+  )
 endif()
index 6c515d1..fbf5551 100644 (file)
@@ -21,19 +21,19 @@ set(BZIP2_CONFIGURE_ENV echo .)
 set(BZIP2_CONFIGURATION_ARGS)
 
 if(UNIX AND NOT APPLE)
-       set(BZIP2_LDFLAGS "-Wl,--as-needed")
-       set(BZIP2_CFLAGS "-fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64")
-       set(BZIP2_CONFIGURE_ENV ${BZIP2_CONFIGURE_ENV} && export LDFLAGS=${BZIP2_LDFLAGS} && export CFLAGS=${BZIP2_CFLAGS}
-               && export PREFIX=${BZIP2_PREFIX})
+  set(BZIP2_LDFLAGS "-Wl,--as-needed")
+  set(BZIP2_CFLAGS "-fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64")
+  set(BZIP2_CONFIGURE_ENV ${BZIP2_CONFIGURE_ENV} && export LDFLAGS=${BZIP2_LDFLAGS} && export CFLAGS=${BZIP2_CFLAGS}
+    && export PREFIX=${BZIP2_PREFIX})
 endif()
 
 ExternalProject_Add(external_bzip2
-       URL ${BZIP2_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH SHA256=${BZIP2_HASH}
-       PREFIX ${BUILD_DIR}/bzip2
-       CONFIGURE_COMMAND echo .
-       BUILD_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} -j${MAKE_THREADS}
-       INSTALL_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} PREFIX=${BZIP2_PREFIX} install
-       INSTALL_DIR ${LIBDIR}/bzip2
+  URL ${BZIP2_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH SHA256=${BZIP2_HASH}
+  PREFIX ${BUILD_DIR}/bzip2
+  CONFIGURE_COMMAND echo .
+  BUILD_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} -j${MAKE_THREADS}
+  INSTALL_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} PREFIX=${BZIP2_PREFIX} install
+  INSTALL_DIR ${LIBDIR}/bzip2
 )
index 699c38a..f1f537b 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 set(CLANG_EXTRA_ARGS
-       -DCLANG_PATH_TO_LLVM_SOURCE=${BUILD_DIR}/ll/src/ll
-       -DCLANG_PATH_TO_LLVM_BUILD=${LIBDIR}/llvm
-       -DLLVM_USE_CRT_RELEASE=MT
-       -DLLVM_USE_CRT_DEBUG=MTd
-       -DLLVM_CONFIG=${LIBDIR}/llvm/bin/llvm-config
+  -DCLANG_PATH_TO_LLVM_SOURCE=${BUILD_DIR}/ll/src/ll
+  -DCLANG_PATH_TO_LLVM_BUILD=${LIBDIR}/llvm
+  -DLLVM_USE_CRT_RELEASE=MT
+  -DLLVM_USE_CRT_DEBUG=MTd
+  -DLLVM_CONFIG=${LIBDIR}/llvm/bin/llvm-config
 )
 
 if(WIN32)
-       set(CLANG_GENERATOR "Ninja")
+  set(CLANG_GENERATOR "Ninja")
 else()
-       set(CLANG_GENERATOR "Unix Makefiles")
+  set(CLANG_GENERATOR "Unix Makefiles")
 endif()
 
 
 ExternalProject_Add(external_clang
-       URL ${CLANG_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${CLANG_HASH}
-       PREFIX ${BUILD_DIR}/clang
-       CMAKE_GENERATOR ${CLANG_GENERATOR}
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clang ${DEFAULT_CMAKE_FLAGS} ${CLANG_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/clang
+  URL ${CLANG_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${CLANG_HASH}
+  PREFIX ${BUILD_DIR}/clang
+  CMAKE_GENERATOR ${CLANG_GENERATOR}
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clang ${DEFAULT_CMAKE_FLAGS} ${CLANG_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/clang
 )
 
 if(MSVC)
-       if(BUILD_MODE STREQUAL Release)
-               set(CLANG_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/ ${HARVEST_TARGET}/llvm/)
-       else()
-               set(CLANG_HARVEST_COMMAND
-                       ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
-                       ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ &&
-                       ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/include/ ${HARVEST_TARGET}/llvm/debug/include/
-               )
-       endif()
-       ExternalProject_Add_Step(external_clang after_install
-               COMMAND ${CLANG_HARVEST_COMMAND}
-               DEPENDEES mkdir update patch download configure build install
-       )
+  if(BUILD_MODE STREQUAL Release)
+    set(CLANG_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/ ${HARVEST_TARGET}/llvm/)
+  else()
+    set(CLANG_HARVEST_COMMAND
+      ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
+      ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ &&
+      ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/include/ ${HARVEST_TARGET}/llvm/debug/include/
+    )
+  endif()
+  ExternalProject_Add_Step(external_clang after_install
+    COMMAND ${CLANG_HARVEST_COMMAND}
+    DEPENDEES mkdir update patch download configure build install
+  )
 endif()
 
 add_dependencies(
-       external_clang
-       ll
+  external_clang
+  ll
 )
index 0dcc1f2..ecc0f5a 100644 (file)
 set(CLEW_EXTRA_ARGS)
 
 ExternalProject_Add(external_clew
-       URL ${CLEW_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${CLEW_HASH}
-       PREFIX ${BUILD_DIR}/clew
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CLEW_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/clew
+  URL ${CLEW_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${CLEW_HASH}
+  PREFIX ${BUILD_DIR}/clew
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CLEW_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/clew
 )
index 99b7bb5..bd0843b 100644 (file)
 set(CUEW_EXTRA_ARGS)
 
 ExternalProject_Add(external_cuew
-       URL ${CUEW_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${CUEW_HASH}
-       PREFIX ${BUILD_DIR}/cuew
-       PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/cuew/src/external_cuew < ${PATCH_DIR}/cuew.diff
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/cuew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CUEW_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/cuew
+  URL ${CUEW_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${CUEW_HASH}
+  PREFIX ${BUILD_DIR}/cuew
+  PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/cuew/src/external_cuew < ${PATCH_DIR}/cuew.diff
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/cuew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CUEW_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/cuew
 )
index 8c523e2..2dd4261 100644 (file)
 # library itself does not depend on them, so should give no problems.
 
 set(EMBREE_EXTRA_ARGS
-       -DEMBREE_ISPC_SUPPORT=OFF
-       -DEMBREE_TUTORIALS=OFF
-       -DEMBREE_STATIC_LIB=ON
-       -DEMBREE_RAY_MASK=ON
-       -DEMBREE_FILTER_FUNCTION=ON
-       -DEMBREE_BACKFACE_CULLING=OFF
-       -DEMBREE_TASKING_SYSTEM=INTERNAL
-       -DEMBREE_MAX_ISA=AVX2
+  -DEMBREE_ISPC_SUPPORT=OFF
+  -DEMBREE_TUTORIALS=OFF
+  -DEMBREE_STATIC_LIB=ON
+  -DEMBREE_RAY_MASK=ON
+  -DEMBREE_FILTER_FUNCTION=ON
+  -DEMBREE_BACKFACE_CULLING=OFF
+  -DEMBREE_TASKING_SYSTEM=INTERNAL
+  -DEMBREE_MAX_ISA=AVX2
 )
 
 if(WIN32)
-       set(EMBREE_BUILD_DIR ${BUILD_MODE}/)
+  set(EMBREE_BUILD_DIR ${BUILD_MODE}/)
 else()
-       set(EMBREE_BUILD_DIR)
+  set(EMBREE_BUILD_DIR)
 endif()
 
 ExternalProject_Add(external_embree
-       URL ${EMBREE_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${EMBREE_HASH}
-       PREFIX ${BUILD_DIR}/embree
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/embree
+  URL ${EMBREE_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${EMBREE_HASH}
+  PREFIX ${BUILD_DIR}/embree
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/embree
 )
 if(WIN32)
 
-       if(BUILD_MODE STREQUAL Release)
-               ExternalProject_Add_Step(external_embree after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/embree ${HARVEST_TARGET}/embree
-                       DEPENDEES install
-               )
-       else()
-       ExternalProject_Add_Step(external_embree after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree3.lib ${HARVEST_TARGET}/embree/lib/embree3_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx.lib ${HARVEST_TARGET}/embree/lib/embree_avx_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx2.lib ${HARVEST_TARGET}/embree/lib/embree_avx2_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_sse42.lib ${HARVEST_TARGET}/embree/lib/embree_sse42_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/lexers.lib ${HARVEST_TARGET}/embree/lib/lexers_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/math.lib ${HARVEST_TARGET}/embree/lib/math_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/simd.lib ${HARVEST_TARGET}/embree/lib/simd_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/sys.lib ${HARVEST_TARGET}/embree/lib/sys_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/tasking.lib ${HARVEST_TARGET}/embree/lib/tasking_d.lib
-                       DEPENDEES install
-               )
-       endif()
+  if(BUILD_MODE STREQUAL Release)
+    ExternalProject_Add_Step(external_embree after_install
+      COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/embree ${HARVEST_TARGET}/embree
+      DEPENDEES install
+    )
+  else()
+  ExternalProject_Add_Step(external_embree after_install
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree3.lib ${HARVEST_TARGET}/embree/lib/embree3_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx.lib ${HARVEST_TARGET}/embree/lib/embree_avx_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx2.lib ${HARVEST_TARGET}/embree/lib/embree_avx2_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_sse42.lib ${HARVEST_TARGET}/embree/lib/embree_sse42_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/lexers.lib ${HARVEST_TARGET}/embree/lib/lexers_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/math.lib ${HARVEST_TARGET}/embree/lib/math_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/simd.lib ${HARVEST_TARGET}/embree/lib/simd_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/sys.lib ${HARVEST_TARGET}/embree/lib/sys_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/tasking.lib ${HARVEST_TARGET}/embree/lib/tasking_d.lib
+      DEPENDEES install
+    )
+  endif()
 
 endif()
index df940c4..0746fbd 100644 (file)
 set(FAAD_EXTRA_ARGS)
 
 if (WIN32)
-       set(FAAD_EXTRA_CONFIGURE "utils\\win32\\ac2ver.exe" "faad2" "configure.ac" > libfaad\\win32_ver.h)
+  set(FAAD_EXTRA_CONFIGURE "utils\\win32\\ac2ver.exe" "faad2" "configure.ac" > libfaad\\win32_ver.h)
 else()
-       set(FAAD_EXTRA_CONFIGURE echo .)
+  set(FAAD_EXTRA_CONFIGURE echo .)
 endif()
 
 ExternalProject_Add(external_faad
-       URL ${FAAD_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${FAAD_HASH}
-       PREFIX ${BUILD_DIR}/faad
-       CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && ${FAAD_EXTRA_CONFIGURE} && ${CONFIGURE_COMMAND} --disable-shared --enable-static --prefix=${LIBDIR}/faad
-       BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make -j${MAKE_THREADS}
-       INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make install
-       INSTALL_DIR ${LIBDIR}/faad
+  URL ${FAAD_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${FAAD_HASH}
+  PREFIX ${BUILD_DIR}/faad
+  CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && ${FAAD_EXTRA_CONFIGURE} && ${CONFIGURE_COMMAND} --disable-shared --enable-static --prefix=${LIBDIR}/faad
+  BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make -j${MAKE_THREADS}
+  INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make install
+  INSTALL_DIR ${LIBDIR}/faad
 )
 
 if(MSVC)
-       set_target_properties(external_faad PROPERTIES FOLDER Mingw)
+  set_target_properties(external_faad PROPERTIES FOLDER Mingw)
 endif()
index bc09320..aec9f5b 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 ExternalProject_Add(external_ffi
-       URL ${FFI_URI}
-       URL_HASH SHA256=${FFI_HASH}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       PREFIX ${BUILD_DIR}/ffi
-       CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ffi
-               --enable-shared=no
-               --enable-static=yes
-               --with-pic
-               --libdir=${LIBDIR}/ffi/lib/
-       BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make -j${MAKE_THREADS}
-       INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make install
-       PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/ffi/src/external_ffi < ${PATCH_DIR}/ffi.diff
-       INSTALL_DIR ${LIBDIR}/ffi
+  URL ${FFI_URI}
+  URL_HASH SHA256=${FFI_HASH}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  PREFIX ${BUILD_DIR}/ffi
+  CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ffi
+    --enable-shared=no
+    --enable-static=yes
+    --with-pic
+    --libdir=${LIBDIR}/ffi/lib/
+  BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make -j${MAKE_THREADS}
+  INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make install
+  PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/ffi/src/external_ffi < ${PATCH_DIR}/ffi.diff
+  INSTALL_DIR ${LIBDIR}/ffi
 )
 
 if (UNIX AND NOT APPLE)
-       ExternalProject_Add_Step(external_ffi after_install
-               COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/ffi/lib/libffi.a ${LIBDIR}/ffi/lib/libffi_pic.a
-               DEPENDEES install
-       )
+  ExternalProject_Add_Step(external_ffi after_install
+    COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/ffi/lib/libffi.a ${LIBDIR}/ffi/lib/libffi_pic.a
+    DEPENDEES install
+  )
 endif()
index 2a8e3fd..27d817e 100644 (file)
@@ -22,131 +22,131 @@ set(FFMPEG_EXTRA_FLAGS --pkg-config-flags=--static --extra-cflags=${FFMPEG_CFLAG
 set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR})
 
 if(WIN32)
-       set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
-       set(FFMPEG_EXTRA_FLAGS
-               ${FFMPEG_EXTRA_FLAGS}
-               --disable-static
-               --enable-shared
-               --enable-w32threads
-               --disable-pthreads
-               --enable-libopenjpeg
-       )
-       if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
-               set(FFMPEG_EXTRA_FLAGS
-                       ${FFMPEG_EXTRA_FLAGS}
-                       --x86asmexe=yasm
-               )
-       endif()
+  set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
+  set(FFMPEG_EXTRA_FLAGS
+    ${FFMPEG_EXTRA_FLAGS}
+    --disable-static
+    --enable-shared
+    --enable-w32threads
+    --disable-pthreads
+    --enable-libopenjpeg
+  )
+  if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
+    set(FFMPEG_EXTRA_FLAGS
+      ${FFMPEG_EXTRA_FLAGS}
+      --x86asmexe=yasm
+    )
+  endif()
 else()
-       set(FFMPEG_EXTRA_FLAGS
-               ${FFMPEG_EXTRA_FLAGS}
-               --enable-static
-               --disable-shared
-               --enable-libopenjpeg
-       )
+  set(FFMPEG_EXTRA_FLAGS
+    ${FFMPEG_EXTRA_FLAGS}
+    --enable-static
+    --disable-shared
+    --enable-libopenjpeg
+  )
 endif()
 
 if(APPLE)
-       set(FFMPEG_EXTRA_FLAGS
-               ${FFMPEG_EXTRA_FLAGS}
-               --target-os=darwin
-               )
+  set(FFMPEG_EXTRA_FLAGS
+    ${FFMPEG_EXTRA_FLAGS}
+    --target-os=darwin
+    )
 endif()
 
 ExternalProject_Add(external_ffmpeg
-       URL ${FFMPEG_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${FFMPEG_HASH}
-       # OpenJpeg is compiled with pthread support on Linux, which is all fine and is what we
-       # want for maximum runtime performance, but due to static nature of that library we
-       # need to force ffmpeg to link against pthread, otherwise test program used by autoconf
-       # will fail. This patch does that in a way that is compatible with multiple distributions.
-       PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
-       PREFIX ${BUILD_DIR}/ffmpeg
-       CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} &&
-               cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ &&
-               ${FFMPEG_ENV} ${CONFIGURE_COMMAND_NO_TARGET} ${FFMPEG_EXTRA_FLAGS}
-               --disable-lzma
-               --disable-avfilter
-               --disable-vdpau
-               --disable-bzlib
-               --disable-libgsm
-               --disable-libspeex
-               --enable-libvpx
-               --prefix=${LIBDIR}/ffmpeg
-               --enable-libtheora
-               --enable-libvorbis
-               --enable-zlib
-               --enable-stripping
-               --enable-runtime-cpudetect
-               --disable-vaapi
-               --disable-nonfree
-               --enable-gpl
-               --disable-postproc
-               --enable-libmp3lame
-               --disable-librtmp
-               --enable-libx264
-               --enable-libxvid
-               --disable-libopencore-amrnb
-               --disable-libopencore-amrwb
-               --disable-libdc1394
-               --disable-version3
-               --disable-debug
-               --enable-optimizations
-               --disable-sse
-               --disable-ssse3
-               --enable-ffplay
-               --disable-openssl
-               --disable-securetransport
-               --disable-indev=avfoundation
-               --disable-indev=qtkit
-               --disable-sdl2
-               --disable-gnutls
-               --disable-videotoolbox
-               --disable-libxcb
-               --disable-xlib
-               --disable-audiotoolbox
-               --disable-cuvid
-               --disable-nvenc
-               --disable-indev=jack
-               --disable-indev=alsa
-               --disable-outdev=alsa
-               --disable-crystalhd
-               --disable-sndio
-       BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make -j${MAKE_THREADS}
-       INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make install
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ffmpeg ${DEFAULT_CMAKE_FLAGS}
-       INSTALL_DIR ${LIBDIR}/ffmpeg
+  URL ${FFMPEG_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${FFMPEG_HASH}
+  # OpenJpeg is compiled with pthread support on Linux, which is all fine and is what we
+  # want for maximum runtime performance, but due to static nature of that library we
+  # need to force ffmpeg to link against pthread, otherwise test program used by autoconf
+  # will fail. This patch does that in a way that is compatible with multiple distributions.
+  PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
+  PREFIX ${BUILD_DIR}/ffmpeg
+  CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} &&
+    cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ &&
+    ${FFMPEG_ENV} ${CONFIGURE_COMMAND_NO_TARGET} ${FFMPEG_EXTRA_FLAGS}
+    --disable-lzma
+    --disable-avfilter
+    --disable-vdpau
+    --disable-bzlib
+    --disable-libgsm
+    --disable-libspeex
+    --enable-libvpx
+    --prefix=${LIBDIR}/ffmpeg
+    --enable-libtheora
+    --enable-libvorbis
+    --enable-zlib
+    --enable-stripping
+    --enable-runtime-cpudetect
+    --disable-vaapi
+    --disable-nonfree
+    --enable-gpl
+    --disable-postproc
+    --enable-libmp3lame
+    --disable-librtmp
+    --enable-libx264
+    --enable-libxvid
+    --disable-libopencore-amrnb
+    --disable-libopencore-amrwb
+    --disable-libdc1394
+    --disable-version3
+    --disable-debug
+    --enable-optimizations
+    --disable-sse
+    --disable-ssse3
+    --enable-ffplay
+    --disable-openssl
+    --disable-securetransport
+    --disable-indev=avfoundation
+    --disable-indev=qtkit
+    --disable-sdl2
+    --disable-gnutls
+    --disable-videotoolbox
+    --disable-libxcb
+    --disable-xlib
+    --disable-audiotoolbox
+    --disable-cuvid
+    --disable-nvenc
+    --disable-indev=jack
+    --disable-indev=alsa
+    --disable-outdev=alsa
+    --disable-crystalhd
+    --disable-sndio
+  BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make -j${MAKE_THREADS}
+  INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make install
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ffmpeg ${DEFAULT_CMAKE_FLAGS}
+  INSTALL_DIR ${LIBDIR}/ffmpeg
 )
 
 if(MSVC)
-       set_target_properties(external_ffmpeg PROPERTIES FOLDER Mingw)
+  set_target_properties(external_ffmpeg PROPERTIES FOLDER Mingw)
 endif()
 
 add_dependencies(
-       external_ffmpeg
-       external_zlib
-       external_faad
-       external_openjpeg
-       external_xvidcore
-       external_x264
-       external_vpx
-       external_theora
-       external_vorbis
-       external_ogg
-       external_lame
+  external_ffmpeg
+  external_zlib
+  external_faad
+  external_openjpeg
+  external_xvidcore
+  external_x264
+  external_vpx
+  external_theora
+  external_vorbis
+  external_ogg
+  external_lame
 )
 if(WIN32)
-       add_dependencies(
-               external_ffmpeg
-               external_zlib_mingw
-       )
+  add_dependencies(
+    external_ffmpeg
+    external_zlib_mingw
+  )
 endif()
 
 if(BUILD_MODE STREQUAL Release AND WIN32)
-       ExternalProject_Add_Step(external_ffmpeg after_install
-               COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/include ${HARVEST_TARGET}/ffmpeg/include
-               COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/bin ${HARVEST_TARGET}/ffmpeg/lib
-               DEPENDEES install
-       )
+  ExternalProject_Add_Step(external_ffmpeg after_install
+    COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/include ${HARVEST_TARGET}/ffmpeg/include
+    COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/bin ${HARVEST_TARGET}/ffmpeg/lib
+    DEPENDEES install
+  )
 endif()
index d85d7bc..2d10cf6 100644 (file)
 set(FFTW_EXTRA_ARGS)
 
 if(WIN32)
-       set(FFTW3_ENV set CFLAGS=-fno-stack-check -fno-stack-protector -mno-stack-arg-probe -fno-lto &&)
-       set(FFTW3_PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/fftw3/src/external_fftw3 < ${PATCH_DIR}/fftw3.diff)
+  set(FFTW3_ENV set CFLAGS=-fno-stack-check -fno-stack-protector -mno-stack-arg-probe -fno-lto &&)
+  set(FFTW3_PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/fftw3/src/external_fftw3 < ${PATCH_DIR}/fftw3.diff)
 endif()
 
 ExternalProject_Add(external_fftw3
-       URL ${FFTW_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${FFTW_HASH}
-       PREFIX ${BUILD_DIR}/fftw3
-       CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${FFTW3_ENV} cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/fftw3
-       PATCH_COMMAND ${FFTW3_PATCH_COMMAND}
-       BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make     -j${MAKE_THREADS}
-       INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make install
-       INSTALL_DIR ${LIBDIR}/fftw3
+  URL ${FFTW_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${FFTW_HASH}
+  PREFIX ${BUILD_DIR}/fftw3
+  CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${FFTW3_ENV} cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/fftw3
+  PATCH_COMMAND ${FFTW3_PATCH_COMMAND}
+  BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make -j${MAKE_THREADS}
+  INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make install
+  INSTALL_DIR ${LIBDIR}/fftw3
 )
 
 if(MSVC)
-       set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
-       if(BUILD_MODE STREQUAL Release)
-               ExternalProject_Add_Step(external_fftw3 after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h
-                       DEPENDEES install
-               )
-       endif()
+  set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
+  if(BUILD_MODE STREQUAL Release)
+    ExternalProject_Add_Step(external_fftw3 after_install
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h
+      DEPENDEES install
+    )
+  endif()
 endif()
index f5ef580..2cc9a02 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 ExternalProject_Add(external_flac
-       URL ${FLAC_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH SHA256=${FLAC_HASH}
-       PREFIX ${BUILD_DIR}/flac
-       CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/flac --disable-shared --enable-static
-       BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make -j${MAKE_THREADS}
-       INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make install
-       INSTALL_DIR ${LIBDIR}/flac
+  URL ${FLAC_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH SHA256=${FLAC_HASH}
+  PREFIX ${BUILD_DIR}/flac
+  CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/flac --disable-shared --enable-static
+  BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make -j${MAKE_THREADS}
+  INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make install
+  INSTALL_DIR ${LIBDIR}/flac
 )
 
 if(MSVC)
-       set_target_properties(external_flac PROPERTIES FOLDER Mingw)
+  set_target_properties(external_flac PROPERTIES FOLDER Mingw)
 endif()
index f2908e1..d4363eb 100644 (file)
 set(FLEXBISON_EXTRA_ARGS)
 
 ExternalProject_Add(external_flexbison
-       URL ${FLEXBISON_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${FLEXBISON_HASH}
-       PREFIX ${BUILD_DIR}/flexbison
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/flexbison ${DEFAULT_CMAKE_FLAGS} ${FLEXBISON_EXTRA_ARGS}
-       CONFIGURE_COMMAND echo .
-       BUILD_COMMAND echo .
-       INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/flexbison/src/external_flexbison/ ${LIBDIR}/flexbison/
-       INSTALL_DIR ${LIBDIR}/flexbison
+  URL ${FLEXBISON_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${FLEXBISON_HASH}
+  PREFIX ${BUILD_DIR}/flexbison
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/flexbison ${DEFAULT_CMAKE_FLAGS} ${FLEXBISON_EXTRA_ARGS}
+  CONFIGURE_COMMAND echo .
+  BUILD_COMMAND echo .
+  INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/flexbison/src/external_flexbison/ ${LIBDIR}/flexbison/
+  INSTALL_DIR ${LIBDIR}/flexbison
 )
index 043b382..39b09f9 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 if(WIN32)
-       if(BUILD_MODE STREQUAL Release)
-               set(FREEGLUT_EXTRA_ARGS
-                       -DFREEGLUT_BUILD_SHARED_LIBS=Off
-                       -DFREEGLUT_BUILD_STATIC_LIBS=On
-               )
+  if(BUILD_MODE STREQUAL Release)
+    set(FREEGLUT_EXTRA_ARGS
+      -DFREEGLUT_BUILD_SHARED_LIBS=Off
+      -DFREEGLUT_BUILD_STATIC_LIBS=On
+    )
 
-               ExternalProject_Add(external_freeglut
-                       URL ${FREEGLUT_URI}
-                       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-                       URL_HASH MD5=${FREEGLUT_HASH}
-                       PREFIX ${BUILD_DIR}/freeglut
-                       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freeglut ${DEFAULT_C_FLAGS} ${DEFAULT_CXX_FLAGS} ${FREEGLUT_EXTRA_ARGS}
-                       INSTALL_DIR ${LIBDIR}/freeglut
-               )
-       endif()
+    ExternalProject_Add(external_freeglut
+      URL ${FREEGLUT_URI}
+      DOWNLOAD_DIR ${DOWNLOAD_DIR}
+      URL_HASH MD5=${FREEGLUT_HASH}
+      PREFIX ${BUILD_DIR}/freeglut
+      CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freeglut ${DEFAULT_C_FLAGS} ${DEFAULT_CXX_FLAGS} ${FREEGLUT_EXTRA_ARGS}
+      INSTALL_DIR ${LIBDIR}/freeglut
+    )
+  endif()
 endif()
index 1034e9f..f998c94 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 set(FREETYPE_EXTRA_ARGS
-       -DCMAKE_RELEASE_POSTFIX:STRING=2ST
-       -DCMAKE_DEBUG_POSTFIX:STRING=2ST_d
-       -DWITH_BZip2=OFF
-       -DWITH_HarfBuzz=OFF
-       -DFT_WITH_HARFBUZZ=OFF
-       -DFT_WITH_BZIP2=OFF
-       -DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
-       -DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE)
+  -DCMAKE_RELEASE_POSTFIX:STRING=2ST
+  -DCMAKE_DEBUG_POSTFIX:STRING=2ST_d
+  -DWITH_BZip2=OFF
+  -DWITH_HarfBuzz=OFF
+  -DFT_WITH_HARFBUZZ=OFF
+  -DFT_WITH_BZIP2=OFF
+  -DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
+  -DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE)
 
 ExternalProject_Add(external_freetype
-       URL ${FREETYPE_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${FREETYPE_HASH}
-       PREFIX ${BUILD_DIR}/freetype
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freetype ${DEFAULT_CMAKE_FLAGS} ${FREETYPE_EXTRA_ARGS}
-       PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/freetype/src/external_freetype < ${PATCH_DIR}/freetype.diff
-       INSTALL_DIR ${LIBDIR}/freetype
+  URL ${FREETYPE_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${FREETYPE_HASH}
+  PREFIX ${BUILD_DIR}/freetype
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freetype ${DEFAULT_CMAKE_FLAGS} ${FREETYPE_EXTRA_ARGS}
+  PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/freetype/src/external_freetype < ${PATCH_DIR}/freetype.diff
+  INSTALL_DIR ${LIBDIR}/freetype
 )
 
 if(BUILD_MODE STREQUAL Release AND WIN32)
-       ExternalProject_Add_Step(external_freetype after_install
-               COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype
-               DEPENDEES install
-       )
+  ExternalProject_Add_Step(external_freetype after_install
+    COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype
+    DEPENDEES install
+  )
 endif()
index b5d9e4d..2f8b88e 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 set(GLEW_EXTRA_ARGS
-       -DBUILD_UTILS=Off
-       -DBUILD_SHARED_LIBS=Off
+  -DBUILD_UTILS=Off
+  -DBUILD_SHARED_LIBS=Off
 )
 
 ExternalProject_Add(external_glew
-       URL ${GLEW_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${GLEW_HASH}
-       PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_glew.txt ${BUILD_DIR}/glew/src/external_glew/CMakeLists.txt
-       PREFIX ${BUILD_DIR}/glew
-       CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glew ${DEFAULT_CMAKE_FLAGS} ${GLEW_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/glew
+  URL ${GLEW_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${GLEW_HASH}
+  PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_glew.txt ${BUILD_DIR}/glew/src/external_glew/CMakeLists.txt
+  PREFIX ${BUILD_DIR}/glew
+  CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glew ${DEFAULT_CMAKE_FLAGS} ${GLEW_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/glew
 )
index ae80080..3a61c19 100644 (file)
 set(GLFW_EXTRA_ARGS)
 
 ExternalProject_Add(external_glfw
-       URL ${GLFW_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${GLFW_HASH}
-       PREFIX ${BUILD_DIR}/glfw
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glfw -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${GLFW_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/glfw
+  URL ${GLFW_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${GLFW_HASH}
+  PREFIX ${BUILD_DIR}/glfw
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glfw -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${GLFW_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/glfw
 )
index 0e98780..27bcd18 100644 (file)
 ########################################################################
 
 if(NOT DEFINED HARVEST_TARGET)
-       set(HARVEST_TARGET ${CMAKE_CURRENT_SOURCE_DIR}/Harvest)
+  set(HARVEST_TARGET ${CMAKE_CURRENT_SOURCE_DIR}/Harvest)
 endif()
 message("HARVEST_TARGET = ${HARVEST_TARGET}")
 
 if(WIN32)
 if(BUILD_MODE STREQUAL Release)
-       add_custom_target(Harvest_Release_Results
-               COMMAND # jpeg rename libfile + copy include
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
-                               ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
-                               # OpenImageIO
-                               ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include &&
-                               ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib &&
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe &&
-                               # png
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
-                               ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
-                               # freeglut-> opengl
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
-                               ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
-                               # glew-> opengl
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib &&
-                               ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ &&
-                               # sndfile
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/lib/libsndfile.dll.a ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib &&
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll &&
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h &&
-                               # tiff
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiff.lib ${HARVEST_TARGET}/tiff/lib/libtiff.lib &&
-                               ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/ &&
-                               # BlendThumb
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb64/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb64.dll &&
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb32/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb.dll &&
-                               # hidapi
-                               ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hidapi/ ${HARVEST_TARGET}/hidapi/ &&
-                               # webp, straight up copy
-                               ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp &&
-               DEPENDS
-       )
+  add_custom_target(Harvest_Release_Results
+    COMMAND # jpeg rename libfile + copy include
+        ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
+        ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
+        # OpenImageIO
+        ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include &&
+        ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib &&
+        ${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe &&
+        # png
+        ${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
+        ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
+        # freeglut-> opengl
+        ${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
+        ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
+        # glew-> opengl
+        ${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib &&
+        ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ &&
+        # sndfile
+        ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/lib/libsndfile.dll.a ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib &&
+        ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll &&
+        ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h &&
+        # tiff
+        ${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiff.lib ${HARVEST_TARGET}/tiff/lib/libtiff.lib &&
+        ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/ &&
+        # BlendThumb
+        ${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb64/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb64.dll &&
+        ${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb32/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb.dll &&
+        # hidapi
+        ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hidapi/ ${HARVEST_TARGET}/hidapi/ &&
+        # webp, straight up copy
+        ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp &&
+    DEPENDS
+  )
 endif()
 
 if(BUILD_MODE STREQUAL Debug)
-       add_custom_target(Harvest_Debug_Results
-                               # OpenImageIO
-               COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib &&
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib &&
-                               # python
-                               ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
-                               # hdf5
-                               ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5/lib ${HARVEST_TARGET}/hdf5/lib &&
-                               # numpy
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz &&
-                               # python
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz
-               DEPENDS Package_Python
-       )
+  add_custom_target(Harvest_Debug_Results
+        # OpenImageIO
+    COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib &&
+        ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib &&
+        # python
+        ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
+        # hdf5
+        ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5/lib ${HARVEST_TARGET}/hdf5/lib &&
+        # numpy
+        ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz &&
+        # python
+        ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz
+    DEPENDS Package_Python
+  )
 endif()
 
 else(WIN32)
 
 function(harvest from to)
-       set(pattern "")
-       foreach(f ${ARGN})
-               set(pattern ${f})
-       endforeach()
+  set(pattern "")
+  foreach(f ${ARGN})
+    set(pattern ${f})
+  endforeach()
 
-       if(pattern STREQUAL "")
-               get_filename_component(dirpath ${to} DIRECTORY)
-               get_filename_component(filename ${to} NAME)
-               install(
-                       FILES ${LIBDIR}/${from}
-                       DESTINATION ${HARVEST_TARGET}/${dirpath}
-                       RENAME ${filename})
-       else()
-               install(
-                       DIRECTORY ${LIBDIR}/${from}/
-                       DESTINATION ${HARVEST_TARGET}/${to}
-                       USE_SOURCE_PERMISSIONS
-                       FILES_MATCHING PATTERN ${pattern}
-                       PATTERN "pkgconfig" EXCLUDE
-                       PATTERN "cmake" EXCLUDE
-                       PATTERN "__pycache__" EXCLUDE
-                       PATTERN "tests" EXCLUDE)
-       endif()
+  if(pattern STREQUAL "")
+    get_filename_component(dirpath ${to} DIRECTORY)
+    get_filename_component(filename ${to} NAME)
+    install(
+      FILES ${LIBDIR}/${from}
+      DESTINATION ${HARVEST_TARGET}/${dirpath}
+      RENAME ${filename})
+  else()
+    install(
+      DIRECTORY ${LIBDIR}/${from}/
+      DESTINATION ${HARVEST_TARGET}/${to}
+      USE_SOURCE_PERMISSIONS
+      FILES_MATCHING PATTERN ${pattern}
+      PATTERN "pkgconfig" EXCLUDE
+      PATTERN "cmake" EXCLUDE
+      PATTERN "__pycache__" EXCLUDE
+      PATTERN "tests" EXCLUDE)
+  endif()
 endfunction()
 
 harvest(alembic/include alembic/include "*.h")
@@ -134,25 +134,25 @@ harvest(llvm/include llvm/include "*")
 harvest(llvm/bin llvm/bin "llvm-config")
 harvest(llvm/lib llvm/lib "libLLVM*.a")
 if(APPLE)
-       harvest(openmp/lib openmp/lib "*")
-       harvest(openmp/include openmp/include "*.h")
+  harvest(openmp/lib openmp/lib "*")
+  harvest(openmp/include openmp/include "*.h")
 endif()
 harvest(ogg/lib ffmpeg/lib "*.a")
 harvest(openal/include openal/include "*.h")
 if(UNIX AND NOT APPLE)
-       harvest(openal/lib openal/lib "*.a")
+  harvest(openal/lib openal/lib "*.a")
 
-       harvest(blosc/include blosc/include "*.h")
-       harvest(blosc/lib blosc/lib "*.a")
+  harvest(blosc/include blosc/include "*.h")
+  harvest(blosc/lib blosc/lib "*.a")
 
-       harvest(zlib/include zlib/include "*.h")
-       harvest(zlib/lib zlib/lib "*.a")
+  harvest(zlib/include zlib/include "*.h")
+  harvest(zlib/lib zlib/lib "*.a")
 
-       harvest(xml2/include xml2/include "*.h")
-       harvest(xml2/lib xml2/lib "*.a")
+  harvest(xml2/include xml2/include "*.h")
+  harvest(xml2/lib xml2/lib "*.a")
 else()
-       harvest(blosc/lib openvdb/lib "*.a")
-       harvest(xml2/lib opencollada/lib "*.a")
+  harvest(blosc/lib openvdb/lib "*.a")
+  harvest(xml2/lib opencollada/lib "*.a")
 endif()
 harvest(opencollada/include/opencollada opencollada/include "*.h")
 harvest(opencollada/lib/opencollada opencollada/lib "*.a")
index 63ad147..e289030 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 set(HDF5_EXTRA_ARGS
-       -DHDF5_ENABLE_THREADSAFE=Off
-       -DHDF5_BUILD_CPP_LIB=Off
-       -DBUILD_TESTING=Off
-       -DHDF5_BUILD_TOOLS=Off
-       -DHDF5_BUILD_EXAMPLES=Off
-       -DHDF5_BUILD_HL_LIB=On
-       -DBUILD_STATIC_CRT_LIBS=On
-       -DBUILD_SHARED_LIBS=On
+  -DHDF5_ENABLE_THREADSAFE=Off
+  -DHDF5_BUILD_CPP_LIB=Off
+  -DBUILD_TESTING=Off
+  -DHDF5_BUILD_TOOLS=Off
+  -DHDF5_BUILD_EXAMPLES=Off
+  -DHDF5_BUILD_HL_LIB=On
+  -DBUILD_STATIC_CRT_LIBS=On
+  -DBUILD_SHARED_LIBS=On
 )
 
 if(WIN32)
-       set(HDF5_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/hdf5/src/external_hdf5 < ${PATCH_DIR}/hdf5.diff)
+  set(HDF5_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/hdf5/src/external_hdf5 < ${PATCH_DIR}/hdf5.diff)
 endif()
 
 ExternalProject_Add(external_hdf5
-       URL ${HDF5_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${HDF5_HASH}
-       PREFIX ${BUILD_DIR}/hdf5
-       PATCH_COMMAND ${HDF5_PATCH}
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hdf5 ${HDF5_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/hdf5
+  URL ${HDF5_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${HDF5_HASH}
+  PREFIX ${BUILD_DIR}/hdf5
+  PATCH_COMMAND ${HDF5_PATCH}
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hdf5 ${HDF5_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/hdf5
 )
index cfa4cc5..9a3d2eb 100644 (file)
 set(HIDAPI_EXTRA_ARGS)
 
 ExternalProject_Add(external_hidapi
-       URL ${HIDAPI_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${HIDAPI_HASH}
-       PREFIX ${BUILD_DIR}/hidapi
-       PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_hidapi.txt       ${BUILD_DIR}/hidapi/src/external_hidapi/cmakelists.txt && ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/hidapi/src/external_hidapi < ${PATCH_DIR}/hidapi.diff
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hidapi -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${HIDAPI_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/hidapi
+  URL ${HIDAPI_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${HIDAPI_HASH}
+  PREFIX ${BUILD_DIR}/hidapi
+  PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_hidapi.txt   ${BUILD_DIR}/hidapi/src/external_hidapi/cmakelists.txt && ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/hidapi/src/external_hidapi < ${PATCH_DIR}/hidapi.diff
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hidapi -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${HIDAPI_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/hidapi
 )
index 18f8f60..5be6773 100644 (file)
 set(ICONV_EXTRA_ARGS)
 
 ExternalProject_Add(external_iconv
-       URL ${ICONV_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${ICONV_HASH}
-       PREFIX ${BUILD_DIR}/iconv
-       CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/iconv
-       BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make -j${MAKE_THREADS}
-       INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make install
-       INSTALL_DIR ${LIBDIR}/iconv
+  URL ${ICONV_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${ICONV_HASH}
+  PREFIX ${BUILD_DIR}/iconv
+  CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/iconv
+  BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make -j${MAKE_THREADS}
+  INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make install
+  INSTALL_DIR ${LIBDIR}/iconv
 )
 
 if(MSVC)
-       set_target_properties(external_iconv PROPERTIES FOLDER Mingw)
-       if(BUILD_MODE STREQUAL Release)
-               ExternalProject_Add_Step(external_iconv after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/lib/libiconv.a ${HARVEST_TARGET}/iconv/lib/iconv.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/include/iconv.h ${HARVEST_TARGET}/iconv/include/iconv.h
-                       DEPENDEES install
-               )
-       endif()
+  set_target_properties(external_iconv PROPERTIES FOLDER Mingw)
+  if(BUILD_MODE STREQUAL Release)
+    ExternalProject_Add_Step(external_iconv after_install
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/lib/libiconv.a ${HARVEST_TARGET}/iconv/lib/iconv.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/include/iconv.h ${HARVEST_TARGET}/iconv/include/iconv.h
+      DEPENDEES install
+    )
+  endif()
 endif()
index 22be39c..97761b4 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 if(WIN32)
-       set(ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
-       set(ILMBASE_EXTRA_ARGS
-               -DBUILD_SHARED_LIBS=OFF
-               -DCMAKE_CXX_STANDARD_LIBRARIES=${ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES}
-       )
+  set(ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
+  set(ILMBASE_EXTRA_ARGS
+    -DBUILD_SHARED_LIBS=OFF
+    -DCMAKE_CXX_STANDARD_LIBRARIES=${ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES}
+  )
 
-       ExternalProject_Add(external_ilmbase
-               URL ${ILMBASE_URI}
-               DOWNLOAD_DIR ${DOWNLOAD_DIR}
-               URL_HASH MD5=${ILMBASE_HASH}
-               PREFIX ${BUILD_DIR}/ilmbase
-               CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ilmbase ${DEFAULT_CMAKE_FLAGS} ${ILMBASE_EXTRA_ARGS}
-               INSTALL_DIR ${LIBDIR}/openexr
-       )
+  ExternalProject_Add(external_ilmbase
+    URL ${ILMBASE_URI}
+    DOWNLOAD_DIR ${DOWNLOAD_DIR}
+    URL_HASH MD5=${ILMBASE_HASH}
+    PREFIX ${BUILD_DIR}/ilmbase
+    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ilmbase ${DEFAULT_CMAKE_FLAGS} ${ILMBASE_EXTRA_ARGS}
+    INSTALL_DIR ${LIBDIR}/openexr
+  )
 
-       if(BUILD_MODE STREQUAL Release)
-               ExternalProject_Add_Step(external_ilmbase after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ilmbase ${HARVEST_TARGET}/openexr
-                       DEPENDEES install
-               )
-       endif()
+  if(BUILD_MODE STREQUAL Release)
+    ExternalProject_Add_Step(external_ilmbase after_install
+      COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ilmbase ${HARVEST_TARGET}/openexr
+      DEPENDEES install
+    )
+  endif()
 
 else()
-       set(ILMBASE_EXTRA_ARGS
-               --enable-static
-               --disable-shared
-               --enable-cxxstd=11
-       )
-       ExternalProject_Add(external_ilmbase
-               URL ${ILMBASE_URI}
-               DOWNLOAD_DIR ${DOWNLOAD_DIR}
-               URL_HASH MD5=${ILMBASE_HASH}
-               PREFIX ${BUILD_DIR}/ilmbase
-               CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ilmbase ${ILMBASE_EXTRA_ARGS}
-               BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && make -j${MAKE_THREADS}
-               INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && make install
-               INSTALL_DIR ${LIBDIR}/openexr
-       )
+  set(ILMBASE_EXTRA_ARGS
+    --enable-static
+    --disable-shared
+    --enable-cxxstd=11
+  )
+  ExternalProject_Add(external_ilmbase
+    URL ${ILMBASE_URI}
+    DOWNLOAD_DIR ${DOWNLOAD_DIR}
+    URL_HASH MD5=${ILMBASE_HASH}
+    PREFIX ${BUILD_DIR}/ilmbase
+    CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ilmbase ${ILMBASE_EXTRA_ARGS}
+    BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && make -j${MAKE_THREADS}
+    INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ilmbase/src/external_ilmbase/ && make install
+    INSTALL_DIR ${LIBDIR}/openexr
+  )
 endif()
index c39ba44..30f584a 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 ExternalProject_Add(external_jemalloc
-       URL ${JEMALLOC_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${JEMALLOC_HASH}
-       PREFIX ${BUILD_DIR}/jemalloc
-       CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jemalloc --disable-shared --enable-static --with-pic
-       BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make -j${MAKE_THREADS}
-       INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make install
-       INSTALL_DIR ${LIBDIR}/jemalloc
+  URL ${JEMALLOC_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${JEMALLOC_HASH}
+  PREFIX ${BUILD_DIR}/jemalloc
+  CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jemalloc --disable-shared --enable-static --with-pic
+  BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make -j${MAKE_THREADS}
+  INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make install
+  INSTALL_DIR ${LIBDIR}/jemalloc
 )
index 9975bb9..47f526e 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 if(WIN32)
-       # cmake for windows
-       set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON  -DCMAKE_DEBUG_POSTFIX=d)
+  # cmake for windows
+  set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON  -DCMAKE_DEBUG_POSTFIX=d)
 
-       ExternalProject_Add(external_jpeg
-               URL ${JPEG_URI}
-               DOWNLOAD_DIR ${DOWNLOAD_DIR}
-               URL_HASH MD5=${JPEG_HASH}
-               PREFIX ${BUILD_DIR}/jpg
-               CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
-               INSTALL_DIR ${LIBDIR}/jpg
-       )
+  ExternalProject_Add(external_jpeg
+    URL ${JPEG_URI}
+    DOWNLOAD_DIR ${DOWNLOAD_DIR}
+    URL_HASH MD5=${JPEG_HASH}
+    PREFIX ${BUILD_DIR}/jpg
+    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
+    INSTALL_DIR ${LIBDIR}/jpg
+  )
 
-       if(BUILD_MODE STREQUAL Debug)
-               ExternalProject_Add_Step(external_jpeg after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpegd${LIBEXT}  ${LIBDIR}/jpg/lib/jpeg${LIBEXT}
-                       DEPENDEES install
-               )
-       endif()
+  if(BUILD_MODE STREQUAL Debug)
+    ExternalProject_Add_Step(external_jpeg after_install
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpegd${LIBEXT}  ${LIBDIR}/jpg/lib/jpeg${LIBEXT}
+      DEPENDEES install
+    )
+  endif()
 
-       if(BUILD_MODE STREQUAL Release)
-               set(JPEG_LIBRARY jpeg-static${LIBEXT})
-       else()
-               set(JPEG_LIBRARY jpeg-staticd${LIBEXT})
-       endif()
+  if(BUILD_MODE STREQUAL Release)
+    set(JPEG_LIBRARY jpeg-static${LIBEXT})
+  else()
+    set(JPEG_LIBRARY jpeg-staticd${LIBEXT})
+  endif()
 else(WIN32)
-       # autoconf for unix
-       if(APPLE)
-               set(JPEG_EXTRA_ARGS --host x86_64-apple-darwin --with-jpeg8)
-       else()
-               set(JPEG_EXTRA_ARGS --with-jpeg8)
-       endif()
+  # autoconf for unix
+  if(APPLE)
+    set(JPEG_EXTRA_ARGS --host x86_64-apple-darwin --with-jpeg8)
+  else()
+    set(JPEG_EXTRA_ARGS --with-jpeg8)
+  endif()
 
-       ExternalProject_Add(external_jpeg
-               URL ${JPEG_URI}
-               DOWNLOAD_DIR ${DOWNLOAD_DIR}
-               URL_HASH MD5=${JPEG_HASH}
-               CONFIGURE_COMMAND ${CONFIGURE_ENV} && autoreconf -fiv && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jpg NASM=yasm ${JPEG_EXTRA_ARGS}
-               BUILD_IN_SOURCE 1
-               BUILD_COMMAND ${CONFIGURE_ENV} && make install
-               PREFIX ${BUILD_DIR}/jpg
-               CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
-               INSTALL_DIR ${LIBDIR}/jpg
-       )
+  ExternalProject_Add(external_jpeg
+    URL ${JPEG_URI}
+    DOWNLOAD_DIR ${DOWNLOAD_DIR}
+    URL_HASH MD5=${JPEG_HASH}
+    CONFIGURE_COMMAND ${CONFIGURE_ENV} && autoreconf -fiv && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jpg NASM=yasm ${JPEG_EXTRA_ARGS}
+    BUILD_IN_SOURCE 1
+    BUILD_COMMAND ${CONFIGURE_ENV} && make install
+    PREFIX ${BUILD_DIR}/jpg
+    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
+    INSTALL_DIR ${LIBDIR}/jpg
+  )
 
-       set(JPEG_LIBRARY libjpeg${LIBEXT})
+  set(JPEG_LIBRARY libjpeg${LIBEXT})
 endif(WIN32)
index b7b9275..d60784e 100644 (file)
 
 set(LAME_EXTRA_ARGS)
 if(MSVC)
-       if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
-       set(LAME_EXTRA_ARGS CFLAGS=-msse)
-       endif()
+  if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
+  set(LAME_EXTRA_ARGS CFLAGS=-msse)
+  endif()
 endif()
 
 ExternalProject_Add(external_lame
-       URL ${LAME_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${LAME_HASH}
-       PREFIX ${BUILD_DIR}/lame
-       CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lame --disable-shared --enable-static ${LAME_EXTRA_ARGS}
-               --enable-export=full
-               --with-fileio=sndfile
-               --without-vorbis
-               --with-pic
-               --disable-mp3x
-               --disable-mp3rtp
-               --disable-gtktest
-               --disable-frontend
-       BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make -j${MAKE_THREADS}
-       INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make install
-       INSTALL_DIR ${LIBDIR}/lame
+  URL ${LAME_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${LAME_HASH}
+  PREFIX ${BUILD_DIR}/lame
+  CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lame --disable-shared --enable-static ${LAME_EXTRA_ARGS}
+    --enable-export=full
+    --with-fileio=sndfile
+    --without-vorbis
+    --with-pic
+    --disable-mp3x
+    --disable-mp3rtp
+    --disable-gtktest
+    --disable-frontend
+  BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make -j${MAKE_THREADS}
+  INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make install
+  INSTALL_DIR ${LIBDIR}/lame
 )
 
 if(MSVC)
-       set_target_properties(external_lame PROPERTIES FOLDER Mingw)
+  set_target_properties(external_lame PROPERTIES FOLDER Mingw)
 endif()
index 852d2b8..7e8f955 100644 (file)
@@ -20,12 +20,12 @@ set(LCMS_EXTRA_ARGS
 )
 
 ExternalProject_Add(external_lcms
-       URL ${LCMS_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${LCMS_HASH}
-       PREFIX ${BUILD_DIR}/lcms
-       #patch taken from ocio
-       PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_lcms.txt ${BUILD_DIR}/lcms/src/external_lcms/CMakeLists.txt
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lcms ${DEFAULT_CMAKE_FLAGS} ${LCMS_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/lcms
+  URL ${LCMS_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${LCMS_HASH}
+  PREFIX ${BUILD_DIR}/lcms
+  #patch taken from ocio
+  PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_lcms.txt ${BUILD_DIR}/lcms/src/external_lcms/CMakeLists.txt
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lcms ${DEFAULT_CMAKE_FLAGS} ${LCMS_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/lcms
 )
index e3386b9..8acf6b5 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 set(LLVM_EXTRA_ARGS
-       -DLLVM_USE_CRT_RELEASE=MT
-       -DLLVM_USE_CRT_DEBUG=MTd
-       -DLLVM_INCLUDE_TESTS=OFF
-       -DLLVM_TARGETS_TO_BUILD=X86
-       -DLLVM_INCLUDE_EXAMPLES=OFF
-       -DLLVM_ENABLE_TERMINFO=OFF
+  -DLLVM_USE_CRT_RELEASE=MT
+  -DLLVM_USE_CRT_DEBUG=MTd
+  -DLLVM_INCLUDE_TESTS=OFF
+  -DLLVM_TARGETS_TO_BUILD=X86
+  -DLLVM_INCLUDE_EXAMPLES=OFF
+  -DLLVM_ENABLE_TERMINFO=OFF
 )
 
 if(WIN32)
-       set(LLVM_GENERATOR "Ninja")
+  set(LLVM_GENERATOR "Ninja")
 else()
-       set(LLVM_GENERATOR "Unix Makefiles")
+  set(LLVM_GENERATOR "Unix Makefiles")
 endif()
 
 # short project name due to long filename issues on windows
 ExternalProject_Add(ll
-       URL ${LLVM_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${LLVM_HASH}
-       CMAKE_GENERATOR ${LLVM_GENERATOR}
-       PREFIX ${BUILD_DIR}/ll
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/llvm
+  URL ${LLVM_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${LLVM_HASH}
+  CMAKE_GENERATOR ${LLVM_GENERATOR}
+  PREFIX ${BUILD_DIR}/ll
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/llvm
 )
 
 if(MSVC)
-       if(BUILD_MODE STREQUAL Release)
-               set(LLVM_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/ ${HARVEST_TARGET}/llvm/ )
-       else()
-               set(LLVM_HARVEST_COMMAND
-                       ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
-                       ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/include/ ${HARVEST_TARGET}/llvm/debug/include/
-               )
-       endif()
-       ExternalProject_Add_Step(ll after_install
-               COMMAND ${LLVM_HARVEST_COMMAND}
-               DEPENDEES mkdir update patch download configure build install
-       )
+  if(BUILD_MODE STREQUAL Release)
+    set(LLVM_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/ ${HARVEST_TARGET}/llvm/ )
+  else()
+    set(LLVM_HARVEST_COMMAND
+      ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
+      ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/include/ ${HARVEST_TARGET}/llvm/debug/include/
+    )
+  endif()
+  ExternalProject_Add_Step(ll after_install
+    COMMAND ${LLVM_HARVEST_COMMAND}
+    DEPENDEES mkdir update patch download configure build install
+  )
 endif()
index ef8adde..ecceb11 100644 (file)
 set(LZMA_PATCH_CMD echo .)
 
 ExternalProject_Add(external_lzma
-       URL ${LZMA_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH SHA256=${LZMA_HASH}
-       PREFIX ${BUILD_DIR}/lzma
-       PATCH_COMMAND ${LZMA_PATCH_CMD}
-       CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lzma
-               --disable-shared
-       BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make -j${MAKE_THREADS}
-       INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make install
-       INSTALL_DIR ${LIBDIR}/lzma
+  URL ${LZMA_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH SHA256=${LZMA_HASH}
+  PREFIX ${BUILD_DIR}/lzma
+  PATCH_COMMAND ${LZMA_PATCH_CMD}
+  CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lzma
+    --disable-shared
+  BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make -j${MAKE_THREADS}
+  INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && make install
+  INSTALL_DIR ${LIBDIR}/lzma
 )
index 698fae4..1a6ffa9 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 if(MSVC)
-       if(BUILD_MODE STREQUAL Debug)
-               set(NUMPY_DIR_POSTFIX -pydebug)
-               set(NUMPY_ARCHIVE_POSTFIX d)
-               set(NUMPY_BUILD_OPTION --debug)
-       else()
-               set(NUMPY_DIR_POSTFIX)
-               set(NUMPY_ARCHIVE_POSTFIX)
-               set(NUMPY_BUILD_OPTION)
-       endif()
+  if(BUILD_MODE STREQUAL Debug)
+    set(NUMPY_DIR_POSTFIX -pydebug)
+    set(NUMPY_ARCHIVE_POSTFIX d)
+    set(NUMPY_BUILD_OPTION --debug)
+  else()
+    set(NUMPY_DIR_POSTFIX)
+    set(NUMPY_ARCHIVE_POSTFIX)
+    set(NUMPY_BUILD_OPTION)
+  endif()
 endif()
 
 set(NUMPY_POSTFIX)
 
 if(WIN32)
-       set(NUMPY_INSTALL
-               ${CMAKE_COMMAND} -E copy_directory "${BUILD_DIR}/python/src/external_python/run/lib/site-packages/numpy/core/include/numpy" "${LIBDIR}/python/include/python${PYTHON_SHORT_VERSION}/numpy" &&
-               ${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-${PYTHON_SHORT_VERSION}${NUMPY_DIR_POSTFIX}"
-               ${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz" "."
-       )
+  set(NUMPY_INSTALL
+    ${CMAKE_COMMAND} -E copy_directory "${BUILD_DIR}/python/src/external_python/run/lib/site-packages/numpy/core/include/numpy" "${LIBDIR}/python/include/python${PYTHON_SHORT_VERSION}/numpy" &&
+    ${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-${PYTHON_SHORT_VERSION}${NUMPY_DIR_POSTFIX}"
+    ${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz" "."
+  )
 else()
-       set(NUMPY_INSTALL echo .)
-       set(NUMPY_PATCH echo .)
+  set(NUMPY_INSTALL echo .)
+  set(NUMPY_PATCH echo .)
 endif()
 
 ExternalProject_Add(external_numpy
-       URL ${NUMPY_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${NUMPY_HASH}
-       PREFIX ${BUILD_DIR}/numpy
-       PATCH_COMMAND ${NUMPY_PATCH}
-       CONFIGURE_COMMAND ""
-       LOG_BUILD 1
-       BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install --old-and-unmanageable
-       INSTALL_COMMAND ${NUMPY_INSTALL}
+  URL ${NUMPY_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${NUMPY_HASH}
+  PREFIX ${BUILD_DIR}/numpy
+  PATCH_COMMAND ${NUMPY_PATCH}
+  CONFIGURE_COMMAND ""
+  LOG_BUILD 1
+  BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install --old-and-unmanageable
+  INSTALL_COMMAND ${NUMPY_INSTALL}
 )
 
 if(WIN32)
-       ExternalProject_Add_Step(external_numpy after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz
-                       DEPENDEES install
-               )
+  ExternalProject_Add_Step(external_numpy after_install
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz
+      DEPENDEES install
+    )
 endif()
 
 add_dependencies(
-       external_numpy
-       Make_Python_Environment
+  external_numpy
+  Make_Python_Environment
 )
index 1f69cee..e2d0f09 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 ExternalProject_Add(external_ogg
-       URL ${OGG_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH SHA256=${OGG_HASH}
-       PREFIX ${BUILD_DIR}/ogg
-       CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ogg --disable-shared --enable-static
-       BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make -j${MAKE_THREADS}
-       INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make install
-       INSTALL_DIR ${LIBDIR}/ogg
+  URL ${OGG_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH SHA256=${OGG_HASH}
+  PREFIX ${BUILD_DIR}/ogg
+  CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ogg --disable-shared --enable-static
+  BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make -j${MAKE_THREADS}
+  INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make install
+  INSTALL_DIR ${LIBDIR}/ogg
 )
 
 if(MSVC)
-       set_target_properties(external_ogg PROPERTIES FOLDER Mingw)
+  set_target_properties(external_ogg PROPERTIES FOLDER Mingw)
 endif()
index 7a693b1..44f6cdf 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 if(BUILD_MODE STREQUAL Release)
-       set(OPENAL_EXTRA_ARGS
-               -DALSOFT_UTILS=OFF
-               -DALSOFT_NO_CONFIG_UTIL=ON
-               -DALSOFT_EXAMPLES=OFF
-               -DALSOFT_TESTS=OFF
-               -DALSOFT_CONFIG=OFF
-               -DALSOFT_HRTF_DEFS=OFF
-               -DALSOFT_INSTALL=ON
-               -DALSOFT_BACKEND_SNDIO=OFF
-       )
+  set(OPENAL_EXTRA_ARGS
+    -DALSOFT_UTILS=OFF
+    -DALSOFT_NO_CONFIG_UTIL=ON
+    -DALSOFT_EXAMPLES=OFF
+    -DALSOFT_TESTS=OFF
+    -DALSOFT_CONFIG=OFF
+    -DALSOFT_HRTF_DEFS=OFF
+    -DALSOFT_INSTALL=ON
+    -DALSOFT_BACKEND_SNDIO=OFF
+  )
 
-       if(UNIX)
-               set(OPENAL_EXTRA_ARGS
-                       ${OPENAL_EXTRA_ARGS}
-                       -DLIBTYPE=STATIC
-               )
-       endif()
+  if(UNIX)
+    set(OPENAL_EXTRA_ARGS
+      ${OPENAL_EXTRA_ARGS}
+      -DLIBTYPE=STATIC
+    )
+  endif()
 
-       if(UNIX AND NOT APPLE)
-               # Ensure we have backends for playback.
-               set(OPENAL_EXTRA_ARGS
-                       ${OPENAL_EXTRA_ARGS}
-                       -DALSOFT_REQUIRE_ALSA=ON
-                       -DALSOFT_REQUIRE_OSS=ON
-                       -DALSOFT_REQUIRE_PULSEAUDIO=ON
-               )
-       endif()
+  if(UNIX AND NOT APPLE)
+    # Ensure we have backends for playback.
+    set(OPENAL_EXTRA_ARGS
+      ${OPENAL_EXTRA_ARGS}
+      -DALSOFT_REQUIRE_ALSA=ON
+      -DALSOFT_REQUIRE_OSS=ON
+      -DALSOFT_REQUIRE_PULSEAUDIO=ON
+    )
+  endif()
 
-       ExternalProject_Add(external_openal
-               URL ${OPENAL_URI}
-               DOWNLOAD_DIR ${DOWNLOAD_DIR}
-               URL_HASH MD5=${OPENAL_HASH}
-               PREFIX ${BUILD_DIR}/openal
-               CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
-               INSTALL_DIR ${LIBDIR}/openal
-               PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openal/src/external_openal < ${PATCH_DIR}/openal.diff
-       )
+  ExternalProject_Add(external_openal
+    URL ${OPENAL_URI}
+    DOWNLOAD_DIR ${DOWNLOAD_DIR}
+    URL_HASH MD5=${OPENAL_HASH}
+    PREFIX ${BUILD_DIR}/openal
+    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
+    INSTALL_DIR ${LIBDIR}/openal
+    PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openal/src/external_openal < ${PATCH_DIR}/openal.diff
+  )
 
-       if(WIN32)
-               ExternalProject_Add_Step(external_openal after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/lib/openal32.lib ${HARVEST_TARGET}/openal/lib/openal32.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/bin/openal32.dll ${HARVEST_TARGET}/openal/lib/openal32.dll
-                       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openal/include/ ${HARVEST_TARGET}/openal/include/
-                       DEPENDEES install
-               )
-       endif()
+  if(WIN32)
+    ExternalProject_Add_Step(external_openal after_install
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/lib/openal32.lib ${HARVEST_TARGET}/openal/lib/openal32.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/bin/openal32.dll ${HARVEST_TARGET}/openal/lib/openal32.dll
+      COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openal/include/ ${HARVEST_TARGET}/openal/include/
+      DEPENDEES install
+    )
+  endif()
 
 endif()
index ec3dcde..e1a8abc 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 if(UNIX)
-       set(OPENCOLLADA_EXTRA_ARGS
-               -DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
-               -DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2.a)
+  set(OPENCOLLADA_EXTRA_ARGS
+    -DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
+    -DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2.a)
 endif()
 
 ExternalProject_Add(external_opencollada
-       URL ${OPENCOLLADA_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${OPENCOLLADA_HASH}
-       PREFIX ${BUILD_DIR}/opencollada
-       PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencollada ${DEFAULT_CMAKE_FLAGS} ${OPENCOLLADA_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/opencollada
+  URL ${OPENCOLLADA_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${OPENCOLLADA_HASH}
+  PREFIX ${BUILD_DIR}/opencollada
+  PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencollada ${DEFAULT_CMAKE_FLAGS} ${OPENCOLLADA_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/opencollada
 )
 
 if(UNIX)
-       add_dependencies(
-               external_opencollada
-               external_xml2
-       )
+  add_dependencies(
+    external_opencollada
+    external_xml2
+  )
 endif()
 
 if(WIN32)
-       if(BUILD_MODE STREQUAL Release)
-               ExternalProject_Add_Step(external_opencollada after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/
-                       DEPENDEES install
-               )
-       endif()
-       if(BUILD_MODE STREQUAL Debug)
-               ExternalProject_Add_Step(external_opencollada after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/buffer.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/buffer_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/ftoa.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/ftoa_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/GeneratedSaxParser.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/GeneratedSaxParser_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/MathMLSolver.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/MathMLSolver_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADABaseUtils.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADABaseUtils_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAFramework.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAFramework_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/pcre.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/pcre_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/UTF.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/UTF_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/xml.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/xml_d.lib
-                       DEPENDEES install
-               )
-       endif()
+  if(BUILD_MODE STREQUAL Release)
+    ExternalProject_Add_Step(external_opencollada after_install
+      COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/
+      DEPENDEES install
+    )
+  endif()
+  if(BUILD_MODE STREQUAL Debug)
+    ExternalProject_Add_Step(external_opencollada after_install
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/buffer.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/buffer_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/ftoa.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/ftoa_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/GeneratedSaxParser.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/GeneratedSaxParser_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/MathMLSolver.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/MathMLSolver_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADABaseUtils.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADABaseUtils_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAFramework.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAFramework_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/pcre.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/pcre_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/UTF.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/UTF_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/xml.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/xml_d.lib
+      DEPENDEES install
+    )
+  endif()
 endif()
index c0187e8..0f6b8fe 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 set(OPENCOLORIO_EXTRA_ARGS
-       -DOCIO_BUILD_APPS=OFF
-       -DOCIO_BUILD_PYGLUE=OFF
-       -DOCIO_BUILD_NUKE=OFF
-       -DOCIO_USE_BOOST_PTR=OFF
-       -DOCIO_BUILD_STATIC=ON
-       -DOCIO_BUILD_SHARED=OFF
-       -DOCIO_BUILD_TRUELIGHT=OFF
-       -DOCIO_BUILD_DOCS=OFF
-       -DOCIO_BUILD_PYGLUE=OFF
-       -DOCIO_BUILD_JNIGLUE=OFF
-       -DOCIO_STATIC_JNIGLUE=OFF
+  -DOCIO_BUILD_APPS=OFF
+  -DOCIO_BUILD_PYGLUE=OFF
+  -DOCIO_BUILD_NUKE=OFF
+  -DOCIO_USE_BOOST_PTR=OFF
+  -DOCIO_BUILD_STATIC=ON
+  -DOCIO_BUILD_SHARED=OFF
+  -DOCIO_BUILD_TRUELIGHT=OFF
+  -DOCIO_BUILD_DOCS=OFF
+  -DOCIO_BUILD_PYGLUE=OFF
+  -DOCIO_BUILD_JNIGLUE=OFF
+  -DOCIO_STATIC_JNIGLUE=OFF
 )
 
 if(WIN32)
-       set(OCIO_PATCH opencolorio_win.diff)
-       set(OPENCOLORIO_EXTRA_ARGS
-               ${OPENCOLORIO_EXTRA_ARGS}
-               -DOCIO_BUILD_TESTS=OFF
-               -DOCIO_USE_SSE=ON
-               -DOCIO_INLINES_HIDDEN=OFF
-               -DOCIO_PYGLUE_LINK=OFF
-               -DOCIO_PYGLUE_RESPECT_ABI=OFF
-               -DOCIO_PYGLUE_SONAME=OFF
-               -DOCIO_PYGLUE_LIB_PREFIX=OFF
-               -DUSE_EXTERNAL_TINYXML=ON
-               -DTINYXML_INCLUDE_DIR=${LIBDIR}/tinyxml/include
-               -DTINYXML_LIBRARY=${LIBDIR}/tinyxml/lib/tinyxml${libext}
-               -DUSE_EXTERNAL_YAML=ON
-               -DYAML_CPP_FOUND=ON
-               -DYAML_CPP_VERSION=${YAMLCPP_VERSION}
-               -DUSE_EXTERNAL_LCMS=ON
-               -DINC_1=${LIBDIR}/tinyxml/include
-               -DINC_2=${LIBDIR}/yamlcpp/include
-               #lie because ocio cmake is demanding boost even though it is not needed
-               -DYAML_CPP_VERSION=0.5.0
-       )
+  set(OCIO_PATCH opencolorio_win.diff)
+  set(OPENCOLORIO_EXTRA_ARGS
+    ${OPENCOLORIO_EXTRA_ARGS}
+    -DOCIO_BUILD_TESTS=OFF
+    -DOCIO_USE_SSE=ON
+    -DOCIO_INLINES_HIDDEN=OFF
+    -DOCIO_PYGLUE_LINK=OFF
+    -DOCIO_PYGLUE_RESPECT_ABI=OFF
+    -DOCIO_PYGLUE_SONAME=OFF
+    -DOCIO_PYGLUE_LIB_PREFIX=OFF
+    -DUSE_EXTERNAL_TINYXML=ON
+    -DTINYXML_INCLUDE_DIR=${LIBDIR}/tinyxml/include
+    -DTINYXML_LIBRARY=${LIBDIR}/tinyxml/lib/tinyxml${libext}
+    -DUSE_EXTERNAL_YAML=ON
+    -DYAML_CPP_FOUND=ON
+    -DYAML_CPP_VERSION=${YAMLCPP_VERSION}
+    -DUSE_EXTERNAL_LCMS=ON
+    -DINC_1=${LIBDIR}/tinyxml/include
+    -DINC_2=${LIBDIR}/yamlcpp/include
+    #lie because ocio cmake is demanding boost even though it is not needed
+    -DYAML_CPP_VERSION=0.5.0
+  )
 else()
-       set(OCIO_PATCH opencolorio.diff)
-       set(OPENCOLORIO_EXTRA_ARGS
-               ${OPENCOLORIO_EXTRA_ARGS}
-       )
+  set(OCIO_PATCH opencolorio.diff)
+  set(OPENCOLORIO_EXTRA_ARGS
+    ${OPENCOLORIO_EXTRA_ARGS}
+  )
 endif()
 
 ExternalProject_Add(external_opencolorio
-       URL ${OPENCOLORIO_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${OPENCOLORIO_HASH}
-       PREFIX ${BUILD_DIR}/opencolorio
-       PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/${OCIO_PATCH}
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencolorio ${DEFAULT_CMAKE_FLAGS} ${OPENCOLORIO_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/opencolorio
+  URL ${OPENCOLORIO_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${OPENCOLORIO_HASH}
+  PREFIX ${BUILD_DIR}/opencolorio
+  PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/${OCIO_PATCH}
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencolorio ${DEFAULT_CMAKE_FLAGS} ${OPENCOLORIO_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/opencolorio
 )
 
 if(NOT WIN32)
-       add_custom_command(
-               OUTPUT ${LIBDIR}/opencolorio/lib/libtinyxml.a
-               COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libtinyxml.a ${LIBDIR}/opencolorio/lib/libtinyxml.a
-               COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libyaml-cpp.a ${LIBDIR}/opencolorio/lib/libyaml-cpp.a
-       )
-       add_custom_target(external_opencolorio_extra ALL DEPENDS external_opencolorio ${LIBDIR}/opencolorio/lib/libtinyxml.a)
+  add_custom_command(
+    OUTPUT ${LIBDIR}/opencolorio/lib/libtinyxml.a
+    COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libtinyxml.a ${LIBDIR}/opencolorio/lib/libtinyxml.a
+    COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libyaml-cpp.a ${LIBDIR}/opencolorio/lib/libyaml-cpp.a
+  )
+  add_custom_target(external_opencolorio_extra ALL DEPENDS external_opencolorio ${LIBDIR}/opencolorio/lib/libtinyxml.a)
 endif()
 
 add_dependencies(
-       external_opencolorio
-       external_boost
+  external_opencolorio
+  external_boost
 )
 
 if(WIN32)
-       add_dependencies(
-               external_opencolorio
-               external_tinyxml
-               external_yamlcpp
+  add_dependencies(
+    external_opencolorio
+    external_tinyxml
+    external_yamlcpp
 
-       )
-       if(BUILD_MODE STREQUAL Release)
-               ExternalProject_Add_Step(external_opencolorio after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/include ${HARVEST_TARGET}/opencolorio/include
-                       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib/static ${HARVEST_TARGET}/opencolorio/lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmt.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml.lib
-                       DEPENDEES install
-               )
-       endif()
-       if(BUILD_MODE STREQUAL Debug)
-               ExternalProject_Add_Step(external_opencolorio after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/lib/static/Opencolorio.lib ${HARVEST_TARGET}/opencolorio/lib/OpencolorIO_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmtd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml_d.lib
-                       DEPENDEES install
-               )
-       endif()
+  )
+  if(BUILD_MODE STREQUAL Release)
+    ExternalProject_Add_Step(external_opencolorio after_install
+      COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/include ${HARVEST_TARGET}/opencolorio/include
+      COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib/static ${HARVEST_TARGET}/opencolorio/lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmt.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml.lib
+      DEPENDEES install
+    )
+  endif()
+  if(BUILD_MODE STREQUAL Debug)
+    ExternalProject_Add_Step(external_opencolorio after_install
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/lib/static/Opencolorio.lib ${HARVEST_TARGET}/opencolorio/lib/OpencolorIO_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmtd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml_d.lib
+      DEPENDEES install
+    )
+  endif()
 
 endif()
index 59e9a46..7ac85ab 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 if(WIN32)
-       set(OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
-       set(OPENEXR_EXTRA_ARGS
-               -DCMAKE_CXX_STANDARD_LIBRARIES=${OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES}
-               -DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-               -DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-               -DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase
-               -DOPENEXR_BUILD_ILMBASE=On
-               -DOPENEXR_BUILD_OPENEXR=On
-               -DOPENEXR_BUILD_PYTHON_LIBS=Off
-               -DOPENEXR_BUILD_STATIC=On
-               -DOPENEXR_BUILD_SHARED=Off
-               -DOPENEXR_BUILD_TESTS=Off
-               -DOPENEXR_BUILD_VIEWERS=Off
-               -DOPENEXR_BUILD_UTILS=Off
-               -DOPENEXR_NAMESPACE_VERSIONING=Off
-       )
-       ExternalProject_Add(external_openexr
-               URL ${OPENEXR_URI}
-               DOWNLOAD_DIR ${DOWNLOAD_DIR}
-               URL_HASH MD5=${OPENEXR_HASH}
-               PREFIX ${BUILD_DIR}/openexr
-               CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openexr ${DEFAULT_CMAKE_FLAGS} ${OPENEXR_EXTRA_ARGS}
-               INSTALL_DIR ${LIBDIR}/openexr
-       )
+  set(OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
+  set(OPENEXR_EXTRA_ARGS
+    -DCMAKE_CXX_STANDARD_LIBRARIES=${OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES}
+    -DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
+    -DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
+    -DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase
+    -DOPENEXR_BUILD_ILMBASE=On
+    -DOPENEXR_BUILD_OPENEXR=On
+    -DOPENEXR_BUILD_PYTHON_LIBS=Off
+    -DOPENEXR_BUILD_STATIC=On
+    -DOPENEXR_BUILD_SHARED=Off
+    -DOPENEXR_BUILD_TESTS=Off
+    -DOPENEXR_BUILD_VIEWERS=Off
+    -DOPENEXR_BUILD_UTILS=Off
+    -DOPENEXR_NAMESPACE_VERSIONING=Off
+  )
+  ExternalProject_Add(external_openexr
+    URL ${OPENEXR_URI}
+    DOWNLOAD_DIR ${DOWNLOAD_DIR}
+    URL_HASH MD5=${OPENEXR_HASH}
+    PREFIX ${BUILD_DIR}/openexr
+    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openexr ${DEFAULT_CMAKE_FLAGS} ${OPENEXR_EXTRA_ARGS}
+    INSTALL_DIR ${LIBDIR}/openexr
+  )
 
-       ExternalProject_Add_Step(external_openexr after_install
-               COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/openexr/lib
-               #libs have moved between versions, just duplicate it for now.
-               COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${LIBDIR}/ilmbase/lib
-               COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/include ${HARVEST_TARGET}/openexr/include
-               DEPENDEES install
-       )
+  ExternalProject_Add_Step(external_openexr after_install
+    COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/openexr/lib
+    #libs have moved between versions, just duplicate it for now.
+    COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${LIBDIR}/ilmbase/lib
+    COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/include ${HARVEST_TARGET}/openexr/include
+    DEPENDEES install
+  )
 
 else()
-       set(OPENEXR_PKG_CONFIG_PATH ${LIBDIR}/zlib/share/pkgconfig)
-       set(OPENEXR_EXTRA_ARGS
-         --enable-static
-         --disable-shared
-         --enable-cxxstd=11
-         --with-ilmbase-prefix=${LIBDIR}/ilmbase
-         )
+  set(OPENEXR_PKG_CONFIG_PATH ${LIBDIR}/zlib/share/pkgconfig)
+  set(OPENEXR_EXTRA_ARGS
+    --enable-static
+    --disable-shared
+    --enable-cxxstd=11
+    --with-ilmbase-prefix=${LIBDIR}/ilmbase
+    )
 
-       ExternalProject_Add(external_openexr
-               URL ${OPENEXR_URI}
-               DOWNLOAD_DIR ${DOWNLOAD_DIR}
-               URL_HASH MD5=${OPENEXR_HASH}
-               PREFIX ${BUILD_DIR}/openexr
-               CONFIGURE_COMMAND ${CONFIGURE_ENV} && export PKG_CONFIG_PATH=${OPENEXR_PKG_CONFIG_PATH} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/openexr ${OPENEXR_EXTRA_ARGS}
-               BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && make -j${MAKE_THREADS}
-               INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && make install
-               INSTALL_DIR ${LIBDIR}/openexr
-       )
+  ExternalProject_Add(external_openexr
+    URL ${OPENEXR_URI}
+    DOWNLOAD_DIR ${DOWNLOAD_DIR}
+    URL_HASH MD5=${OPENEXR_HASH}
+    PREFIX ${BUILD_DIR}/openexr
+    CONFIGURE_COMMAND ${CONFIGURE_ENV} && export PKG_CONFIG_PATH=${OPENEXR_PKG_CONFIG_PATH} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/openexr ${OPENEXR_EXTRA_ARGS}
+    BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && make -j${MAKE_THREADS}
+    INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openexr/src/external_openexr/ && make install
+    INSTALL_DIR ${LIBDIR}/openexr
+  )
 endif()
 
 add_dependencies(
-       external_openexr
-       external_zlib
-       external_ilmbase
+  external_openexr
+  external_zlib
+  external_ilmbase
 )
index 73d1f4a..920e9ee 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 if(BUILD_MODE STREQUAL Release)
-       set(OIIO_TOOLS ON)
+  set(OIIO_TOOLS ON)
 else()
-       set(OIIO_TOOLS OFF)
+  set(OIIO_TOOLS OFF)
 endif()
 
 if(UNIX AND NOT APPLE)
-       # This causes linking to static pthread libraries which gives link errors.
-       # Since we manually specify library paths it should static link other libs.
-       set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=OFF)
+  # This causes linking to static pthread libraries which gives link errors.
+  # Since we manually specify library paths it should static link other libs.
+  set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=OFF)
 else()
-       set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=ON)
+  set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=ON)
 endif()
 
 if(WIN32)
-       set(PNG_LIBNAME libpng16_static${LIBEXT})
-       set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2 -DOPJ_STATIC=1)
-       set(OPENJPEG_POSTFIX _msvc)
+  set(PNG_LIBNAME libpng16_static${LIBEXT})
+  set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2 -DOPJ_STATIC=1)
+  set(OPENJPEG_POSTFIX _msvc)
 else()
-       set(PNG_LIBNAME libpng${LIBEXT})
-       set(OIIO_SIMD_FLAGS)
+  set(PNG_LIBNAME libpng${LIBEXT})
+  set(OIIO_SIMD_FLAGS)
 endif()
 
 if(WITH_WEBP)
-       set(WEBP_ARGS
-               -DWEBP_INCLUDE_DIR=${LIBDIR}/webp/include
-               -DWEBP_LIBRARY=${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT}
-       )
-       set(WEBP_DEP external_webp)
+  set(WEBP_ARGS
+    -DWEBP_INCLUDE_DIR=${LIBDIR}/webp/include
+    -DWEBP_LIBRARY=${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT}
+  )
+  set(WEBP_DEP external_webp)
 endif()
 
 if(MSVC)
-       set(OPENJPEG_FLAGS
-               -DOPENJPEG_HOME=${LIBDIR}/openjpeg_msvc
-               -DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg_msvc/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-               -DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
-               -DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
-       )
+  set(OPENJPEG_FLAGS
+    -DOPENJPEG_HOME=${LIBDIR}/openjpeg_msvc
+    -DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg_msvc/include/openjpeg-${OPENJPEG_SHORT_VERSION}
+    -DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
+    -DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
+  )
 else()
-       set(OPENJPEG_FLAGS
-               -DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-               -DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg/lib/${OPENJPEG_LIBRARY}
-       )
+  set(OPENJPEG_FLAGS
+    -DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION}
+    -DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg/lib/${OPENJPEG_LIBRARY}
+  )
 endif()
 
 set(OPENIMAGEIO_EXTRA_ARGS
-       -DBUILDSTATIC=ON
-       ${OPENIMAGEIO_LINKSTATIC}
-       -DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/openexr/
-       -DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-       -DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-       -DBoost_USE_MULTITHREADED=ON
-       -DBoost_USE_STATIC_LIBS=ON
-       -DBoost_USE_STATIC_RUNTIME=ON
-       -DBOOST_ROOT=${LIBDIR}/boost
-       -DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-       -DBoost_NO_SYSTEM_PATHS=ON
-       -OIIO_BUILD_CPP11=ON
-       -DUSE_OPENGL=OFF
-       -DUSE_TBB=OFF
-       -DUSE_FIELD3D=OFF
-       -DUSE_QT=OFF
-       -DUSE_PYTHON=OFF
-       -DUSE_GIF=OFF
-       -DUSE_OPENCV=OFF
-       -DUSE_OPENSSL=OFF
-       -DUSE_OPENJPEG=ON
-       -DUSE_FFMPEG=OFF
-       -DUSE_PTEX=OFF
-       -DUSE_FREETYPE=OFF
-       -DUSE_LIBRAW=OFF
-       -DUSE_PYTHON=OFF
-       -DUSE_PYTHON3=OFF
-       -DUSE_OCIO=OFF
-       -DUSE_WEBP=${WITH_WEBP}
-       -DOIIO_BUILD_TOOLS=${OIIO_TOOLS}
-       -DOIIO_BUILD_TESTS=OFF
-       -DBUILD_TESTING=OFF
-       -DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-       -DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
-       -DPNG_LIBRARY=${LIBDIR}/png/lib/${PNG_LIBNAME}
-       -DPNG_PNG_INCLUDE_DIR=${LIBDIR}/png/include
-       -DTIFF_LIBRARY=${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT}
-       -DTIFF_INCLUDE_DIR=${LIBDIR}/tiff/include
-       -DJPEG_LIBRARY=${LIBDIR}/jpg/lib/${JPEG_LIBRARY}
-       -DJPEG_INCLUDE_DIR=${LIBDIR}/jpg/include
-       ${OPENJPEG_FLAGS}
-       -DOCIO_PATH=${LIBDIR}/opencolorio/
-       -DOpenEXR_USE_STATIC_LIBS=On
-       -DOPENEXR_HOME=${LIBDIR}/openexr/
-       -DILMBASE_INCLUDE_PATH=${LIBDIR}/ilmbase/
-       -DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase/
-       -DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-       -DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-       -DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-       -DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-       -DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-       -DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-       -DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-       -DSTOP_ON_WARNING=OFF
-       ${WEBP_FLAGS}
-       ${OIIO_SIMD_FLAGS}
+  -DBUILDSTATIC=ON
+  ${OPENIMAGEIO_LINKSTATIC}
+  -DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/openexr/
+  -DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
+  -DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
+  -DBoost_USE_MULTITHREADED=ON
+  -DBoost_USE_STATIC_LIBS=ON
+  -DBoost_USE_STATIC_RUNTIME=ON
+  -DBOOST_ROOT=${LIBDIR}/boost
+  -DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
+  -DBoost_NO_SYSTEM_PATHS=ON
+  -OIIO_BUILD_CPP11=ON
+  -DUSE_OPENGL=OFF
+  -DUSE_TBB=OFF
+  -DUSE_FIELD3D=OFF
+  -DUSE_QT=OFF
+  -DUSE_PYTHON=OFF
+  -DUSE_GIF=OFF
+  -DUSE_OPENCV=OFF
+  -DUSE_OPENSSL=OFF
+  -DUSE_OPENJPEG=ON
+  -DUSE_FFMPEG=OFF
+  -DUSE_PTEX=OFF
+  -DUSE_FREETYPE=OFF
+  -DUSE_LIBRAW=OFF
+  -DUSE_PYTHON=OFF
+  -DUSE_PYTHON3=OFF
+  -DUSE_OCIO=OFF
+  -DUSE_WEBP=${WITH_WEBP}
+  -DOIIO_BUILD_TOOLS=${OIIO_TOOLS}
+  -DOIIO_BUILD_TESTS=OFF
+  -DBUILD_TESTING=OFF
+  -DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
+  -DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
+  -DPNG_LIBRARY=${LIBDIR}/png/lib/${PNG_LIBNAME}
+  -DPNG_PNG_INCLUDE_DIR=${LIBDIR}/png/include
+  -DTIFF_LIBRARY=${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT}
+  -DTIFF_INCLUDE_DIR=${LIBDIR}/tiff/include
+  -DJPEG_LIBRARY=${LIBDIR}/jpg/lib/${JPEG_LIBRARY}
+  -DJPEG_INCLUDE_DIR=${LIBDIR}/jpg/include
+  ${OPENJPEG_FLAGS}
+  -DOCIO_PATH=${LIBDIR}/opencolorio/
+  -DOpenEXR_USE_STATIC_LIBS=On
+  -DOPENEXR_HOME=${LIBDIR}/openexr/
+  -DILMBASE_INCLUDE_PATH=${LIBDIR}/ilmbase/
+  -DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase/
+  -DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
+  -DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
+  -DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
+  -DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
+  -DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
+  -DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
+  -DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
+  -DSTOP_ON_WARNING=OFF
+  ${WEBP_FLAGS}
+  ${OIIO_SIMD_FLAGS}
 )
 
 ExternalProject_Add(external_openimageio
-       URL ${OPENIMAGEIO_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${OPENIMAGEIO_HASH}
-       PREFIX ${BUILD_DIR}/openimageio
-       PATCH_COMMAND
-               ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/src/include < ${PATCH_DIR}/openimageio_gdi.diff &&
-               ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_static_libs.diff
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/openimageio
+  URL ${OPENIMAGEIO_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${OPENIMAGEIO_HASH}
+  PREFIX ${BUILD_DIR}/openimageio
+  PATCH_COMMAND
+    ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/src/include < ${PATCH_DIR}/openimageio_gdi.diff &&
+    ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_static_libs.diff
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/openimageio
 )
 
 add_dependencies(
-       external_openimageio
-       external_png external_zlib
-       external_ilmbase
-       external_openexr
-       external_jpeg
-       external_boost
-       external_tiff
-       external_opencolorio
-       external_openjpeg${OPENJPEG_POSTFIX}
-       ${WEBP_DEP}
+  external_openimageio
+  external_png external_zlib
+  external_ilmbase
+  external_openexr
+  external_jpeg
+  external_boost
+  external_tiff
+  external_opencolorio
+  external_openjpeg${OPENJPEG_POSTFIX}
+  ${WEBP_DEP}
 )
 if(NOT WIN32)
-       add_dependencies(
-               external_openimageio
-               external_opencolorio_extra
-       )
+  add_dependencies(
+    external_openimageio
+    external_opencolorio_extra
+  )
 endif()
index ae320b7..8cc5214 100644 (file)
 set(OPENJPEG_EXTRA_ARGS -DBUILD_SHARED_LIBS=OFF)
 
 if(WIN32)
-       set(OPENJPEG_EXTRA_ARGS -G "MSYS Makefiles" -DBUILD_PKGCONFIG_FILES=On)
+  set(OPENJPEG_EXTRA_ARGS -G "MSYS Makefiles" -DBUILD_PKGCONFIG_FILES=On)
 else()
-       set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
+  set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
 endif()
 
 ExternalProject_Add(external_openjpeg
-       URL ${OPENJPEG_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH SHA256=${OPENJPEG_HASH}
-       PREFIX ${BUILD_DIR}/openjpeg
-       CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build && ${CMAKE_COMMAND} ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF ${BUILD_DIR}/openjpeg/src/external_openjpeg
-       BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make -j${MAKE_THREADS}
-       INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make install
-       INSTALL_DIR ${LIBDIR}/openjpeg
+  URL ${OPENJPEG_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH SHA256=${OPENJPEG_HASH}
+  PREFIX ${BUILD_DIR}/openjpeg
+  CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build && ${CMAKE_COMMAND} ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF ${BUILD_DIR}/openjpeg/src/external_openjpeg
+  BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make -j${MAKE_THREADS}
+  INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make install
+  INSTALL_DIR ${LIBDIR}/openjpeg
 )
 
 #on windows ffmpeg wants a mingw build, while oiio needs a msvc build
 if(MSVC)
-       set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
-       ExternalProject_Add(external_openjpeg_msvc
-               URL ${OPENJPEG_URI}
-               DOWNLOAD_DIR ${DOWNLOAD_DIR}
-               URL_HASH SHA256=${OPENJPEG_HASH}
-               PREFIX ${BUILD_DIR}/openjpeg_msvc
-               CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF
-               INSTALL_DIR ${LIBDIR}/openjpeg_msvc
-       )
-       if(BUILD_MODE STREQUAL Release)
-               ExternalProject_Add_Step(external_openjpeg_msvc after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib &&
-                                       ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/include ${HARVEST_TARGET}/openjpeg/include
-                       DEPENDEES install
-               )
-       endif()
+  set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
+  ExternalProject_Add(external_openjpeg_msvc
+    URL ${OPENJPEG_URI}
+    DOWNLOAD_DIR ${DOWNLOAD_DIR}
+    URL_HASH SHA256=${OPENJPEG_HASH}
+    PREFIX ${BUILD_DIR}/openjpeg_msvc
+    CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF
+    INSTALL_DIR ${LIBDIR}/openjpeg_msvc
+  )
+  if(BUILD_MODE STREQUAL Release)
+    ExternalProject_Add_Step(external_openjpeg_msvc after_install
+      COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib &&
+          ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/include ${HARVEST_TARGET}/openjpeg/include
+      DEPENDEES install
+    )
+  endif()
 endif()
 
 set(OPENJPEG_LIBRARY libopenjp2${LIBEXT})
 if(MSVC)
-       set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)
+  set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)
 endif()
index f9f5a5c..05b590e 100644 (file)
 
 
 ExternalProject_Add(external_openmp
-       URL ${OPENMP_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${OPENMP_HASH}
-       PREFIX ${BUILD_DIR}/openmp
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openmp ${DEFAULT_CMAKE_FLAGS}
-       INSTALL_COMMAND cd ${BUILD_DIR}/openmp/src/external_openmp-build && install_name_tool -id @executable_path/../Resources/lib/libomp.dylib runtime/src/libomp.dylib && make install
-       INSTALL_DIR ${LIBDIR}/openmp
+  URL ${OPENMP_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${OPENMP_HASH}
+  PREFIX ${BUILD_DIR}/openmp
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openmp ${DEFAULT_CMAKE_FLAGS}
+  INSTALL_COMMAND cd ${BUILD_DIR}/openmp/src/external_openmp-build && install_name_tool -id @executable_path/../Resources/lib/libomp.dylib runtime/src/libomp.dylib && make install
+  INSTALL_DIR ${LIBDIR}/openmp
 )
 
 add_dependencies(
-       external_openmp
-       external_clang
+  external_openmp
+  external_clang
 )
index 2172744..a5cf4ef 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 set(OPENSUBDIV_EXTRA_ARGS
-       -DNO_EXAMPLES=ON
-       -DNO_REGRESSION=ON
-       -DNO_PYTHON=ON
-       -DNO_MAYA=ON
-       -DNO_PTEX=ON
-       -DNO_DOC=ON
-       -DNO_CLEW=OFF
-       -DNO_OPENCL=OFF
-       -DNO_TUTORIALS=ON
-       -DGLEW_INCLUDE_DIR=${LIBDIR}/glew/include
-       -DGLEW_LIBRARY=${LIBDIR}/glew/lib/libGLEW${LIBEXT}
-       -DGLFW_INCLUDE_DIR=${LIBDIR}/glfw/include
-       -DGLFW_LIBRARIES=${LIBDIR}/glfw/lib/glfw3${LIBEXT}
+  -DNO_EXAMPLES=ON
+  -DNO_REGRESSION=ON
+  -DNO_PYTHON=ON
+  -DNO_MAYA=ON
+  -DNO_PTEX=ON
+  -DNO_DOC=ON
+  -DNO_CLEW=OFF
+  -DNO_OPENCL=OFF
+  -DNO_TUTORIALS=ON
+  -DGLEW_INCLUDE_DIR=${LIBDIR}/glew/include
+  -DGLEW_LIBRARY=${LIBDIR}/glew/lib/libGLEW${LIBEXT}
+  -DGLFW_INCLUDE_DIR=${LIBDIR}/glfw/include
+  -DGLFW_LIBRARIES=${LIBDIR}/glfw/lib/glfw3${LIBEXT}
 )
 
 if(WIN32)
-       set(OPENSUBDIV_EXTRA_ARGS
-               ${OPENSUBDIV_EXTRA_ARGS}
-               -DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
-               -DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb_static.lib
-               -DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-               -DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
-               -DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-               -DCUEW_LIBRARY=${LIBDIR}/cuew/lib/cuew${LIBEXT}
-               -DCMAKE_EXE_LINKER_FLAGS_RELEASE=libcmt.lib
-       )
-       if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
-               set(OPENSUBDIV_EXTRA_ARGS
-                       ${OPENSUBDIV_EXTRA_ARGS}
-                       -DNO_CUDA=OFF
-               )
-       else()
-               set(OPENSUBDIV_EXTRA_ARGS
-                       ${OPENSUBDIV_EXTRA_ARGS}
-                       -DNO_CUDA=ON
-               )
-       endif()
+  set(OPENSUBDIV_EXTRA_ARGS
+    ${OPENSUBDIV_EXTRA_ARGS}
+    -DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
+    -DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb_static.lib
+    -DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
+    -DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
+    -DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
+    -DCUEW_LIBRARY=${LIBDIR}/cuew/lib/cuew${LIBEXT}
+    -DCMAKE_EXE_LINKER_FLAGS_RELEASE=libcmt.lib
+  )
+  if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+    set(OPENSUBDIV_EXTRA_ARGS
+      ${OPENSUBDIV_EXTRA_ARGS}
+      -DNO_CUDA=OFF
+    )
+  else()
+    set(OPENSUBDIV_EXTRA_ARGS
+      ${OPENSUBDIV_EXTRA_ARGS}
+      -DNO_CUDA=ON
+    )
+  endif()
 
 else()
-       set(OPENSUBDIV_EXTRA_ARGS
-               ${OPENSUBDIV_EXTRA_ARGS}
-               -DNO_CUDA=ON
-               -DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-               -DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-               -DCLEW_LIBRARY=${LIBDIR}/clew/lib/static/${LIBPREFIX}clew${LIBEXT}
-       )
+  set(OPENSUBDIV_EXTRA_ARGS
+    ${OPENSUBDIV_EXTRA_ARGS}
+    -DNO_CUDA=ON
+    -DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
+    -DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
+    -DCLEW_LIBRARY=${LIBDIR}/clew/lib/static/${LIBPREFIX}clew${LIBEXT}
+  )
 endif()
 
 ExternalProject_Add(external_opensubdiv
-       URL ${OPENSUBDIV_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${OPENSUBDIV_Hash}
-       PREFIX ${BUILD_DIR}/opensubdiv
-       PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/opensubdiv/src/external_opensubdiv < ${PATCH_DIR}/opensubdiv.diff
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/opensubdiv
+  URL ${OPENSUBDIV_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${OPENSUBDIV_Hash}
+  PREFIX ${BUILD_DIR}/opensubdiv
+  PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/opensubdiv/src/external_opensubdiv < ${PATCH_DIR}/opensubdiv.diff
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/opensubdiv
 )
 
 if(WIN32)
-       if(BUILD_MODE STREQUAL Release)
-               ExternalProject_Add_Step(external_opensubdiv after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/lib ${HARVEST_TARGET}/opensubdiv/lib
-                       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/include ${HARVEST_TARGET}/opensubdiv/include
-                       DEPENDEES install
-               )
-       endif()
-       if(BUILD_MODE STREQUAL Debug)
-               ExternalProject_Add_Step(external_opensubdiv after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdCPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdGPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib
-                       DEPENDEES install
-               )
-       endif()
+  if(BUILD_MODE STREQUAL Release)
+    ExternalProject_Add_Step(external_opensubdiv after_install
+      COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/lib ${HARVEST_TARGET}/opensubdiv/lib
+      COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/include ${HARVEST_TARGET}/opensubdiv/include
+      DEPENDEES install
+    )
+  endif()
+  if(BUILD_MODE STREQUAL Debug)
+    ExternalProject_Add_Step(external_opensubdiv after_install
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdCPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdGPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib
+      DEPENDEES install
+    )
+  endif()
 endif()
 
 add_dependencies(
-       external_opensubdiv
-       external_glew
-       external_glfw
-       external_clew
-       external_cuew
-       external_tbb
+  external_opensubdiv
+  external_glew
+  external_glfw
+  external_clew
+  external_cuew
+  external_tbb
 )
index 11456fa..215b3e8 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 if(BUILD_MODE STREQUAL Debug)
-       set(BLOSC_POST _d)
+  set(BLOSC_POST _d)
 endif()
 
 set(OPENVDB_EXTRA_ARGS
-       -DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-       -DBoost_USE_MULTITHREADED=ON
-       -DBoost_USE_STATIC_LIBS=ON
-       -DBoost_USE_STATIC_RUNTIME=ON
-       -DBOOST_ROOT=${LIBDIR}/boost
-       -DBoost_NO_SYSTEM_PATHS=ON
-       -DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-       -DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-       -DBLOSC_INCLUDE_DIR=${LIBDIR}/blosc/include/
-       -DBLOSC_blosc_LIBRARY=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
-       -DOPENVDB_ENABLE_3_ABI_COMPATIBLE=OFF
-       -DOPENVDB_BUILD_UNITTESTS=Off
-       -DOPENVDB_BUILD_PYTHON_MODULE=Off
-       -DGLEW_LOCATION=${LIBDIR}/glew/
-       -DBLOSC_LOCATION=${LIBDIR}/blosc/
-       -DTBB_LOCATION=${LIBDIR}/tbb/
-       -DTBB_ROOT=${LIBDIR}/tbb/
-       -DOPENEXR_LOCATION=${LIBDIR}/openexr
-       -DILMBASE_LOCATION=${LIBDIR}/ilmbase
-       -DIlmbase_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-       -DIlmbase_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-       -DIlmbase_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-       -DOpenexr_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-       -DTBB_LIBRARYDIR=${LIBDIR}/tbb/lib
-       -DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
-       -DTBB_LIBRARY_PATH=${LIBDIR}/tbb/lib
+  -DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
+  -DBoost_USE_MULTITHREADED=ON
+  -DBoost_USE_STATIC_LIBS=ON
+  -DBoost_USE_STATIC_RUNTIME=ON
+  -DBOOST_ROOT=${LIBDIR}/boost
+  -DBoost_NO_SYSTEM_PATHS=ON
+  -DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
+  -DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
+  -DBLOSC_INCLUDE_DIR=${LIBDIR}/blosc/include/
+  -DBLOSC_blosc_LIBRARY=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
+  -DOPENVDB_ENABLE_3_ABI_COMPATIBLE=OFF
+  -DOPENVDB_BUILD_UNITTESTS=Off
+  -DOPENVDB_BUILD_PYTHON_MODULE=Off
+  -DGLEW_LOCATION=${LIBDIR}/glew/
+  -DBLOSC_LOCATION=${LIBDIR}/blosc/
+  -DTBB_LOCATION=${LIBDIR}/tbb/
+  -DTBB_ROOT=${LIBDIR}/tbb/
+  -DOPENEXR_LOCATION=${LIBDIR}/openexr
+  -DILMBASE_LOCATION=${LIBDIR}/ilmbase
+  -DIlmbase_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
+  -DIlmbase_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
+  -DIlmbase_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
+  -DOpenexr_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
+  -DTBB_LIBRARYDIR=${LIBDIR}/tbb/lib
+  -DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
+  -DTBB_LIBRARY_PATH=${LIBDIR}/tbb/lib
 )
 
 if(WIN32)
-       # Namespaces seem to be buggy and cause linker errors due to things not
-       # being in the correct namespace
-       # needs to link pthreads due to it being a blosc dependency
-       set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-               -DOPENEXR_NAMESPACE_VERSIONING=OFF
-               -DEXTRA_LIBS:FILEPATH=${LIBDIR}/pthreads/lib/pthreadVC3.lib
-       )
-       if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
-               set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-                       -DCMAKE_SHARED_LINKER_FLAGS="/safeseh:no"
-                       -DCMAKE_EXE_LINKER_FLAGS="/safeseh:no"
-               )
-       endif()
+  # Namespaces seem to be buggy and cause linker errors due to things not
+  # being in the correct namespace
+  # needs to link pthreads due to it being a blosc dependency
+  set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
+    -DOPENEXR_NAMESPACE_VERSIONING=OFF
+    -DEXTRA_LIBS:FILEPATH=${LIBDIR}/pthreads/lib/pthreadVC3.lib
+  )
+  if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
+    set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
+      -DCMAKE_SHARED_LINKER_FLAGS="/safeseh:no"
+      -DCMAKE_EXE_LINKER_FLAGS="/safeseh:no"
+    )
+  endif()
 endif()
 
 ExternalProject_Add(openvdb
-       URL ${OPENVDB_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${OPENVDB_HASH}
-       PREFIX ${BUILD_DIR}/openvdb
-       PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb.diff
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openvdb ${DEFAULT_CMAKE_FLAGS} ${OPENVDB_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/openvdb
+  URL ${OPENVDB_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${OPENVDB_HASH}
+  PREFIX ${BUILD_DIR}/openvdb
+  PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb.diff
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openvdb ${DEFAULT_CMAKE_FLAGS} ${OPENVDB_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/openvdb
 )
 
 add_dependencies(
-       openvdb
-       external_tbb
-       external_boost
-       external_ilmbase
-       external_openexr
-       external_zlib
-       external_blosc
+  openvdb
+  external_tbb
+  external_boost
+  external_ilmbase
+  external_openexr
+  external_zlib
+  external_blosc
 )
 
 if(WIN32)
-       if(BUILD_MODE STREQUAL Release)
-               ExternalProject_Add_Step(openvdb after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include ${HARVEST_TARGET}/openvdb/include
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
-                       DEPENDEES install
-               )
-       endif()
-       if(BUILD_MODE STREQUAL Debug)
-               ExternalProject_Add_Step(openvdb after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
-                       DEPENDEES install
-               )
-       endif()
+  if(BUILD_MODE STREQUAL Release)
+    ExternalProject_Add_Step(openvdb after_install
+      COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include ${HARVEST_TARGET}/openvdb/include
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
+      DEPENDEES install
+    )
+  endif()
+  if(BUILD_MODE STREQUAL Debug)
+    ExternalProject_Add_Step(openvdb after_install
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
+      DEPENDEES install
+    )
+  endif()
 endif()
index ac36c89..d7acf25 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 if(WIN32)
-       option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/lapack/fftw3 by installing mingw64" ON)
+  option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/lapack/fftw3 by installing mingw64" ON)
 endif()
 option(WITH_WEBP "Enable building of oiio with webp support" OFF)
 option(WITH_EMBREE "Enable building of Embree" OFF)
 set(MAKE_THREADS 1 CACHE STRING "Number of threads to run make with")
 
 if(NOT BUILD_MODE)
-       set(BUILD_MODE "Release")
-       message(STATUS "Build type not specified: defaulting to a release build.")
+  set(BUILD_MODE "Release")
+  message(STATUS "Build type not specified: defaulting to a release build.")
 endif()
 message("BuildMode = ${BUILD_MODE}")
 
 if(BUILD_MODE STREQUAL "Debug")
-       set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Debug)
+  set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Debug)
 else(BUILD_MODE STREQUAL "Debug")
-       set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Release)
+  set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Release)
 endif()
 
 option(DOWNLOAD_DIR "Path for downloaded files" ${CMAKE_CURRENT_SOURCE_DIR}/downloads)
@@ -46,173 +46,173 @@ message("PATCH_DIR = ${PATCH_DIR}")
 message("BUILD_DIR = ${BUILD_DIR}")
 
 if(WIN32)
-       if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
-               set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
-       else()
-               set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/patch.exe)
-       endif()
-       set(LIBEXT ".lib")
-       set(LIBPREFIX "")
-
-       # For OIIO and OSL
-       set(COMMON_DEFINES /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
-
-       if(MSVC_VERSION GREATER 1909)
-               set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings.
-       endif()
-       set(COMMON_MSVC_FLAGS "${COMMON_MSVC_FLAGS} /bigobj")
-       if(WITH_OPTIMIZED_DEBUG)
-               set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
-       else()
-               set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
-       endif()
-       set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MT ${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
-       set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
-       set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
-
-       if(WITH_OPTIMIZED_DEBUG)
-               set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
-       else()
-               set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd  ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
-       endif()
-       set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MT /${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG  /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
-       set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
-       set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
-
-       set(PLATFORM_FLAGS)
-       set(PLATFORM_CXX_FLAGS)
-       set(PLATFORM_CMAKE_FLAGS)
-
-       if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
-               set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw64)
-               set(MINGW_SHELL ming64sh.cmd)
-               set(PERL_SHELL ${DOWNLOAD_DIR}/perl/portableshell.bat)
-               set(MINGW_HOST x86_64-w64-mingw32)
-       else()
-               set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw32)
-               set(MINGW_SHELL ming32sh.cmd)
-               set(PERL_SHELL ${DOWNLOAD_DIR}/perl32/portableshell.bat)
-               set(MINGW_HOST i686-w64-mingw32)
-       endif()
-
-       set(CONFIGURE_ENV
-               cd ${MINGW_PATH} &&
-               call ${MINGW_SHELL} &&
-               call ${PERL_SHELL} &&
-               set path &&
-               set CFLAGS=-g &&
-               set LDFLAGS=-Wl,--as-needed -static-libgcc
-       )
-
-       set(CONFIGURE_ENV_NO_PERL
-               cd ${MINGW_PATH} &&
-               call ${MINGW_SHELL} &&
-               set path &&
-               set CFLAGS=-g &&
-               set LDFLAGS=-Wl,--as-needed -static-libgcc
-       )
-
-       set(CONFIGURE_COMMAND sh ./configure)
-       set(CONFIGURE_COMMAND_NO_TARGET ${CONFIGURE_COMMAND})
+  if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+    set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
+  else()
+    set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/patch.exe)
+  endif()
+  set(LIBEXT ".lib")
+  set(LIBPREFIX "")
+
+  # For OIIO and OSL
+  set(COMMON_DEFINES /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
+
+  if(MSVC_VERSION GREATER 1909)
+    set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings.
+  endif()
+  set(COMMON_MSVC_FLAGS "${COMMON_MSVC_FLAGS} /bigobj")
+  if(WITH_OPTIMIZED_DEBUG)
+    set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
+  else()
+    set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
+  endif()
+  set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MT ${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
+  set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
+  set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
+
+  if(WITH_OPTIMIZED_DEBUG)
+    set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
+  else()
+    set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd  ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
+  endif()
+  set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MT /${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG  /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
+  set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
+  set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
+
+  set(PLATFORM_FLAGS)
+  set(PLATFORM_CXX_FLAGS)
+  set(PLATFORM_CMAKE_FLAGS)
+
+  if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+    set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw64)
+    set(MINGW_SHELL ming64sh.cmd)
+    set(PERL_SHELL ${DOWNLOAD_DIR}/perl/portableshell.bat)
+    set(MINGW_HOST x86_64-w64-mingw32)
+  else()
+    set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw32)
+    set(MINGW_SHELL ming32sh.cmd)
+    set(PERL_SHELL ${DOWNLOAD_DIR}/perl32/portableshell.bat)
+    set(MINGW_HOST i686-w64-mingw32)
+  endif()
+
+  set(CONFIGURE_ENV
+    cd ${MINGW_PATH} &&
+    call ${MINGW_SHELL} &&
+    call ${PERL_SHELL} &&
+    set path &&
+    set CFLAGS=-g &&
+    set LDFLAGS=-Wl,--as-needed -static-libgcc
+  )
+
+  set(CONFIGURE_ENV_NO_PERL
+    cd ${MINGW_PATH} &&
+    call ${MINGW_SHELL} &&
+    set path &&
+    set CFLAGS=-g &&
+    set LDFLAGS=-Wl,--as-needed -static-libgcc
+  )
+
+  set(CONFIGURE_COMMAND sh ./configure)
+  set(CONFIGURE_COMMAND_NO_TARGET ${CONFIGURE_COMMAND})
 else()
-       set(PATCH_CMD patch)
-       set(LIBEXT ".a")
-       set(LIBPREFIX "lib")
-
-       if(APPLE)
-               # Let's get the current Xcode dir, to support xcode-select
-               execute_process(
-                       COMMAND xcode-select --print-path
-                       OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
-               )
-               set(OSX_ARCHITECTURES x86_64)
-               set(OSX_DEPLOYMENT_TARGET 10.9)
-               set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
-
-               set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
-               set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++")
-               set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
-               set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin13.0.0) # OS X 10.9
-               set(PLATFORM_CMAKE_FLAGS
-                       -DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES}
-                       -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
-                       -DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT}
-               )
-       else()
-               set(PLATFORM_CFLAGS "-fPIC")
-               set(PLATFORM_CXXFLAGS "-std=c++11 -fPIC")
-               set(PLATFORM_LDFLAGS)
-               set(PLATFORM_BUILD_TARGET)
-               set(PLATFORM_CMAKE_FLAGS -DCMAKE_INSTALL_LIBDIR=lib)
-       endif()
-
-       if(WITH_OPTIMIZED_DEBUG)
-               set(BLENDER_CMAKE_C_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
-       else()
-               set(BLENDER_CMAKE_C_FLAGS_DEBUG "-g ${PLATFORM_CFLAGS}")
-       endif()
-       set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CFLAGS}")
-       set(BLENDER_CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
-       set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CFLAGS}")
-
-       if(WITH_OPTIMIZED_DEBUG)
-               set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
-       else()
-               set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-g ${PLATFORM_CXXFLAGS}")
-       endif()
-
-       set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CXXFLAGS}")
-       set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
-       set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CXXFLAGS}")
-
-       set(CONFIGURE_ENV
-               export MACOSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET} &&
-               export CFLAGS=${PLATFORM_CFLAGS} &&
-               export CXXFLAGS=${PLATFORM_CXXFLAGS} &&
-               export LDFLAGS=${PLATFORM_LDFLAGS}
-       )
-       set(CONFIGURE_ENV_NO_PERL ${CONFIGURE_ENV})
-       set(CONFIGURE_COMMAND ./configure ${PLATFORM_BUILD_TARGET})
-       set(CONFIGURE_COMMAND_NO_TARGET ./configure)
+  set(PATCH_CMD patch)
+  set(LIBEXT ".a")
+  set(LIBPREFIX "lib")
+
+  if(APPLE)
+    # Let's get the current Xcode dir, to support xcode-select
+    execute_process(
+      COMMAND xcode-select --print-path
+      OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
+    )
+    set(OSX_ARCHITECTURES x86_64)
+    set(OSX_DEPLOYMENT_TARGET 10.9)
+    set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
+
+    set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
+    set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++")
+    set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
+    set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin13.0.0) # OS X 10.9
+    set(PLATFORM_CMAKE_FLAGS
+      -DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES}
+      -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
+      -DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT}
+    )
+  else()
+    set(PLATFORM_CFLAGS "-fPIC")
+    set(PLATFORM_CXXFLAGS "-std=c++11 -fPIC")
+    set(PLATFORM_LDFLAGS)
+    set(PLATFORM_BUILD_TARGET)
+    set(PLATFORM_CMAKE_FLAGS -DCMAKE_INSTALL_LIBDIR=lib)
+  endif()
+
+  if(WITH_OPTIMIZED_DEBUG)
+    set(BLENDER_CMAKE_C_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
+  else()
+    set(BLENDER_CMAKE_C_FLAGS_DEBUG "-g ${PLATFORM_CFLAGS}")
+  endif()
+  set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CFLAGS}")
+  set(BLENDER_CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CFLAGS}")
+  set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CFLAGS}")
+
+  if(WITH_OPTIMIZED_DEBUG)
+    set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
+  else()
+    set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-g ${PLATFORM_CXXFLAGS}")
+  endif()
+
+  set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CXXFLAGS}")
+  set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
+  set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CXXFLAGS}")
+
+  set(CONFIGURE_ENV
+    export MACOSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET} &&
+    export CFLAGS=${PLATFORM_CFLAGS} &&
+    export CXXFLAGS=${PLATFORM_CXXFLAGS} &&
+    export LDFLAGS=${PLATFORM_LDFLAGS}
+  )
+  set(CONFIGURE_ENV_NO_PERL ${CONFIGURE_ENV})
+  set(CONFIGURE_COMMAND ./configure ${PLATFORM_BUILD_TARGET})
+  set(CONFIGURE_COMMAND_NO_TARGET ./configure)
 endif()
 
 set(DEFAULT_CMAKE_FLAGS
-       -DCMAKE_BUILD_TYPE=${BUILD_MODE}
-       -DCMAKE_C_FLAGS_DEBUG=${BLENDER_CMAKE_C_FLAGS_DEBUG}
-       -DCMAKE_C_FLAGS_MINSIZEREL=${BLENDER_CMAKE_C_FLAGS_MINSIZEREL}
-       -DCMAKE_C_FLAGS_RELEASE=${BLENDER_CMAKE_C_FLAGS_RELEASE}
-       -DCMAKE_C_FLAGS_RELWITHDEBINFO=${BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO}
-       -DCMAKE_CXX_FLAGS_DEBUG=${BLENDER_CMAKE_CXX_FLAGS_DEBUG}
-       -DCMAKE_CXX_FLAGS_MINSIZEREL=${BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL}
-       -DCMAKE_CXX_FLAGS_RELEASE=${BLENDER_CMAKE_CXX_FLAGS_RELEASE}
-       -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
-       ${PLATFORM_CMAKE_FLAGS}
+  -DCMAKE_BUILD_TYPE=${BUILD_MODE}
+  -DCMAKE_C_FLAGS_DEBUG=${BLENDER_CMAKE_C_FLAGS_DEBUG}
+  -DCMAKE_C_FLAGS_MINSIZEREL=${BLENDER_CMAKE_C_FLAGS_MINSIZEREL}
+  -DCMAKE_C_FLAGS_RELEASE=${BLENDER_CMAKE_C_FLAGS_RELEASE}
+  -DCMAKE_C_FLAGS_RELWITHDEBINFO=${BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO}
+  -DCMAKE_CXX_FLAGS_DEBUG=${BLENDER_CMAKE_CXX_FLAGS_DEBUG}
+  -DCMAKE_CXX_FLAGS_MINSIZEREL=${BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL}
+  -DCMAKE_CXX_FLAGS_RELEASE=${BLENDER_CMAKE_CXX_FLAGS_RELEASE}
+  -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
+  ${PLATFORM_CMAKE_FLAGS}
 )
 
 if(WIN32)
-       #we need both flavors to build the thumbnail dlls
-       if(MSVC12)
-               set(GENERATOR_32 "Visual Studio 12 2013")
-               set(GENERATOR_64 "Visual Studio 12 2013 Win64")
-       elseif(MSVC14)
-               set(GENERATOR_32 "Visual Studio 14 2015")
-               set(GENERATOR_64 "Visual Studio 14 2015 Win64")
-       endif()
+  #we need both flavors to build the thumbnail dlls
+  if(MSVC12)
+    set(GENERATOR_32 "Visual Studio 12 2013")
+    set(GENERATOR_64 "Visual Studio 12 2013 Win64")
+  elseif(MSVC14)
+    set(GENERATOR_32 "Visual Studio 14 2015")
+    set(GENERATOR_64 "Visual Studio 14 2015 Win64")
+  endif()
 endif()
 
 
 if(WIN32)
-       if(BUILD_MODE STREQUAL Debug)
-               set(ZLIB_LIBRARY zlibstaticd${LIBEXT})
-       else()
-               set(ZLIB_LIBRARY zlibstatic${LIBEXT})
-       endif()
+  if(BUILD_MODE STREQUAL Debug)
+    set(ZLIB_LIBRARY zlibstaticd${LIBEXT})
+  else()
+    set(ZLIB_LIBRARY zlibstatic${LIBEXT})
+  endif()
 else()
-       set(ZLIB_LIBRARY libz${LIBEXT})
+  set(ZLIB_LIBRARY libz${LIBEXT})
 endif()
 
 if(MSVC)
-       set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+  set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 endif()
 
 set(CMAKE_INSTALL_MESSAGE LAZY)
index 795892f..7479a0f 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 if(WIN32)
-       set(OSL_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
-       set(OSL_FLEX_BISON -DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe -DFLEX_EXTRA_OPTIONS="--wincompat" -DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe)
-       set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/libpng16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
-       if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
-               set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=0)
-       else()
-               set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2)
-       endif()
-       SET(OSL_PLATFORM_FLAGS -DLINKSTATIC=ON)
+  set(OSL_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
+  set(OSL_FLEX_BISON -DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe -DFLEX_EXTRA_OPTIONS="--wincompat" -DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe)
+  set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/libpng16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
+  if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
+    set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=0)
+  else()
+    set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2)
+  endif()
+  SET(OSL_PLATFORM_FLAGS -DLINKSTATIC=ON)
 else()
-       set(OSL_CMAKE_CXX_STANDARD_LIBRARIES)
-       set(OSL_FLEX_BISON)
-       set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/${LIBPREFIX}png16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
-       SET(OSL_PLATFORM_FLAGS)
+  set(OSL_CMAKE_CXX_STANDARD_LIBRARIES)
+  set(OSL_FLEX_BISON)
+  set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/${LIBPREFIX}png16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
+  SET(OSL_PLATFORM_FLAGS)
 endif()
 
 set(OSL_ILMBASE_CUSTOM_LIBRARIES "${LIBDIR}/ilmbase/lib/Imath${ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/Half{ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/IlmThread${ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/Iex${ILMBASE_VERSION_POSTFIX}.lib")
 set(OSL_LLVM_LIBRARY "${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAnalysis${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAsmParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMBitReader${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMBitWriter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMCodeGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMCore${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMDebugInfo${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMExecutionEngine${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInstCombine${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInstrumentation${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInterpreter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMJIT${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMLinker${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMC${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCDisassembler${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCJIT${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMObject${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMRuntimeDyld${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMScalarOpts${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMSelectionDAG${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMSupport${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTableGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTarget${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTransformUtils${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMVectorize${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86AsmParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86AsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86CodeGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Desc${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Disassembler${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Info${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Utils${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMipa${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMipo${LIBEXT}")
 
 set(OSL_EXTRA_ARGS
-       -DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-       -DBoost_USE_MULTITHREADED=ON
-       -DBoost_USE_STATIC_LIBS=ON
-       -DBoost_USE_STATIC_RUNTIME=ON
-       -DBOOST_ROOT=${LIBDIR}/boost
-       -DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-       -DBoost_NO_SYSTEM_PATHS=ON
-       -DLLVM_DIRECTORY=${LIBDIR}/llvm
-       -DLLVM_INCLUDES=${LIBDIR}/llvm/include
-       -DLLVM_LIB_DIR=${LIBDIR}/llvm/lib
-       -DLLVM_VERSION=3.4
-       -DLLVM_LIBRARY=${OSL_LLVM_LIBRARY}
-       -DOPENEXR_HOME=${LIBDIR}/openexr/
-       -DILMBASE_HOME=${LIBDIR}/ilmbase/
-       -DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-       -DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-       -DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-       -DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-       -DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-       -DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-       -DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-       -DOSL_BUILD_TESTS=OFF
-       -DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-       -DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-       -DOPENIMAGEIOHOME=${LIBDIR}/openimageio/
-       -DOPENIMAGEIO_LIBRARY=${OSL_OPENIMAGEIO_LIBRARY}
-       -DOPENIMAGEIO_INCLUDES=${LIBDIR}/openimageio/include
-       ${OSL_FLEX_BISON}
-       -DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
-       -DBUILDSTATIC=ON
-       ${OSL_PLATFORM_FLAGS}
-       -DOSL_BUILD_PLUGINS=Off
-       -DSTOP_ON_WARNING=OFF
-       -DUSE_LLVM_BITCODE=OFF
-       -DUSE_PARTIO=OFF
-       ${OSL_SIMD_FLAGS}
-       -DPARTIO_LIBRARIES=
+  -DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
+  -DBoost_USE_MULTITHREADED=ON
+  -DBoost_USE_STATIC_LIBS=ON
+  -DBoost_USE_STATIC_RUNTIME=ON
+  -DBOOST_ROOT=${LIBDIR}/boost
+  -DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
+  -DBoost_NO_SYSTEM_PATHS=ON
+  -DLLVM_DIRECTORY=${LIBDIR}/llvm
+  -DLLVM_INCLUDES=${LIBDIR}/llvm/include
+  -DLLVM_LIB_DIR=${LIBDIR}/llvm/lib
+  -DLLVM_VERSION=3.4
+  -DLLVM_LIBRARY=${OSL_LLVM_LIBRARY}
+  -DOPENEXR_HOME=${LIBDIR}/openexr/
+  -DILMBASE_HOME=${LIBDIR}/ilmbase/
+  -DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
+  -DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
+  -DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
+  -DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
+  -DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
+  -DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
+  -DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
+  -DOSL_BUILD_TESTS=OFF
+  -DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
+  -DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
+  -DOPENIMAGEIOHOME=${LIBDIR}/openimageio/
+  -DOPENIMAGEIO_LIBRARY=${OSL_OPENIMAGEIO_LIBRARY}
+  -DOPENIMAGEIO_INCLUDES=${LIBDIR}/openimageio/include
+  ${OSL_FLEX_BISON}
+  -DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
+  -DBUILDSTATIC=ON
+  ${OSL_PLATFORM_FLAGS}
+  -DOSL_BUILD_PLUGINS=Off
+  -DSTOP_ON_WARNING=OFF
+  -DUSE_LLVM_BITCODE=OFF
+  -DUSE_PARTIO=OFF
+  ${OSL_SIMD_FLAGS}
+  -DPARTIO_LIBRARIES=
 )
 
 if(WIN32)
-       set(OSL_EXTRA_ARGS
-               ${OSL_EXTRA_ARGS}
-               -DPUGIXML_HOME=${LIBDIR}/pugixml
-       )
+  set(OSL_EXTRA_ARGS
+    ${OSL_EXTRA_ARGS}
+    -DPUGIXML_HOME=${LIBDIR}/pugixml
+  )
 elseif(APPLE)
-       # Make symbol hiding consistent with OIIO which defaults to OFF,
-       # avoids linker warnings on macOS
-       set(OSL_EXTRA_ARGS
-               ${OSL_EXTRA_ARGS}
-               -DHIDE_SYMBOLS=OFF
-       )
+  # Make symbol hiding consistent with OIIO which defaults to OFF,
+  # avoids linker warnings on macOS
+  set(OSL_EXTRA_ARGS
+    ${OSL_EXTRA_ARGS}
+    -DHIDE_SYMBOLS=OFF
+  )
 endif()
 
 ExternalProject_Add(external_osl
-       URL ${OSL_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       LIST_SEPARATOR ^^
-       URL_HASH MD5=${OSL_HASH}
-       PREFIX ${BUILD_DIR}/osl
-       PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/osl
+  URL ${OSL_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  LIST_SEPARATOR ^^
+  URL_HASH MD5=${OSL_HASH}
+  PREFIX ${BUILD_DIR}/osl
+  PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/osl
 )
 
 add_dependencies(
-       external_osl
-       external_boost
-       ll
-       external_clang
-       external_ilmbase
-       external_openexr
-       external_zlib
-       external_flexbison
-       external_openimageio
-       external_pugixml
+  external_osl
+  external_boost
+  ll
+  external_clang
+  external_ilmbase
+  external_openexr
+  external_zlib
+  external_flexbison
+  external_openimageio
+  external_pugixml
 )
 
 if(WIN32)
-       if(BUILD_MODE STREQUAL Release)
-               ExternalProject_Add_Step(external_osl after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/osl/ ${HARVEST_TARGET}/osl
-                       DEPENDEES install
-               )
-       endif()
-       if(BUILD_MODE STREQUAL Debug)
-               ExternalProject_Add_Step(external_osl after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib
-                       DEPENDEES install
-               )
-       endif()
+  if(BUILD_MODE STREQUAL Release)
+    ExternalProject_Add_Step(external_osl after_install
+      COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/osl/ ${HARVEST_TARGET}/osl
+      DEPENDEES install
+    )
+  endif()
+  if(BUILD_MODE STREQUAL Debug)
+    ExternalProject_Add_Step(external_osl after_install
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib
+      DEPENDEES install
+    )
+  endif()
 endif()
index 6e51fb9..2bf32b7 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 set(PNG_EXTRA_ARGS
-       -DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-       -DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-       -DPNG_STATIC=ON
+  -DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
+  -DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
+  -DPNG_STATIC=ON
 )
 
 ExternalProject_Add(external_png
-       URL ${PNG_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${PNG_HASH}
-       PREFIX ${BUILD_DIR}/png
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/png ${DEFAULT_CMAKE_FLAGS} ${PNG_EXTRA_ARGS}
-       INSTALL_DIR     ${LIBDIR}/png
+  URL ${PNG_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${PNG_HASH}
+  PREFIX ${BUILD_DIR}/png
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/png ${DEFAULT_CMAKE_FLAGS} ${PNG_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/png
 )
 
 add_dependencies(
-       external_png
-       external_zlib
+  external_png
+  external_zlib
 )
 
 if(WIN32 AND BUILD_MODE STREQUAL Debug)
-       ExternalProject_Add_Step(external_png after_install
-               COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_staticd${LIBEXT} ${LIBDIR}/png/lib/libpng16${LIBEXT}
-               DEPENDEES install
-       )
+  ExternalProject_Add_Step(external_png after_install
+    COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_staticd${LIBEXT} ${LIBDIR}/png/lib/libpng16${LIBEXT}
+    DEPENDEES install
+  )
 endif()
index 8d60597..c5c3311 100644 (file)
 
 if(WIN32)
 
-               if(MSVC14) # vs2015 has timespec
-                       set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H /D_TIMESPEC_DEFINED ")
-               else() # everything before doesn't
-                       set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
-               endif()
+    if(MSVC14) # vs2015 has timespec
+      set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H /D_TIMESPEC_DEFINED ")
+    else() # everything before doesn't
+      set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
+    endif()
 
-               set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
+    set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
 
-               ExternalProject_Add(external_pthreads
-                       URL ${PTHREADS_URI}
-                       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-                       URL_HASH MD5=${PTHREADS_HASH}
-                       PREFIX ${BUILD_DIR}/pthreads
-                       CONFIGURE_COMMAND echo .
-                       BUILD_COMMAND ${PTHREADS_BUILD}
-                       INSTALL_COMMAND COMMAND
-                               ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/libpthreadVC3${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC3${LIBEXT} &&
-                               ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthread.h ${LIBDIR}/pthreads/inc/pthread.h &&
-                               ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/sched.h ${LIBDIR}/pthreads/inc/sched.h &&
-                               ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h &&
-                               ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/_ptw32.h ${LIBDIR}/pthreads/inc/_ptw32.h
-                       INSTALL_DIR ${LIBDIR}/pthreads
-               )
+    ExternalProject_Add(external_pthreads
+      URL ${PTHREADS_URI}
+      DOWNLOAD_DIR ${DOWNLOAD_DIR}
+      URL_HASH MD5=${PTHREADS_HASH}
+      PREFIX ${BUILD_DIR}/pthreads
+      CONFIGURE_COMMAND echo .
+      BUILD_COMMAND ${PTHREADS_BUILD}
+      INSTALL_COMMAND COMMAND
+        ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/libpthreadVC3${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC3${LIBEXT} &&
+        ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthread.h ${LIBDIR}/pthreads/inc/pthread.h &&
+        ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/sched.h ${LIBDIR}/pthreads/inc/sched.h &&
+        ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h &&
+        ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/_ptw32.h ${LIBDIR}/pthreads/inc/_ptw32.h
+      INSTALL_DIR ${LIBDIR}/pthreads
+    )
 
-               if(BUILD_MODE STREQUAL Release)
-                       ExternalProject_Add_Step(external_pthreads after_install
-                               COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/inc/ ${HARVEST_TARGET}/pthreads/include/
-                               COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/lib/ ${HARVEST_TARGET}/pthreads/lib
-                               DEPENDEES install
-                       )
-               endif()
+    if(BUILD_MODE STREQUAL Release)
+      ExternalProject_Add_Step(external_pthreads after_install
+        COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/inc/ ${HARVEST_TARGET}/pthreads/include/
+        COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/lib/ ${HARVEST_TARGET}/pthreads/lib
+        DEPENDEES install
+      )
+    endif()
 
 endif()
index fe5a77e..8804ae7 100644 (file)
@@ -20,24 +20,24 @@ set(PUGIXML_EXTRA_ARGS
 )
 
 ExternalProject_Add(external_pugixml
-       URL ${PUGIXML_URI}
-       DOWNLOAD_DIR ${DOWNLOAD_DIR}
-       URL_HASH MD5=${PUGIXML_HASH}
-       PREFIX ${BUILD_DIR}/pugixml
-       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/pugixml ${DEFAULT_CMAKE_FLAGS} ${PUGIXML_EXTRA_ARGS}
-       INSTALL_DIR ${LIBDIR}/pugixml
+  URL ${PUGIXML_URI}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH MD5=${PUGIXML_HASH}
+  PREFIX ${BUILD_DIR}/pugixml
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/pugixml ${DEFAULT_CMAKE_FLAGS} ${PUGIXML_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/pugixml
 )
 if(WIN32)
-       if(BUILD_MODE STREQUAL Release)
-               ExternalProject_Add_Step(external_pugixml after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml.lib
-                       DEPENDEES install
-               )
-       endif()
-       if(BUILD_MODE STREQUAL Debug)
-               ExternalProject_Add_Step(external_pugixml after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml_d.lib
-                       DEPENDEES install
-               )
-       endif() 
+  if(BUILD_MODE STREQUAL Release)
+    ExternalProject_Add_Step(external_pugixml after_install
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml.lib
+      DEPENDEES install
+    )
+  endif()
+  if(BUILD_MODE STREQUAL Debug)
+    ExternalProject_Add_Step(external_pugixml after_install
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml_d.lib
+      DEPENDEES install
+    )
+  endif() 
 endif()
\ No newline at end of file
index 29eb992..cb3aefa 100644 (file)
 
 set(PYTHON_POSTFIX)
 if(BUILD_MODE STREQUAL Debug)
-       set(PYTHON_POSTFIX _d)
+  set(PYTHON_POSTFIX _d)
 endif()
 
 if(WIN32)
-       if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
-               set(SSL_POSTFIX -x64)
-       else()
-               set(SSL_POSTFIX)
-       endif()
+  if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+    set(SSL_POSTFIX -x64)
+  else()
+    set(SSL_POSTFIX)
+  endif()
 
-       set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe)
+  set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe)
 
-       macro(cmake_to_dos_path MsysPath ResultingPath)
-               string(REPLACE "/" "\\" ${ResultingPath} "${MsysPath}")
-       endmacro()
+  macro(cmake_to_dos_path MsysPath ResultingPath)
+    string(REPLACE "/" "\\" ${ResultingPath} "${MsysPath}")
+  endmacro()
 
-       set(PYTHON_EXTERNALS_FOLDER ${BUILD_DIR}/python/src/external_python/externals)
-       set(DOWNLOADS_EXTERNALS_FOLDER ${DOWNLOAD_DIR}/externals)
+  set(PYTHON_EXTERNALS_FOLDER ${BUILD_DIR}/python/src/external_python/externals)
+  set(DOWNLOADS_EXTERNALS_FOLDER ${DOWNLOAD_DIR}/externals)
 
-       cmake_to_dos_path(${PYTHON_EXTERNALS_FOLDER} PYTHON_EXTERNALS_FOLDER_DOS)
-       cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
+  cmake_to_dos_path(${PYTHON_EXTERNALS_FOLDER} PYTHON_EXTERNALS_FOLDER_DOS)
+  cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
 
-       message("Python externals = ${PYTHON_EXTERNALS_FOLDER}")
-       message("Python externals_dos = ${PYTHON_EXTERNALS_FOLDER_DOS}")
-       message("Python DOWNLOADS_EXTERNALS_FOLDER = ${DOWNLOADS_EXTERNALS_FOLDER}")
-       message("Python DOWNLOADS_EXTERNALS_FOLDER_DOS = ${DOWNLOADS_EXTERNALS_FOLDER_DOS}")
+  message("Python externals = ${PYTHON_EXTERNALS_FOLDER}")
+  message("Python externals_dos = ${PYTHON_EXTERNALS_FOLDER_DOS}")
+  message("Python DOWNLOADS_EXTERNALS_FOLDER = ${DOWNLOADS_EXTERNALS_FOLDER}")
+  message("Python DOWNLOADS_EXTERNALS_FOLDER_DOS = ${DOWNLOADS_EXTERNALS_FOLDER_DOS}")
 
-       ExternalProject_Add(external_python
-               URL ${PYTHON_URI}
-               DOWNLOAD_DIR ${DOWNLOAD_DIR}
-               URL_HASH MD5=${PYTHON_HASH}
-               PREFIX ${BUILD_DIR}/python
-               PATCH_COMMAND
-                       echo mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" &&
-                       mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}"
-               CONFIGURE_COMMAND ""
-               BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p ${PYTHON_ARCH} -c ${BUILD_MODE}
-               INSTALL_COMMAND COMMAND
-                       ${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll &&
-                       ${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb &&
-                       ${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib &&
-                       ${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp &&
-                       ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION} &&
-                       ${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION}/pyconfig.h
-       )
-       message("PythinRedist = ${BUILD_DIR}/python/src/external_python/redist")
-       message("POutput = ${PYTHON_OUTPUTDIR}")
+  ExternalProject_Add(external_python
+    URL ${PYTHON_URI}
+    DOWNLOAD_DIR ${DOWNLOAD_DIR}
+    URL_HASH MD5=${PYTHON_HASH}
+    PREFIX ${BUILD_DIR}/python
+    PATCH_COMMAND
+      echo mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" &&
+      mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}"
+    CONFIGURE_COMMAND ""
+    BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p ${PYTHON_ARCH} -c ${BUILD_MODE}
+    INSTALL_COMMAND COMMAND
+      ${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll &&
+      ${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb &&
+      ${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib &&
+      ${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp &&
+      ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION} &&
+      ${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION}/pyconfig.h
+  )
+  message("PythinRedist = ${BUILD_DIR}/python/src/external_python/redist")
+  message("POutput = ${PYTHON_OUTPUTDIR}")
 else()
-       if(APPLE)
-               # disable functions that can be in 10.13 sdk but aren't available on 10.9 target
-               set(PYTHON_FUNC_CONFIGS
-                 export ac_cv_func_futimens=no &&
-                 export ac_cv_func_utimensat=no &&
-                 export ac_cv_func_basename_r=no &&
-                 export ac_cv_func_clock_getres=no &&
-                 export ac_cv_func_clock_gettime=no &&
-                 export ac_cv_func_clock_settime=no &&
-                 export ac_cv_func_dirname_r=no &&
-                 export ac_cv_func_getentropy=no &&
-                 export ac_cv_func_mkostemp=no &&
-                 export ac_cv_func_mkostemps=no &&
-                 export ac_cv_func_timingsafe_bcmp=no)
-               set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && ${PYTHON_FUNC_CONFIGS})
-               set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
-       else()
-               set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
-               set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
-       endif()
+  if(APPLE)
+    # disable functions that can be in 10.13 sdk but aren't available on 10.9 target
+    set(PYTHON_FUNC_CONFIGS
+      export ac_cv_func_futimens=no &&
+      export ac_cv_func_utimensat=no &&
+      export ac_cv_func_basename_r=no &&
+      export ac_cv_func_clock_getres=no &&
+      export ac_cv_func_clock_gettime=no &&
+      export ac_cv_func_clock_settime=no &&
+      export ac_cv_func_dirname_r=no &&
+      export ac_cv_func_getentropy=no &&
+      export ac_cv_func_mkostemp=no &&
+      export ac_cv_func_mkostemps=no &&
+      export ac_cv_func_timingsafe_bcmp=no)
+    set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && ${PYTHON_FUNC_CONFIGS})
+    set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
+  else()
+    set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
+    set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
+  endif()
 
-       set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl")
-       set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include")
-       set(PYTHON_LDFLAGS "-L${LIBDIR}/ffi/lib -L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib")
-       set(PYTHON_CONFIGURE_EXTRA_ENV
-               export CFLAGS=${PYTHON_CFLAGS} &&
-               export CPPFLAGS=${PYTHON_CFLAGS} &&
-               export LDFLAGS=${PYTHON_LDFLAGS} &&
-               export PKG_CONFIG_PATH=${LIBDIR}/ffi/lib/pkgconfig)
-       set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff)
+  set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl")
+  set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include")
+  set(PYTHON_LDFLAGS "-L${LIBDIR}/ffi/lib -L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib")
+  set(PYTHON_CONFIGURE_EXTRA_ENV
+    export CFLAGS=${PYTHON_CFLAGS} &&
+    export CPPFLAGS=${PYTHON_CFLAGS} &&
+    export LDFLAGS=${PYTHON_LDFLAGS} &&
+    export PKG_CONFIG_PATH=${LIBDIR}/ffi/lib/pkgconfig)
+  set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff)
 
-       ExternalProject_Add(external_python
-               URL ${PYTHON_URI}
-               DOWNLOAD_DIR ${DOWNLOAD_DIR}
-               URL_HASH MD5=${PYTHON_HASH}
-               PREFIX ${BUILD_DIR}/python
-               PATCH_COMMAND ${PYTHON_PATCH}
-               CONFIGURE_COMMAND ${PYTHON_CONFIGURE_ENV} && ${PYTHON_CONFIGURE_EXTRA_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/python ${PYTHON_CONFIGURE_EXTRA_ARGS}
-               BUILD_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make -j${MAKE_THREADS}
-               INSTALL_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make install
-               INSTALL_DIR ${LIBDIR}/python)
+  ExternalProject_Add(external_python
+    URL ${PYTHON_URI}
+    DOWNLOAD_DIR ${DOWNLOAD_DIR}
+    URL_HASH MD5=${PYTHON_HASH}
+    PREFIX ${BUILD_DIR}/python
+    PATCH_COMMAND ${PYTHON_PATCH}
+    CONFIGURE_COMMAND ${PYTHON_CONFIGURE_ENV} && ${PYTHON_CONFIGURE_EXTRA_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/python ${PYTHON_CONFIGURE_EXTRA_ARGS}
+    BUILD_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make -j${MAKE_THREADS}
+    INSTALL_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make install
+    INSTALL_DIR ${LIBDIR}/python)
 
-       add_custom_target(Make_Python_Environment ALL DEPENDS external_python)
+  add_custom_target(Make_Python_Environment ALL DEPENDS external_python)
 endif()
 
 if(MSVC)
-       add_custom_command(
-               OUTPUT ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
-               OUTPUT ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
-               COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/lib ${BUILD_DIR}/python/src/external_python/redist/lib
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_asyncio${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_asyncio${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_bz2${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_bz2${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_contextvars${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_contextvars${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes_test${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes_test${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_decimal${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_decimal${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_distutils_findvs${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_distutils_findvs${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_elementtree${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_elementtree${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_hashlib${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_hashlib${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_lzma${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_lzma${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_msi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_msi${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_multiprocessing${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_multiprocessing${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_overlapped${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_overlapped${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_queue${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_queue${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_socket${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_socket${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_sqlite3${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_sqlite3${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ssl${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ssl${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testbuffer${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testbuffer${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testcapi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testcapi${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testimportmultiple${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testimportmultiple${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testmultiphase${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testmultiphase${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/pyexpat${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/pyexpat${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/select${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/select${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/unicodedata${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/unicodedata${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/winsound${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/winsound${PYTHON_POSTFIX}.pyd
-               #xxlimited is an example extension module, we don't need to ship it and debug doesn't build it
-               #leaving it commented out, so I won't get confused again with the next update.
-               #COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/xxlimited${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/xxlimited${PYTHON_POSTFIX}.pyd
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/libssl-1_1${SSL_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/libssl-1_1${SSL_POSTFIX}.dll
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/libcrypto-1_1${SSL_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/libcrypto-1_1${SSL_POSTFIX}.dll
-               COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/sqlite3${PYTHON_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/sqlite3${PYTHON_POSTFIX}.dll
-               COMMAND ${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/python/src/external_python/redist" ${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz" "."
-               COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/
-               COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
-       )
+  add_custom_command(
+    OUTPUT ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
+    OUTPUT ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
+    COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/lib ${BUILD_DIR}/python/src/external_python/redist/lib
+    COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_asyncio${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_asyncio${PYTHON_POSTFIX}.pyd
+    COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_bz2${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_bz2${PYTHON_POSTFIX}.pyd
+    COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_contextvars${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_contextvars${PYTHON_POSTFIX}.pyd
+    COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes${PYTHON_POSTFIX}.pyd
+    COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes_test${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes_test${PYTHON_POSTFIX}.pyd
+    COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_decimal${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_decimal${PYTHON_POSTFIX}.pyd
+    COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_distutils_findvs${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_distutils_findvs${PYTHON_POSTFIX}.pyd
+    COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_elementtree${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_elementtree${PYTHON_POSTFIX}.pyd
+    COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_hashlib${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_hashlib${PYTHON_POSTFIX}.pyd
+    COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_lzma${PYTHON_POSTFIX}.pyd" ${BUILD_