Merge branch 'blender-v4.1-release'
This commit is contained in:
commit
ca8dc11a85
|
@ -1559,8 +1559,10 @@ if(WITH_OPENMP)
|
||||||
if(NOT WITH_OPENMP_STATIC)
|
if(NOT WITH_OPENMP_STATIC)
|
||||||
string(APPEND CMAKE_C_FLAGS " ${OpenMP_C_FLAGS}")
|
string(APPEND CMAKE_C_FLAGS " ${OpenMP_C_FLAGS}")
|
||||||
string(APPEND CMAKE_CXX_FLAGS " ${OpenMP_CXX_FLAGS}")
|
string(APPEND CMAKE_CXX_FLAGS " ${OpenMP_CXX_FLAGS}")
|
||||||
|
if(DEFINED OpenMP_LINKER_FLAGS)
|
||||||
string(APPEND CMAKE_EXE_LINKER_FLAGS " ${OpenMP_LINKER_FLAGS}")
|
string(APPEND CMAKE_EXE_LINKER_FLAGS " ${OpenMP_LINKER_FLAGS}")
|
||||||
string(APPEND CMAKE_MODULE_LINKER_FLAGS " ${OpenMP_LINKER_FLAGS}")
|
string(APPEND CMAKE_MODULE_LINKER_FLAGS " ${OpenMP_LINKER_FLAGS}")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
# Typically avoid adding flags as defines but we can't
|
# Typically avoid adding flags as defines but we can't
|
||||||
# pass OpenMP flags to the linker for static builds, meaning
|
# pass OpenMP flags to the linker for static builds, meaning
|
||||||
|
|
|
@ -7,16 +7,18 @@
|
||||||
# HIP_VERSION, the HIP compiler version
|
# HIP_VERSION, the HIP compiler version
|
||||||
# HIP_FOUND, if the HIP toolkit is found.
|
# HIP_FOUND, if the HIP toolkit is found.
|
||||||
|
|
||||||
|
if(NOT (DEFINED HIP_ROOT_DIR))
|
||||||
|
set(HIP_ROOT_DIR "")
|
||||||
|
endif()
|
||||||
|
|
||||||
# If `HIP_ROOT_DIR` was defined in the environment, use it.
|
# If `HIP_ROOT_DIR` was defined in the environment, use it.
|
||||||
if(DEFINED HIP_ROOT_DIR AND HIP_ROOT_DIR)
|
if(HIP_ROOT_DIR)
|
||||||
# Pass.
|
# Pass.
|
||||||
elseif(DEFINED ENV{HIP_ROOT_DIR})
|
elseif(DEFINED ENV{HIP_ROOT_DIR})
|
||||||
set(HIP_ROOT_DIR $ENV{HIP_ROOT_DIR})
|
set(HIP_ROOT_DIR $ENV{HIP_ROOT_DIR})
|
||||||
elseif(DEFINED ENV{HIP_PATH})
|
elseif(DEFINED ENV{HIP_PATH})
|
||||||
# Built-in environment variable from SDK.
|
# Built-in environment variable from SDK.
|
||||||
set(HIP_ROOT_DIR $ENV{HIP_PATH})
|
set(HIP_ROOT_DIR $ENV{HIP_PATH})
|
||||||
else()
|
|
||||||
set(HIP_ROOT_DIR "")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(_hip_SEARCH_DIRS
|
set(_hip_SEARCH_DIRS
|
||||||
|
|
|
@ -7,16 +7,18 @@
|
||||||
# HIPRT_BITCODE, bitcode file with ray-tracing functionality
|
# HIPRT_BITCODE, bitcode file with ray-tracing functionality
|
||||||
# HIPRT_FOUND, if SDK found
|
# HIPRT_FOUND, if SDK found
|
||||||
|
|
||||||
|
if(NOT (DEFINED HIPRT_ROOT_DIR))
|
||||||
|
set(HIPRT_ROOT_DIR "")
|
||||||
|
endif()
|
||||||
|
|
||||||
# If `HIPRT_ROOT_DIR` was defined in the environment, use it.
|
# If `HIPRT_ROOT_DIR` was defined in the environment, use it.
|
||||||
if(DEFINED HIPRT_ROOT_DIR AND HIPRT_ROOT_DIR)
|
if(HIPRT_ROOT_DIR)
|
||||||
# Pass.
|
# Pass.
|
||||||
elseif(DEFINED ENV{HIPRT_ROOT_DIR})
|
elseif(DEFINED ENV{HIPRT_ROOT_DIR})
|
||||||
set(HIPRT_ROOT_DIR $ENV{HIPRT_ROOT_DIR})
|
set(HIPRT_ROOT_DIR $ENV{HIPRT_ROOT_DIR})
|
||||||
elseif(DEFINED ENV{HIP_PATH})
|
elseif(DEFINED ENV{HIP_PATH})
|
||||||
# Built-in environment variable from SDK.
|
# Built-in environment variable from SDK.
|
||||||
set(HIPRT_ROOT_DIR $ENV{HIP_PATH})
|
set(HIPRT_ROOT_DIR $ENV{HIP_PATH})
|
||||||
else()
|
|
||||||
set(HIPRT_ROOT_DIR "")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(_hiprt_SEARCH_DIRS
|
set(_hiprt_SEARCH_DIRS
|
||||||
|
|
|
@ -11,13 +11,15 @@
|
||||||
# This can also be an environment variable.
|
# This can also be an environment variable.
|
||||||
# OPTIX_FOUND, If false, do not try to use OptiX.
|
# OPTIX_FOUND, If false, do not try to use OptiX.
|
||||||
|
|
||||||
|
if(NOT (DEFINED OPTIX_ROOT_DIR))
|
||||||
|
set(OPTIX_ROOT_DIR "")
|
||||||
|
endif()
|
||||||
|
|
||||||
# If `OPTIX_ROOT_DIR` was defined in the environment, use it.
|
# If `OPTIX_ROOT_DIR` was defined in the environment, use it.
|
||||||
if(DEFINED OPTIX_ROOT_DIR AND OPTIX_ROOT_DIR)
|
if(OPTIX_ROOT_DIR)
|
||||||
# Pass.
|
# Pass.
|
||||||
elseif(DEFINED ENV{OPTIX_ROOT_DIR})
|
elseif(DEFINED ENV{OPTIX_ROOT_DIR})
|
||||||
set(OPTIX_ROOT_DIR $ENV{OPTIX_ROOT_DIR})
|
set(OPTIX_ROOT_DIR $ENV{OPTIX_ROOT_DIR})
|
||||||
else()
|
|
||||||
set(OPTIX_ROOT_DIR "")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(_optix_SEARCH_DIRS
|
set(_optix_SEARCH_DIRS
|
||||||
|
|
|
@ -12,12 +12,14 @@
|
||||||
# This can also be an environment variable.
|
# This can also be an environment variable.
|
||||||
# SYCL_FOUND, If false, then don't try to use SYCL.
|
# SYCL_FOUND, If false, then don't try to use SYCL.
|
||||||
|
|
||||||
if(DEFINED SYCL_ROOT_DIR AND SYCL_ROOT_DIR)
|
if(NOT (DEFINED SYCL_ROOT_DIR))
|
||||||
|
set(SYCL_ROOT_DIR "")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(SYCL_ROOT_DIR)
|
||||||
# Pass.
|
# Pass.
|
||||||
elseif(DEFINED ENV{SYCL_ROOT_DIR} AND NOT $ENV{SYCL_ROOT_DIR} STREQUAL "")
|
elseif(DEFINED ENV{SYCL_ROOT_DIR} AND NOT $ENV{SYCL_ROOT_DIR} STREQUAL "")
|
||||||
set(SYCL_ROOT_DIR $ENV{SYCL_ROOT_DIR})
|
set(SYCL_ROOT_DIR $ENV{SYCL_ROOT_DIR})
|
||||||
else()
|
|
||||||
set(SYCL_ROOT_DIR "")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(_sycl_search_dirs
|
set(_sycl_search_dirs
|
||||||
|
|
|
@ -37,6 +37,7 @@ else()
|
||||||
unset(LIBDIR_GLIBC228_ABI)
|
unset(LIBDIR_GLIBC228_ABI)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(DEFINED LIBDIR)
|
||||||
if(NOT (EXISTS ${LIBDIR}))
|
if(NOT (EXISTS ${LIBDIR}))
|
||||||
if(WITH_STRICT_BUILD_OPTIONS)
|
if(WITH_STRICT_BUILD_OPTIONS)
|
||||||
message(SEND_ERROR
|
message(SEND_ERROR
|
||||||
|
@ -50,6 +51,7 @@ else()
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
unset(LIBDIR)
|
unset(LIBDIR)
|
||||||
|
endif()
|
||||||
set(WITH_LIBS_PRECOMPILED OFF)
|
set(WITH_LIBS_PRECOMPILED OFF)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -136,7 +138,11 @@ if(DEFINED tiff_DIR)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_VULKAN_BACKEND)
|
if(WITH_VULKAN_BACKEND)
|
||||||
if((DEFINED LIBDIR) AND (EXISTS "${LIBDIR}/vulkan") AND (EXISTS "${LIBDIR}/shaderc"))
|
if(DEFINED LIBDIR)
|
||||||
|
# If these are missing, something went wrong (outdated LIBDIR?).
|
||||||
|
if(NOT ((EXISTS "${LIBDIR}/vulkan") AND (EXISTS "${LIBDIR}/shaderc")))
|
||||||
|
message(FATAL_ERROR "${LIBDIR}/vulkan & ${LIBDIR}/shaderc are missing!")
|
||||||
|
endif()
|
||||||
if(NOT DEFINED VULKAN_ROOT_DIR)
|
if(NOT DEFINED VULKAN_ROOT_DIR)
|
||||||
set(VULKAN_ROOT_DIR ${LIBDIR}/vulkan)
|
set(VULKAN_ROOT_DIR ${LIBDIR}/vulkan)
|
||||||
endif()
|
endif()
|
||||||
|
@ -361,10 +367,12 @@ if(WITH_INPUT_NDOF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_CYCLES AND WITH_CYCLES_OSL)
|
if(WITH_CYCLES AND WITH_CYCLES_OSL)
|
||||||
|
if(DEFINED LIBDIR)
|
||||||
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
|
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
|
||||||
if(EXISTS ${CYCLES_OSL} AND NOT OSL_ROOT)
|
if(EXISTS ${CYCLES_OSL} AND NOT OSL_ROOT)
|
||||||
set(OSL_ROOT ${CYCLES_OSL})
|
set(OSL_ROOT ${CYCLES_OSL})
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
find_package_wrapper(OSL)
|
find_package_wrapper(OSL)
|
||||||
set_and_warn_library_found("OSL" OSL_FOUND WITH_CYCLES_OSL)
|
set_and_warn_library_found("OSL" OSL_FOUND WITH_CYCLES_OSL)
|
||||||
|
|
||||||
|
@ -382,7 +390,7 @@ if(WITH_CYCLES AND WITH_CYCLES_OSL)
|
||||||
endif()
|
endif()
|
||||||
add_bundled_libraries(osl/lib)
|
add_bundled_libraries(osl/lib)
|
||||||
|
|
||||||
if(WITH_CYCLES AND WITH_CYCLES_DEVICE_ONEAPI)
|
if(WITH_CYCLES AND WITH_CYCLES_DEVICE_ONEAPI AND DEFINED LIBDIR)
|
||||||
set(CYCLES_LEVEL_ZERO ${LIBDIR}/level-zero CACHE PATH "Path to Level Zero installation")
|
set(CYCLES_LEVEL_ZERO ${LIBDIR}/level-zero CACHE PATH "Path to Level Zero installation")
|
||||||
mark_as_advanced(CYCLES_LEVEL_ZERO)
|
mark_as_advanced(CYCLES_LEVEL_ZERO)
|
||||||
if(EXISTS ${CYCLES_LEVEL_ZERO} AND NOT LEVEL_ZERO_ROOT_DIR)
|
if(EXISTS ${CYCLES_LEVEL_ZERO} AND NOT LEVEL_ZERO_ROOT_DIR)
|
||||||
|
@ -509,7 +517,9 @@ if(WITH_PUGIXML)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_IMAGE_WEBP)
|
if(WITH_IMAGE_WEBP)
|
||||||
|
if(DEFINED LIBDIR)
|
||||||
set(WEBP_ROOT_DIR ${LIBDIR}/webp)
|
set(WEBP_ROOT_DIR ${LIBDIR}/webp)
|
||||||
|
endif()
|
||||||
find_package_wrapper(WebP)
|
find_package_wrapper(WebP)
|
||||||
set_and_warn_library_found("WebP" WEBP_FOUND WITH_IMAGE_WEBP)
|
set_and_warn_library_found("WebP" WEBP_FOUND WITH_IMAGE_WEBP)
|
||||||
endif()
|
endif()
|
||||||
|
@ -712,10 +722,11 @@ if(WITH_GHOST_WAYLAND)
|
||||||
# When dynamically linked WAYLAND is used and `${LIBDIR}/wayland` is present,
|
# When dynamically linked WAYLAND is used and `${LIBDIR}/wayland` is present,
|
||||||
# there is no need to search for the libraries as they are not needed for building.
|
# there is no need to search for the libraries as they are not needed for building.
|
||||||
# Only the headers are needed which can reference the known paths.
|
# Only the headers are needed which can reference the known paths.
|
||||||
if((DEFINED LIBDIR) AND (EXISTS "${LIBDIR}/wayland" AND WITH_GHOST_WAYLAND_DYNLOAD))
|
|
||||||
set(_use_system_wayland OFF)
|
|
||||||
else()
|
|
||||||
set(_use_system_wayland ON)
|
set(_use_system_wayland ON)
|
||||||
|
if(DEFINED LIBDIR)
|
||||||
|
if(EXISTS "${LIBDIR}/wayland" AND WITH_GHOST_WAYLAND_DYNLOAD)
|
||||||
|
set(_use_system_wayland OFF)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(_use_system_wayland)
|
if(_use_system_wayland)
|
||||||
|
@ -784,8 +795,11 @@ if(WITH_GHOST_WAYLAND)
|
||||||
add_definitions(-DWITH_GHOST_WAYLAND_LIBDECOR)
|
add_definitions(-DWITH_GHOST_WAYLAND_LIBDECOR)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if((DEFINED LIBDIR) AND (EXISTS "${LIBDIR}/wayland/bin/wayland-scanner"))
|
if(DEFINED LIBDIR)
|
||||||
set(WAYLAND_SCANNER "${LIBDIR}/wayland/bin/wayland-scanner")
|
set(WAYLAND_SCANNER "${LIBDIR}/wayland/bin/wayland-scanner")
|
||||||
|
if(NOT (EXISTS "${WAYLAND_SCANNER}"))
|
||||||
|
message(FATAL_ERROR "${WAYLAND_SCANNER} is missing!")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
|
pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
|
||||||
endif()
|
endif()
|
||||||
|
@ -1124,4 +1138,8 @@ if(PLATFORM_BUNDLED_LIBRARIES)
|
||||||
set(PLATFORM_ENV_BUILD "LD_LIBRARY_PATH=\"${_library_paths}:$LD_LIBRARY_PATH\"")
|
set(PLATFORM_ENV_BUILD "LD_LIBRARY_PATH=\"${_library_paths}:$LD_LIBRARY_PATH\"")
|
||||||
set(PLATFORM_ENV_INSTALL "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/lib/;$LD_LIBRARY_PATH")
|
set(PLATFORM_ENV_INSTALL "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/lib/;$LD_LIBRARY_PATH")
|
||||||
unset(_library_paths)
|
unset(_library_paths)
|
||||||
|
else()
|
||||||
|
# Quiet unused variable warnings, unfortunately this can't be empty.
|
||||||
|
set(PLATFORM_ENV_BUILD "_DUMMY_ENV_VAR_=1")
|
||||||
|
set(PLATFORM_ENV_INSTALL "_DUMMY_ENV_VAR_=1")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -19,7 +19,7 @@ add_definitions(-DBOOST_ALL_NO_LIB)
|
||||||
# Clang as well works around the issue.
|
# Clang as well works around the issue.
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
if(EXISTS ${LIBDIR})
|
if(DEFINED LIBDIR)
|
||||||
add_definitions(-DARCH_HAS_GNU_STL_EXTENSIONS)
|
add_definitions(-DARCH_HAS_GNU_STL_EXTENSIONS)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -19,7 +19,7 @@ add_definitions(-DBOOST_ALL_NO_LIB)
|
||||||
# Clang as well works around the issue.
|
# Clang as well works around the issue.
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
if(EXISTS ${LIBDIR})
|
if(DEFINED LIBDIR)
|
||||||
add_definitions(-DARCH_HAS_GNU_STL_EXTENSIONS)
|
add_definitions(-DARCH_HAS_GNU_STL_EXTENSIONS)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -906,9 +906,11 @@ file(REMOVE ${CMAKE_BINARY_DIR}/bin/lib/libglapi.so.0.0.0)\n
|
||||||
# Install to the same directory as the source, so debian-like
|
# Install to the same directory as the source, so debian-like
|
||||||
# distros are happy with their policy.
|
# distros are happy with their policy.
|
||||||
set(_suffix "site-packages")
|
set(_suffix "site-packages")
|
||||||
|
if(0) # TODO: `PYTHON_USD_PATH` isn't defined anywhere.
|
||||||
if(${PYTHON_USD_PATH} MATCHES "dist-packages")
|
if(${PYTHON_USD_PATH} MATCHES "dist-packages")
|
||||||
set(_suffix "dist-packages")
|
set(_suffix "dist-packages")
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
install(
|
install(
|
||||||
DIRECTORY ${USD_LIBRARY_DIR}/python/
|
DIRECTORY ${USD_LIBRARY_DIR}/python/
|
||||||
DESTINATION ${TARGETDIR_VER}/python/${_target_LIB}/python${PYTHON_VERSION}/${_suffix}
|
DESTINATION ${TARGETDIR_VER}/python/${_target_LIB}/python${PYTHON_VERSION}/${_suffix}
|
||||||
|
|
Loading…
Reference in New Issue