Merge branch 'master' into blender2.8
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 29 Aug 2018 14:42:32 +0000 (16:42 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 29 Aug 2018 14:42:32 +0000 (16:42 +0200)
1  2 
build_files/buildbot/config/blender_linux.cmake
build_files/buildbot/slave_compile.py
build_files/cmake/platform/platform_unix.cmake

index 9625fabec30cf0ba2170f4e0f9647a89298b91ee,473b1dd0d68bfae5459b493c0bf6899c407b761e..0500bfa7f997a7c44a1478887b1564968f226fbe
@@@ -5,7 -5,15 +5,15 @@@ include("${CMAKE_CURRENT_LIST_DIR}/../.
  # Detect which libc we'll be linking against.
  # Some of the paths will depend on this
  
- if(EXISTS "/lib/x86_64-linux-gnu/libc-2.19.so")
+ if(EXISTS "/lib/x86_64-linux-gnu/libc-2.24.so")
+       message(STATUS "Building in GLibc-2.24 environment")
+       set(GLIBC "2.24")
+       set(MULTILIB "/x86_64-linux-gnu")
+ elseif(EXISTS "/lib/i386-linux-gnu//libc-2.24.so")
+       message(STATUS "Building in GLibc-2.24 environment")
+       set(GLIBC "2.24")
+       set(MULTILIB "/i386-linux-gnu")
+ elseif(EXISTS "/lib/x86_64-linux-gnu/libc-2.19.so")
        message(STATUS "Building in GLibc-2.19 environment")
        set(GLIBC "2.19")
        set(MULTILIB "/x86_64-linux-gnu")
@@@ -21,8 -29,9 +29,8 @@@ else(
        message(FATAL_ERROR "Unknown build environment")
  endif()
  
 -# Default to only build Blender, not the player
 +# Default to only build Blender
  set(WITH_BLENDER             ON  CACHE BOOL "" FORCE)
 -set(WITH_PLAYER              OFF CACHE BOOL "" FORCE)
  
  # ######## Linux-specific build options ########
  # Options which are specific to Linux-only platforms
@@@ -40,7 -49,10 +48,10 @@@ set(WITH_PYTHON_INSTALL_NUMPY    ON CAC
  set(WITH_PYTHON_INSTALL_REQUESTS ON CACHE BOOL "" FORCE)
  
  # ######## Release environment specific settings ########
- # All the hardcoded libraru paths and such
+ if (NOT ${GLIBC} STREQUAL "2.24")
+ # All the hardcoded library paths and such
  
  # LLVM libraries
  set(LLVM_VERSION             "3.4"  CACHE STRING "" FORCE)
@@@ -73,7 -85,7 +84,7 @@@ set(SNDFILE_LIBRARY          "/usr/lib$
  
  # OpenAL libraries
  set(OPENAL_ROOT_DIR           "/opt/lib/openal" CACHE STRING "" FORCE)
 -set(OPENAL_INCLUDE_DIR        "${OPENAL_ROOT_DIR}/include" CACHE STRING "" FORCE)
 +set(OPENAL_INCLUDE_DIR        "${OPENAL_ROOT_DIR}/include/AL" CACHE STRING "" FORCE)
  set(OPENAL_LIBRARY
        ${OPENAL_ROOT_DIR}/lib/libopenal.a
        ${OPENAL_ROOT_DIR}/lib/libcommon.a
@@@ -147,5 -159,20 +158,20 @@@ set(BLOSC_LIBRAR
        CACHE BOOL "" FORCE
  )
  
+ else()
+ # Set path to precompiled libraries.
+ set(LIBDIR_NAME ${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR})
+ string(TOLOWER ${LIBDIR_NAME} LIBDIR_NAME)
+ set(LIBDIR "/opt/blender-deps/${LIBDIR_NAME}")
+ # TODO(sergey): Remove once Python is oficially bumped to 3.7.
+ set(PYTHON_VERSION 3.7)
+ # Ensure specific configuration of various libraries.
+ set(Boost_USE_STATIC_LIBS    ON CACHE BOOL "" FORCE)
+ endif()
  # Additional linking libraries
  set(CMAKE_EXE_LINKER_FLAGS   "-lrt -static-libstdc++"  CACHE STRING "" FORCE)
index fc430971c1937b513ffd559ef9cc6e0045b52099,6465f2e634d18b461f2aeb2e3591f41e3c9ffd10..ce4d0c8de669e22c1385a70aeb819fe7d6666a5b
@@@ -60,6 -60,7 +60,6 @@@ if 'cmake' in builder
  
      # Config file to be used (relative to blender's sources root)
      cmake_config_file = "build_files/cmake/config/blender_full.cmake"
 -    cmake_player_config_file = None
      cmake_cuda_config_file = None
  
      # Set build options.
      elif builder.startswith('linux'):
          tokens = builder.split("_")
          glibc = tokens[1]
-         if glibc == 'glibc219':
+         if glibc == 'glibc224':
+             deb_name = "stretch"
+         elif glibc == 'glibc219':
              deb_name = "jessie"
          elif glibc == 'glibc211':
              deb_name = "squeeze"
          cmake_config_file = "build_files/buildbot/config/blender_linux.cmake"
 -        cmake_player_config_file = "build_files/buildbot/config/blender_linux_player.cmake"
          if builder.endswith('x86_64_cmake'):
              chroot_name = 'buildbot_' + deb_name + '_x86_64'
 -            targets = ['player', 'blender']
 +            targets = ['blender']
          elif builder.endswith('i686_cmake'):
              bits = 32
              chroot_name = 'buildbot_' + deb_name + '_i686'
 -            targets = ['player', 'blender']
 +            targets = ['blender']
-         cmake_extra_options.extend(["-DCMAKE_C_COMPILER=/usr/bin/gcc-7",
-                                     "-DCMAKE_CXX_COMPILER=/usr/bin/g++-7"])
+         if deb_name != "stretch":
+             cmake_extra_options.extend(["-DCMAKE_C_COMPILER=/usr/bin/gcc-7",
+                                         "-DCMAKE_CXX_COMPILER=/usr/bin/g++-7"])
  
      cmake_options.append("-C" + os.path.join(blender_dir, cmake_config_file))
  
          target_name = 'install'
          # Tweaking CMake options to respect the target
          target_cmake_options = cmake_options[:]
 -        if target == 'player':
 -            target_cmake_options.append("-C" + os.path.join(blender_dir, cmake_player_config_file))
 -        elif target == 'cuda':
 +        if target == 'cuda':
              target_cmake_options += cuda_cmake_options
              target_chroot_prefix = cuda_chroot_prefix[:]
              target_name = 'cycles_kernel_cuda'
index 6313deb20c9e88fd294923dc2a6f10e13b4793a6,bc6ebeab97c4ffe4c71426feaa4b7f8eb865d0c2..fc9e09b73fd79b871fdbeefe7eb7bef105cffbac
  # Libraries configuration for any *nix system including Linux and Unix.
  
  # Detect precompiled library directory
- set(LIBDIR_NAME ${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR})
- string(TOLOWER ${LIBDIR_NAME} LIBDIR_NAME)
- set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_NAME})
+ if(NOT DEFINED LIBDIR)
+       set(LIBDIR_NAME ${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR})
+       string(TOLOWER ${LIBDIR_NAME} LIBDIR_NAME)
+       set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_NAME})
+ else()
+       message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
+ endif()
  
  if(EXISTS ${LIBDIR})
        file(GLOB LIB_SUBDIRS ${LIBDIR}/*)
@@@ -151,7 -155,7 +155,7 @@@ endif(
  # Codecs
  if(WITH_CODEC_SNDFILE)
        find_package_wrapper(SndFile)
 -      if(NOT SNDFILE_FOUND)
 +      if(NOT LIBSNDFILE_FOUND)
                set(WITH_CODEC_SNDFILE OFF)
        endif()
  endif()