[Bf-blender-cvs] [42736e0b3f8] tmp-vfx-platform-2023: Merge remote-tracking branch 'origin/master' into tmp-vfx-platform-2023

Ray Molenkamp noreply at git.blender.org
Wed Oct 5 19:19:57 CEST 2022


Commit: 42736e0b3f85dc248186dd6dc5349a99addc8c84
Author: Ray Molenkamp
Date:   Wed Oct 5 09:46:18 2022 -0600
Branches: tmp-vfx-platform-2023
https://developer.blender.org/rB42736e0b3f85dc248186dd6dc5349a99addc8c84

Merge remote-tracking branch 'origin/master' into tmp-vfx-platform-2023

===================================================================



===================================================================

diff --cc build_files/build_environment/CMakeLists.txt
index ccf2ae91cb9,468a434b887..d1ef13e1d01
--- a/build_files/build_environment/CMakeLists.txt
+++ b/build_files/build_environment/CMakeLists.txt
@@@ -94,10 -94,9 +94,11 @@@ include(cmake/pugixml.cmake
  include(cmake/ispc.cmake)
  include(cmake/openimagedenoise.cmake)
  include(cmake/embree.cmake)
+ include(cmake/openpgl.cmake)
  include(cmake/fmt.cmake)
  include(cmake/robinmap.cmake)
 +include(cmake/fribidi.cmake)
 +include(cmake/harfbuzz.cmake)
  if(NOT APPLE)
    include(cmake/xr_openxr.cmake)
    if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
diff --cc build_files/cmake/macros.cmake
index ea14e5c0730,3acea19079b..e067fc0f2c2
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@@ -1218,93 -1216,4 +1218,89 @@@ endmacro(
  
  macro(without_system_libs_end)
    unset(CMAKE_IGNORE_PATH)
-   if(APPLE)
-     # FIRST is the default.
-     set(CMAKE_FIND_FRAMEWORK FIRST)
-   endif()
  endmacro()
 +
 +# Utility to gather and install precompiled shared libraries.
 +macro(add_bundled_libraries library_dir)
 +  if(EXISTS ${LIBDIR})
 +    set(_library_dir ${LIBDIR}/${library_dir})
 +    if(WIN32)
 +      file(GLOB _all_library_versions ${_library_dir}/*\.dll)
 +    elseif(APPLE)
 +      file(GLOB _all_library_versions ${_library_dir}/*\.dylib*)
 +    else()
 +      file(GLOB _all_library_versions ${_library_dir}/*\.so*)
 +    endif()
 +    list(APPEND PLATFORM_BUNDLED_LIBRARIES ${_all_library_versions})
 +    list(APPEND PLATFORM_BUNDLED_LIBRARY_DIRS ${_library_dir})
 +    unset(_all_library_versions)
 +    unset(_library_dir)
 + endif()
 +endmacro()
 +
 +macro(windows_install_shared_manifest)
 +  set(options OPTIONAL DEBUG RELEASE ALL)
 +  set(oneValueArgs)
 +  set(multiValueArgs FILES)
 +  cmake_parse_arguments(WINDOWS_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
 +  # If none of the options are set assume ALL.
 +  unset(WINDOWS_CONFIGURATIONS)
 +  if(NOT WINDOWS_INSTALL_ALL AND
 +     NOT WINDOWS_INSTALL_DEBUG AND
 +     NOT WINDOWS_INSTALL_RELEASE)
 +    set(WINDOWS_INSTALL_ALL TRUE)
 +  endif()
 +  # If all is set, turn both DEBUG and RELEASE on.
 +  if(WINDOWS_INSTALL_ALL)
 +    set(WINDOWS_INSTALL_DEBUG TRUE)
 +    set(WINDOWS_INSTALL_RELEASE TRUE)
 +  endif()
 +  if(WINDOWS_INSTALL_DEBUG)
 +    set(WINDOWS_CONFIGURATIONS "${WINDOWS_CONFIGURATIONS};Debug")
 +    list(APPEND WINDOWS_SHARED_MANIFEST_DEBUG ${WINDOWS_INSTALL_FILES})
 +  endif()
 +  if(WINDOWS_INSTALL_RELEASE)
 +    list(APPEND WINDOWS_SHARED_MANIFEST_RELEASE ${WINDOWS_INSTALL_FILES})
 +    set(WINDOWS_CONFIGURATIONS "${WINDOWS_CONFIGURATIONS};Release;RelWithDebInfo;MinSizeRel")
 +  endif()
 +  install(FILES ${WINDOWS_INSTALL_FILES}
 +          CONFIGURATIONS ${WINDOWS_CONFIGURATIONS}
 +          DESTINATION "./blender.shared"
 +  )
 +endmacro()
 +
 +macro(windows_generate_manifest)
 +  set(options)
 +  set(oneValueArgs OUTPUT NAME)
 +  set(multiValueArgs FILES)
 +  cmake_parse_arguments(WINDOWS_MANIFEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
 +  set(MANIFEST_LIBS "")
 +  foreach(lib ${WINDOWS_MANIFEST_FILES})
 +    get_filename_component(filename ${lib} NAME)
 +    set(MANIFEST_LIBS "${MANIFEST_LIBS}    <file name=\"${filename}\"/>\n")
 +  endforeach()
 +  configure_file(${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.manifest.in ${WINDOWS_MANIFEST_OUTPUT} @ONLY)
 +endmacro()
 +
 +macro(windows_generate_shared_manifest)
 +  windows_generate_manifest(
 +    FILES "${WINDOWS_SHARED_MANIFEST_DEBUG}"
 +    OUTPUT "${CMAKE_BINARY_DIR}/Debug/blender.shared.manifest"
 +    NAME "blender.shared"
 +  )
 +  windows_generate_manifest(
 +    FILES "${WINDOWS_SHARED_MANIFEST_RELEASE}"
 +    OUTPUT "${CMAKE_BINARY_DIR}/Release/blender.shared.manifest"
 +    NAME "blender.shared"
 +  )
 +  install(
 +      FILES ${CMAKE_BINARY_DIR}/Release/blender.shared.manifest
 +      DESTINATION "./blender.shared"
 +      CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
 +  )
 +  install(
 +      FILES ${CMAKE_BINARY_DIR}/Debug/blender.shared.manifest
 +      DESTINATION "./blender.shared"
 +      CONFIGURATIONS Debug
 +  )
 +endmacro()
diff --cc build_files/cmake/platform/platform_apple.cmake
index 1ec64f2747f,9f1824ec827..a94986a010b
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@@ -21,6 -21,18 +21,7 @@@ function(print_found_statu
    endif()
  endfunction()
  
 -# Utility to install precompiled shared libraries.
 -macro(add_bundled_libraries library)
 -  if(EXISTS ${LIBDIR})
 -    set(_library_dir ${LIBDIR}/${library}/lib)
 -    file(GLOB _all_library_versions ${_library_dir}/*\.dylib*)
 -    list(APPEND PLATFORM_BUNDLED_LIBRARIES ${_all_library_versions})
 -    list(APPEND PLATFORM_BUNDLED_LIBRARY_DIRS ${_library_dir})
 -    unset(_all_library_versions)
 -    unset(_library_dir)
+   endif()
 -endmacro()
 -
  # ------------------------------------------------------------------------
  # Find system provided libraries.
  
diff --cc build_files/cmake/platform/platform_unix.cmake
index c19724ceb99,35103ec441b..405afcec836
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@@ -656,47 -691,130 +694,130 @@@ endif(
  
  if(WITH_GHOST_WAYLAND)
    find_package(PkgConfig)
-   pkg_check_modules(wayland-client REQUIRED wayland-client>=1.12)
-   pkg_check_modules(wayland-egl REQUIRED wayland-egl)
-   pkg_check_modules(wayland-scanner REQUIRED wayland-scanner)
-   pkg_check_modules(xkbcommon REQUIRED xkbcommon)
-   pkg_check_modules(wayland-cursor REQUIRED wayland-cursor)
+   pkg_check_modules(wayland-client wayland-client>=1.12)
+   pkg_check_modules(wayland-egl wayland-egl)
+   pkg_check_modules(wayland-scanner wayland-scanner)
+   pkg_check_modules(xkbcommon xkbcommon)
+   pkg_check_modules(wayland-cursor wayland-cursor)
+   pkg_check_modules(wayland-protocols wayland-protocols>=1.15)
+ 
+   if(${wayland-protocols_FOUND})
+     pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
+   else()
+     # CentOS 7 packages have too old a version, a newer version exist in the
+     # precompiled libraries.
+     find_path(WAYLAND_PROTOCOLS_DIR
+       NAMES unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
+       PATH_SUFFIXES share/wayland-protocols
+       PATHS ${LIBDIR}/wayland-protocols
+     )
+ 
+     if(EXISTS ${WAYLAND_PROTOCOLS_DIR})
+       set(wayland-protocols_FOUND ON)
+     endif()
+   endif()
+ 
+   if (NOT ${wayland-client_FOUND})
+     message(STATUS "wayland-client not found, disabling WITH_GHOST_WAYLAND")
+     set(WITH_GHOST_WAYLAND OFF)
+   endif()
+   if (NOT ${wayland-egl_FOUND})
+     message(STATUS "wayland-egl not found, disabling WITH_GHOST_WAYLAND")
+     set(WITH_GHOST_WAYLAND OFF)
+   endif()
+   if (NOT ${wayland-scanner_FOUND})
+     message(STATUS "wayland-scanner not found, disabling WITH_GHOST_WAYLAND")
+     set(WITH_GHOST_WAYLAND OFF)
+   endif()
+   if (NOT ${wayland-cursor_FOUND})
+     message(STATUS "wayland-cursor not found, disabling WITH_GHOST_WAYLAND")
+     set(WITH_GHOST_WAYLAND OFF)
+   endif()
+   if (NOT ${wayland-protocols_FOUND})
+     message(STATUS "wayland-protocols not found, disabling WITH_GHOST_WAYLAND")
+     set(WITH_GHOST_WAYLAND OFF)
+   endif()
+   if (NOT ${xkbcommon_FOUND})
+     message(STATUS "xkbcommon not found, disabling WITH_GHOST_WAYLAND")
+     set(WITH_GHOST_WAYLAND OFF)
+   endif()
  
+   if(WITH_GHOST_WAYLAND)
 -    if(WITH_GHOST_WAYLAND_DBUS)
 -      pkg_check_modules(dbus REQUIRED dbus-1)
 -    endif()
 +  if(WITH_GHOST_WAYLAND_DBUS)
 +    pkg_check_modules(dbus REQUIRED dbus-1)
 +  endif()
  
 -    if(WITH_GHOST_WAYLAND_LIBDECOR)
 -      pkg_check_modules(libdecor REQUIRED libdecor-0>=0.1)
 -    endif()
 +  if(WITH_GHOST_WAYLAND_LIBDECOR)
 +    pkg_check_modules(libdecor REQUIRED libdecor-0>=0.1)
 +  endif()
  
 +  list(APPEND PLATFORM_LINKLIBS
 +    ${xkbcommon_LINK_LIBRARIES}
 +  )
 +
 +  if(NOT WITH_GHOST_WAYLAND_DYNLOAD)
      list(APPEND PLATFORM_LINKLIBS
 -      ${xkbcommon_LINK_LIBRARIES}
 +      ${wayland-client_LINK_LIBRARIES}
 +      ${wayland-egl_LINK_LIBRARIES}
 +      ${wayland-cursor_LINK_LIBRARIES}
      )
 +  endif()
  
 -    if(NOT WITH_GHOST_WAYLAND_DYNLOAD)
 -      list(APPEND PLATFORM_LINKLIBS
 -        ${wayland-client_LINK_LIBRARIES}
 -        ${wayland-egl_LINK_LIBRARIES}
 -        ${wayland-cursor_LINK_LIBRARIES}
 -      )
 -    endif()
 +  if(WITH_GHOST_WAYLAND_DBUS)
 +    list(APPEND PLATFORM_LINKLIBS
 +      ${dbus_LINK_LIBRARIES}
 +    )
 +    add_definitions(-DWITH_GHOST_WAYLAND_DBUS)
 +  endif()
  
 -    if(WITH_GHOST_WAYLAND_DBUS)
 +  if(WITH_GHOST_WAYLAND_LIBDECOR)
 +    if(NOT WITH_GHOST_WAYLAND_DYNLOAD)
        list(APPEND PLATFORM_LINKLIBS
 -        ${dbus_LINK_LIBRARIES}
 +        ${libdecor_LIBRARIES}
        )
 -      add_definitions(-DWITH_GHOST_WAYLAND_DBUS)
 -    endif()
 -
 -    if(WITH_GHOST_WAYLAND_LIBDECOR)
 -      if(NOT WITH_GHOST_WAYLAND_DYNLOAD)
 -        list(APPEND PLATFORM_LINKLIBS
 -          ${libdecor_LIBRARIES}
 -        )
 -      endif()
 -      add_definitions(-DWITH_GHOST_WAYLAND_LIBDECOR)
      endif()
 +    add_definitions(-DWITH_GHOST_WAYLAND_LIBDECOR)
 +  endif()
+ 
+     if(EXISTS "${LIBDIR}/wayland/bin/wayland-scanner")
+       set(WAYLAND_SCANNER "${LIBDIR}/wayland/bin/wayland-scanner")
+     else()
+       pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
+     endif()
+ 
+     # When using dynamic loading, headers generated
+     # from older versions of `wayland-scanner` aren't compatible.
+     if(WITH_GHOST_WAYLAND_DYNLOAD)
+       execute_process(
+         COMMAND ${WAYLAND_SCANNER} --version
+         # The version is written to the `stderr`.
+         ERROR_VARIABLE _wayland_scanner_out
+         ERROR_STRIP_TRAILING_WHITESPACE
+       )
+       if(NOT "${_wayland_scanner_out}" STREQUAL "")
+         string(
+           REGEX REPLACE
+           "^wayland-scanner[ \t]+([0-9]+)\.([0-9]+).*"
+           "\\1.\\2"
+           _wayland_scanner_ver
+           "${_wayland_scanner_out}"
+         )
+         if("${_wayland_scanner_ver}" VERSION_LESS "1.20")
+           message(
+             FATAL_ERR

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list