diff --git a/CMakeLists.txt b/CMakeLists.txt index c7addc81b0c..8b64f7b8afd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -333,7 +333,7 @@ option(WITH_ALEMBIC "Enable Alembic Support" OFF) option(WITH_ALEMBIC_HDF5 "Enable Legacy Alembic Support (not officially supported)" OFF) if(APPLE) - option(WITH_CODEC_QUICKTIME "Enable Quicktime Support" ON) + option(WITH_CODEC_QUICKTIME "Enable Quicktime Support" OFF) endif() # 3D format support @@ -343,9 +343,9 @@ option(WITH_OPENCOLLADA "Enable OpenCollada Support (http://www.opencollada.or # Sound output option(WITH_SDL "Enable SDL for sound and joystick support" ${_init_SDL}) option(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON) -option(WITH_JACK "Enable Jack Support (http://www.jackaudio.org)" ${_init_JACK}) +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) @@ -508,6 +508,12 @@ mark_as_advanced(WITH_C11) option(WITH_CXX11 "Build with C++11 standard enabled, for development use only!" ${_cxx11_init}) mark_as_advanced(WITH_CXX11) +# 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) +endif() + # Dependency graph option(WITH_LEGACY_DEPSGRAPH "Build Blender with legacy dependency graph" ON) mark_as_advanced(WITH_LEGACY_DEPSGRAPH) @@ -622,6 +628,12 @@ if(APPLE) # to silence sdk not found warning, just overrides CMAKE_OSX_SYSROOT set(CMAKE_XCODE_ATTRIBUTE_SDKROOT macosx${OSX_SYSTEM}) endif() + + # QuickTime framework is no longer available in SDK 10.12+ + if(WITH_CODEC_QUICKTIME AND ${OSX_SYSTEM} VERSION_GREATER 10.11) + set(WITH_CODEC_QUICKTIME OFF) + message(STATUS "QuickTime not supported by SDK ${OSX_SYSTEM}, disabling WITH_CODEC_QUICKTIME") + endif() endif() if(OSX_SYSTEM MATCHES 10.9) @@ -731,7 +743,7 @@ elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_AUDASPACE OR WITH_INTERNATIONAL O # Keep enabled else() # New dependency graph needs either Boost or C++11 for function bindings. - if(NOT USE_CXX11) + if(NOT WITH_CXX11) # Enabled but we don't need it set(WITH_BOOST OFF) endif() @@ -855,7 +867,7 @@ endif() # linux only, not cached set(WITH_BINRELOC OFF) -# MAXOSX only, set to avoid uninitialized +# MACOSX only, set to avoid uninitialized set(EXETYPE "") # C/C++ flags @@ -1561,7 +1573,7 @@ if(WITH_CXX11) if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") # TODO(sergey): Do we want c++11 or gnu-c++11 here? set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") - elseif(MSVC12) + elseif(MSVC) # Nothing special is needed, C++11 features are available by default. else() message(FATAL_ERROR "Compiler ${CMAKE_C_COMPILER_ID} is not supported for C++11 build yet") diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index d6ea7d99f04..ecb1cf87511 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -289,7 +289,7 @@ NO_BUILD=false NO_CONFIRM=false USE_CXX11=false -PYTHON_VERSION="3.5.1" +PYTHON_VERSION="3.5.2" PYTHON_VERSION_MIN="3.5" PYTHON_FORCE_BUILD=false PYTHON_FORCE_REBUILD=false @@ -322,7 +322,7 @@ OPENEXR_FORCE_REBUILD=false OPENEXR_SKIP=false _with_built_openexr=false -OIIO_VERSION="1.6.9" +OIIO_VERSION="1.7.8" OIIO_VERSION_MIN="1.6.0" OIIO_VERSION_MAX="1.9.0" # UNKNOWN currently # Not supported by current OSL... OIIO_FORCE_BUILD=false @@ -337,14 +337,14 @@ LLVM_FORCE_REBUILD=false LLVM_SKIP=false # OSL needs to be compiled for now! -OSL_VERSION="1.7.3" +OSL_VERSION="1.7.5" OSL_VERSION_MIN=$OSL_VERSION OSL_FORCE_BUILD=false OSL_FORCE_REBUILD=false OSL_SKIP=false # OpenSubdiv needs to be compiled for now -OSD_VERSION="3.0.5" +OSD_VERSION="3.1.0" OSD_VERSION_MIN=$OSD_VERSION OSD_FORCE_BUILD=false OSD_FORCE_REBUILD=false @@ -372,7 +372,7 @@ OPENCOLLADA_FORCE_BUILD=false OPENCOLLADA_FORCE_REBUILD=false OPENCOLLADA_SKIP=false -FFMPEG_VERSION="2.8.4" +FFMPEG_VERSION="3.2.1" FFMPEG_VERSION_MIN="2.8.4" FFMPEG_FORCE_BUILD=false FFMPEG_FORCE_REBUILD=false @@ -713,6 +713,21 @@ if [ "$WITH_ALL" = true -a "$OPENCOLLADA_SKIP" = false ]; then fi +WARNING "****WARNING****" +PRINT "If you are experiencing issues building Blender, _*TRY A FRESH, CLEAN BUILD FIRST*_!" +PRINT "The same goes for install_deps itself, if you encounter issues, please first erase everything in $SRC and $INST" +PRINT "(provided obviously you did not add anything yourself in those dirs!), and run install_deps.sh again!" +PRINT "Often, changes in the libs built by this script, or in your distro package, cannot be handled simply, so..." +PRINT "" +PRINT "You may also try to use the '--build-foo' options to bypass your distribution's packages" +PRINT "for some troublesome/buggy libraries..." +PRINT "" +PRINT "" +PRINT "Ran with:" +PRINT " install_deps.sh $COMMANDLINE" +PRINT "" +PRINT "" + # This has to be done here, because user might force some versions... PYTHON_SOURCE=( "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz" ) @@ -785,6 +800,8 @@ However, if you are experiencing linking errors (also when building Blender itse Please note that until the transition to C++11-built libraries if completed in your distribution, situation will remain fuzzy and incompatibilities may happen..." + PRINT "" + PRINT "" CXXFLAGS="$CXXFLAGS -std=c++11" export CXXFLAGS fi @@ -1858,6 +1875,9 @@ compile_OSL() { cmake_d="$cmake_d -D OSL_BUILD_PLUGINS=OFF" cmake_d="$cmake_d -D OSL_BUILD_TESTS=OFF" cmake_d="$cmake_d -D USE_SIMD=sse2" + if [ "$USE_CXX11" = true ]; then + cmake_d="$cmake_d -D OSL_BUILD_CPP11=1" + fi #~ cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION" @@ -2460,7 +2480,7 @@ compile_FFmpeg() { --enable-avfilter --disable-vdpau \ --disable-bzlib --disable-libgsm --disable-libspeex \ --enable-pthreads --enable-zlib --enable-stripping --enable-runtime-cpudetect \ - --disable-vaapi --disable-libfaac --disable-nonfree --enable-gpl \ + --disable-vaapi --disable-nonfree --enable-gpl \ --disable-postproc --disable-librtmp --disable-libopencore-amrnb \ --disable-libopencore-amrwb --disable-libdc1394 --disable-version3 --disable-outdev=sdl \ --disable-libxcb \ @@ -4023,9 +4043,6 @@ install_OTHER() { fi if [ "$_do_compile_llvm" = true ]; then - install_packages_DEB libffi-dev - # LLVM can't find the debian ffi header dir - _FFI_INCLUDE_DIR=`dpkg -L libffi-dev | grep -e ".*/ffi.h" | sed -r 's/(.*)\/ffi.h/\1/'` PRINT "" compile_LLVM have_llvm=true @@ -4044,7 +4061,6 @@ install_OTHER() { if [ "$_do_compile_osl" = true ]; then if [ "$have_llvm" = true ]; then - install_packages_DEB flex bison libtbb-dev PRINT "" compile_OSL else @@ -4063,7 +4079,6 @@ install_OTHER() { fi if [ "$_do_compile_osd" = true ]; then - install_packages_DEB flex bison libtbb-dev PRINT "" compile_OSD fi @@ -4080,10 +4095,6 @@ install_OTHER() { fi if [ "$_do_compile_collada" = true ]; then - install_packages_DEB libpcre3-dev - # Find path to libxml shared lib... - _XML2_LIB=`dpkg -L libxml2-dev | grep -e ".*/libxml2.so"` - # No package PRINT "" compile_OpenCOLLADA fi @@ -4168,16 +4179,6 @@ print_info_ffmpeglink() { } print_info() { - PRINT "" - PRINT "" - WARNING "****WARNING****" - PRINT "If you are experiencing issues building Blender, _*TRY A FRESH, CLEAN BUILD FIRST*_!" - PRINT "The same goes for install_deps itself, if you encounter issues, please first erase everything in $SRC and $INST" - PRINT "(provided obviously you did not add anything yourself in those dirs!), and run install_deps.sh again!" - PRINT "Often, changes in the libs built by this script, or in your distro package, cannot be handled simply, so..." - PRINT "" - PRINT "You may also try to use the '--build-foo' options to bypass your distribution's packages" - PRINT "for some troublesome/buggy libraries..." PRINT "" PRINT "" PRINT "Ran with:" diff --git a/build_files/buildbot/master.cfg b/build_files/buildbot/master.cfg index 8bd23357fc6..387e53593b3 100644 --- a/build_files/buildbot/master.cfg +++ b/build_files/buildbot/master.cfg @@ -94,6 +94,7 @@ all_repositories = { r'git://git.blender.org/blender-translations.git': 'blender-translations', r'git://git.blender.org/blender-addons.git': 'blender-addons', r'git://git.blender.org/blender-addons-contrib.git': 'blender-addons-contrib', + r'git://git.blender.org/blender-dev-tools.git': 'blender-dev-tools', r'https://svn.blender.org/svnroot/bf-blender/': 'lib svn', } @@ -128,6 +129,7 @@ def schedule_force_build(name): forcesched.CodebaseParameter(hide=True, codebase="blender-translations"), forcesched.CodebaseParameter(hide=True, codebase="blender-addons"), forcesched.CodebaseParameter(hide=True, codebase="blender-addons-contrib"), + forcesched.CodebaseParameter(hide=True, codebase="blender-dev-tools"), forcesched.CodebaseParameter(hide=True, codebase="lib svn")], properties=[])) @@ -143,6 +145,7 @@ def schedule_build(name, hour, minute=0): "blender-translations": {"repository": "", "branch": "master"}, "blender-addons": {"repository": "", "branch": "master"}, "blender-addons-contrib": {"repository": "", "branch": "master"}, + "blender-dev-tools": {"repository": "", "branch": "master"}, "lib svn": {"repository": "", "branch": "trunk"}}, branch=current_branch, builderNames=[name], @@ -264,7 +267,8 @@ def generic_builder(id, libdir='', branch='', rsync=False): for submodule in ('blender-translations', 'blender-addons', - 'blender-addons-contrib'): + 'blender-addons-contrib', + 'blender-dev-tools'): f.addStep(git_submodule_step(submodule)) f.addStep(git_step(branch)) @@ -293,13 +297,14 @@ def generic_builder(id, libdir='', branch='', rsync=False): # Builders add_builder(c, 'mac_x86_64_10_6_cmake', 'darwin-9.x.universal', generic_builder, hour=5) -add_builder(c, 'linux_glibc211_i686_cmake', '', generic_builder, hour=1) -add_builder(c, 'linux_glibc211_x86_64_cmake', '', generic_builder, hour=2) +# add_builder(c, 'linux_glibc211_i686_cmake', '', generic_builder, hour=1) +# add_builder(c, 'linux_glibc211_x86_64_cmake', '', generic_builder, hour=2) add_builder(c, 'linux_glibc219_i686_cmake', '', generic_builder, hour=3) add_builder(c, 'linux_glibc219_x86_64_cmake', '', generic_builder, hour=4) add_builder(c, 'win32_cmake_vc2013', 'windows_vc12', generic_builder, hour=3) add_builder(c, 'win64_cmake_vc2013', 'win64_vc12', generic_builder, hour=4) -add_builder(c, 'win64_cmake_vc2015', 'win64_vc14', generic_builder, hour=5) +add_builder(c, 'win32_cmake_vc2015', 'windows_vc14', generic_builder, hour=5) +add_builder(c, 'win64_cmake_vc2015', 'win64_vc14', generic_builder, hour=6) # STATUS TARGETS # diff --git a/build_files/buildbot/slave_compile.py b/build_files/buildbot/slave_compile.py index c2bfd882fde..76d538ad578 100644 --- a/build_files/buildbot/slave_compile.py +++ b/build_files/buildbot/slave_compile.py @@ -183,10 +183,8 @@ if 'cmake' in builder: print('Condifuration FAILED!') sys.exit(retcode) - if 'win32' in builder: - command = ['msbuild', 'INSTALL.vcxproj', '/Property:PlatformToolset=v120_xp', '/p:Configuration=Release'] - elif 'win64' in builder: - command = ['msbuild', 'INSTALL.vcxproj', '/p:Configuration=Release'] + if 'win32' in builder or 'win64' in builder: + command = ['cmake', '--build', '.', '--target', target_name, '--config', 'Release'] else: command = target_chroot_prefix + ['make', '-s', '-j2', target_name] diff --git a/build_files/cmake/Modules/FindJack.cmake b/build_files/cmake/Modules/FindJack.cmake index 9a847fabf70..caafa3c34a1 100644 --- a/build_files/cmake/Modules/FindJack.cmake +++ b/build_files/cmake/Modules/FindJack.cmake @@ -1,15 +1,15 @@ -# - Find Jack library -# Find the native Jack includes and library +# - Find JACK library +# Find the native JACK includes and library # This module defines # JACK_INCLUDE_DIRS, where to find jack.h, Set when # JACK_INCLUDE_DIR is found. -# JACK_LIBRARIES, libraries to link against to use Jack. -# JACK_ROOT_DIR, The base directory to search for Jack. +# JACK_LIBRARIES, libraries to link against to use JACK. +# JACK_ROOT_DIR, The base directory to search for JACK. # This can also be an environment variable. -# JACK_FOUND, If false, do not try to use Jack. +# JACK_FOUND, If false, do not try to use JACK. # # also defined, but not for general use are -# JACK_LIBRARY, where to find the Jack library. +# JACK_LIBRARY, where to find the JACK library. #============================================================================= # Copyright 2011 Blender Foundation. diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 5a67ac981a3..2e3a1907063 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -518,7 +518,8 @@ function(setup_liblinks target_link_libraries(${target} ${BLENDER_GL_LIBRARIES}) - target_link_libraries(${target} ${PLATFORM_LINKLIBS} ${CMAKE_DL_LIBS}) + #target_link_libraries(${target} ${PLATFORM_LINKLIBS} ${CMAKE_DL_LIBS}) + target_link_libraries(${target} ${PLATFORM_LINKLIBS}) endfunction() diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake index 129969ad16c..04485e31d98 100644 --- a/build_files/cmake/platform/platform_apple.cmake +++ b/build_files/cmake/platform/platform_apple.cmake @@ -158,7 +158,7 @@ if(WITH_CODEC_FFMPEG) mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg ) if(WITH_CXX11) - set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} schroedinger orc vpx) + set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} schroedinger orc vpx webp swresample) endif() set(FFMPEG_LIBPATH ${FFMPEG}/lib) endif() @@ -316,6 +316,9 @@ if(WITH_OPENIMAGEIO) ${OPENEXR_LIBRARIES} ${ZLIB_LIBRARIES} ) + if(WITH_CXX11) + set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARIES} ${LIBDIR}/ffmpeg/lib/libwebp.a) + endif() set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib ${JPEG_LIBPATH} diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index e33141f8012..62e0caa7c43 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -384,17 +384,18 @@ add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE if(CMAKE_COMPILER_IS_GNUCC) set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") - # use ld.gold linker if available, could make optional - execute_process( - COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version - ERROR_QUIET OUTPUT_VARIABLE LD_VERSION) - if("${LD_VERSION}" MATCHES "GNU gold") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=gold") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold") - else() - message(STATUS "GNU gold linker isn't available, using the default system linker.") + if(WITH_LINKER_GOLD) + execute_process( + COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version + ERROR_QUIET OUTPUT_VARIABLE LD_VERSION) + if("${LD_VERSION}" MATCHES "GNU gold") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=gold") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold") + else() + message(STATUS "GNU gold linker isn't available, using the default system linker.") + endif() + unset(LD_VERSION) endif() - unset(LD_VERSION) # CLang is the same as GCC for now. elseif(CMAKE_C_COMPILER_ID MATCHES "Clang") diff --git a/build_files/cmake/platform/platform_win32_msvc.cmake b/build_files/cmake/platform/platform_win32_msvc.cmake index 5efda52b2c5..3b50351a131 100644 --- a/build_files/cmake/platform/platform_win32_msvc.cmake +++ b/build_files/cmake/platform/platform_win32_msvc.cmake @@ -112,7 +112,7 @@ set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221") # MSVC only, Mingw doesnt need if(CMAKE_CL_64) - set(PLATFORM_LINKFLAGS "/MACHINE:X64 /OPT:NOREF ${PLATFORM_LINKFLAGS}") + set(PLATFORM_LINKFLAGS "/MACHINE:X64 ${PLATFORM_LINKFLAGS}") else() set(PLATFORM_LINKFLAGS "/MACHINE:IX86 /LARGEADDRESSAWARE ${PLATFORM_LINKFLAGS}") endif() @@ -129,8 +129,10 @@ if(NOT DEFINED LIBDIR) message(STATUS "32 bit compiler detected.") set(LIBDIR_BASE "windows") endif() - - if(MSVC_VERSION EQUAL 1900) + if(MSVC_VERSION EQUAL 1910) + message(STATUS "Visual Studio 2017 detected.") + set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14) + elseif(MSVC_VERSION EQUAL 1900) message(STATUS "Visual Studio 2015 detected.") set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14) else() @@ -236,14 +238,14 @@ if(WITH_CODEC_FFMPEG) windows_find_package(FFMPEG) if(NOT FFMPEG_FOUND) warn_hardcoded_paths(ffmpeg) - set(FFMPEG_LIBRARY_VERSION 55) - set(FFMPEG_LIBRARY_VERSION_AVU 52) + set(FFMPEG_LIBRARY_VERSION 57) + set(FFMPEG_LIBRARY_VERSION_AVU 55) set(FFMPEG_LIBRARIES - ${LIBDIR}/ffmpeg/lib/avcodec-${FFMPEG_LIBRARY_VERSION}.lib - ${LIBDIR}/ffmpeg/lib/avformat-${FFMPEG_LIBRARY_VERSION}.lib - ${LIBDIR}/ffmpeg/lib/avdevice-${FFMPEG_LIBRARY_VERSION}.lib - ${LIBDIR}/ffmpeg/lib/avutil-${FFMPEG_LIBRARY_VERSION_AVU}.lib - ${LIBDIR}/ffmpeg/lib/swscale-2.lib + ${LIBDIR}/ffmpeg/lib/avcodec.lib + ${LIBDIR}/ffmpeg/lib/avformat.lib + ${LIBDIR}/ffmpeg/lib/avdevice.lib + ${LIBDIR}/ffmpeg/lib/avutil.lib + ${LIBDIR}/ffmpeg/lib/swscale.lib ) endif() endif() @@ -378,6 +380,7 @@ if(WITH_OPENIMAGEIO) set(OPENCOLORIO_DEFINITIONS "-DOCIO_STATIC_BUILD") set(OPENIMAGEIO_IDIFF "${OPENIMAGEIO}/bin/idiff.exe") add_definitions(-DOIIO_STATIC_BUILD) + add_definitions(-DOIIO_NO_SSE=1) endif() if(WITH_LLVM) diff --git a/doc/blender_file_format/mystery_of_the_blend.html b/doc/blender_file_format/mystery_of_the_blend.html index b34493ffa3e..599cb4a05bc 100644 --- a/doc/blender_file_format/mystery_of_the_blend.html +++ b/doc/blender_file_format/mystery_of_the_blend.html @@ -187,7 +187,7 @@ The next table describes the information in the file-header.

-Endianness addresses the way values are ordered in a sequence of bytes(see the example below): +Endianness addresses the way values are ordered in a sequence of bytes(see the example below):