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)
|
||||
string(APPEND CMAKE_C_FLAGS " ${OpenMP_C_FLAGS}")
|
||||
string(APPEND CMAKE_CXX_FLAGS " ${OpenMP_CXX_FLAGS}")
|
||||
string(APPEND CMAKE_EXE_LINKER_FLAGS " ${OpenMP_LINKER_FLAGS}")
|
||||
string(APPEND CMAKE_MODULE_LINKER_FLAGS " ${OpenMP_LINKER_FLAGS}")
|
||||
if(DEFINED OpenMP_LINKER_FLAGS)
|
||||
string(APPEND CMAKE_EXE_LINKER_FLAGS " ${OpenMP_LINKER_FLAGS}")
|
||||
string(APPEND CMAKE_MODULE_LINKER_FLAGS " ${OpenMP_LINKER_FLAGS}")
|
||||
endif()
|
||||
else()
|
||||
# Typically avoid adding flags as defines but we can't
|
||||
# pass OpenMP flags to the linker for static builds, meaning
|
||||
|
@ -7,16 +7,18 @@
|
||||
# HIP_VERSION, the HIP compiler version
|
||||
# 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(DEFINED HIP_ROOT_DIR AND HIP_ROOT_DIR)
|
||||
if(HIP_ROOT_DIR)
|
||||
# Pass.
|
||||
elseif(DEFINED ENV{HIP_ROOT_DIR})
|
||||
set(HIP_ROOT_DIR $ENV{HIP_ROOT_DIR})
|
||||
elseif(DEFINED ENV{HIP_PATH})
|
||||
# Built-in environment variable from SDK.
|
||||
set(HIP_ROOT_DIR $ENV{HIP_PATH})
|
||||
else()
|
||||
set(HIP_ROOT_DIR "")
|
||||
endif()
|
||||
|
||||
set(_hip_SEARCH_DIRS
|
||||
|
@ -7,16 +7,18 @@
|
||||
# HIPRT_BITCODE, bitcode file with ray-tracing functionality
|
||||
# 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(DEFINED HIPRT_ROOT_DIR AND HIPRT_ROOT_DIR)
|
||||
if(HIPRT_ROOT_DIR)
|
||||
# Pass.
|
||||
elseif(DEFINED ENV{HIPRT_ROOT_DIR})
|
||||
set(HIPRT_ROOT_DIR $ENV{HIPRT_ROOT_DIR})
|
||||
elseif(DEFINED ENV{HIP_PATH})
|
||||
# Built-in environment variable from SDK.
|
||||
set(HIPRT_ROOT_DIR $ENV{HIP_PATH})
|
||||
else()
|
||||
set(HIPRT_ROOT_DIR "")
|
||||
endif()
|
||||
|
||||
set(_hiprt_SEARCH_DIRS
|
||||
|
@ -11,13 +11,15 @@
|
||||
# This can also be an environment variable.
|
||||
# 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(DEFINED OPTIX_ROOT_DIR AND OPTIX_ROOT_DIR)
|
||||
if(OPTIX_ROOT_DIR)
|
||||
# Pass.
|
||||
elseif(DEFINED ENV{OPTIX_ROOT_DIR})
|
||||
set(OPTIX_ROOT_DIR $ENV{OPTIX_ROOT_DIR})
|
||||
else()
|
||||
set(OPTIX_ROOT_DIR "")
|
||||
endif()
|
||||
|
||||
set(_optix_SEARCH_DIRS
|
||||
|
@ -12,12 +12,14 @@
|
||||
# This can also be an environment variable.
|
||||
# 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.
|
||||
elseif(DEFINED ENV{SYCL_ROOT_DIR} AND NOT $ENV{SYCL_ROOT_DIR} STREQUAL "")
|
||||
set(SYCL_ROOT_DIR $ENV{SYCL_ROOT_DIR})
|
||||
else()
|
||||
set(SYCL_ROOT_DIR "")
|
||||
endif()
|
||||
|
||||
set(_sycl_search_dirs
|
||||
|
@ -37,19 +37,21 @@ else()
|
||||
unset(LIBDIR_GLIBC228_ABI)
|
||||
endif()
|
||||
|
||||
if(NOT (EXISTS ${LIBDIR}))
|
||||
if(WITH_STRICT_BUILD_OPTIONS)
|
||||
message(SEND_ERROR
|
||||
"Unable to find LIBDIR: ${LIBDIR}. "
|
||||
"WITH_LIBS_PRECOMPILED needs to be able to find the LIBDIR for the precompiled libraries."
|
||||
)
|
||||
else()
|
||||
message(STATUS
|
||||
"Unable to find LIBDIR: ${LIBDIR}. system libraries may be used "
|
||||
"(disable WITH_LIBS_PRECOMPILED to suppress this message)."
|
||||
)
|
||||
if(DEFINED LIBDIR)
|
||||
if(NOT (EXISTS ${LIBDIR}))
|
||||
if(WITH_STRICT_BUILD_OPTIONS)
|
||||
message(SEND_ERROR
|
||||
"Unable to find LIBDIR: ${LIBDIR}. "
|
||||
"WITH_LIBS_PRECOMPILED needs to be able to find the LIBDIR for the precompiled libraries."
|
||||
)
|
||||
else()
|
||||
message(STATUS
|
||||
"Unable to find LIBDIR: ${LIBDIR}. system libraries may be used "
|
||||
"(disable WITH_LIBS_PRECOMPILED to suppress this message)."
|
||||
)
|
||||
endif()
|
||||
unset(LIBDIR)
|
||||
endif()
|
||||
unset(LIBDIR)
|
||||
set(WITH_LIBS_PRECOMPILED OFF)
|
||||
endif()
|
||||
endif()
|
||||
@ -136,7 +138,11 @@ if(DEFINED tiff_DIR)
|
||||
endif()
|
||||
|
||||
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)
|
||||
set(VULKAN_ROOT_DIR ${LIBDIR}/vulkan)
|
||||
endif()
|
||||
@ -361,9 +367,11 @@ if(WITH_INPUT_NDOF)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES AND WITH_CYCLES_OSL)
|
||||
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
|
||||
if(EXISTS ${CYCLES_OSL} AND NOT OSL_ROOT)
|
||||
set(OSL_ROOT ${CYCLES_OSL})
|
||||
if(DEFINED LIBDIR)
|
||||
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
|
||||
if(EXISTS ${CYCLES_OSL} AND NOT OSL_ROOT)
|
||||
set(OSL_ROOT ${CYCLES_OSL})
|
||||
endif()
|
||||
endif()
|
||||
find_package_wrapper(OSL)
|
||||
set_and_warn_library_found("OSL" OSL_FOUND WITH_CYCLES_OSL)
|
||||
@ -382,7 +390,7 @@ if(WITH_CYCLES AND WITH_CYCLES_OSL)
|
||||
endif()
|
||||
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")
|
||||
mark_as_advanced(CYCLES_LEVEL_ZERO)
|
||||
if(EXISTS ${CYCLES_LEVEL_ZERO} AND NOT LEVEL_ZERO_ROOT_DIR)
|
||||
@ -509,7 +517,9 @@ if(WITH_PUGIXML)
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_WEBP)
|
||||
set(WEBP_ROOT_DIR ${LIBDIR}/webp)
|
||||
if(DEFINED LIBDIR)
|
||||
set(WEBP_ROOT_DIR ${LIBDIR}/webp)
|
||||
endif()
|
||||
find_package_wrapper(WebP)
|
||||
set_and_warn_library_found("WebP" WEBP_FOUND WITH_IMAGE_WEBP)
|
||||
endif()
|
||||
@ -712,10 +722,11 @@ if(WITH_GHOST_WAYLAND)
|
||||
# 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.
|
||||
# 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()
|
||||
|
||||
if(_use_system_wayland)
|
||||
@ -784,8 +795,11 @@ if(WITH_GHOST_WAYLAND)
|
||||
add_definitions(-DWITH_GHOST_WAYLAND_LIBDECOR)
|
||||
endif()
|
||||
|
||||
if((DEFINED LIBDIR) AND (EXISTS "${LIBDIR}/wayland/bin/wayland-scanner"))
|
||||
if(DEFINED LIBDIR)
|
||||
set(WAYLAND_SCANNER "${LIBDIR}/wayland/bin/wayland-scanner")
|
||||
if(NOT (EXISTS "${WAYLAND_SCANNER}"))
|
||||
message(FATAL_ERROR "${WAYLAND_SCANNER} is missing!")
|
||||
endif()
|
||||
else()
|
||||
pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
|
||||
endif()
|
||||
@ -1124,4 +1138,8 @@ if(PLATFORM_BUNDLED_LIBRARIES)
|
||||
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")
|
||||
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()
|
||||
|
@ -19,7 +19,7 @@ add_definitions(-DBOOST_ALL_NO_LIB)
|
||||
# Clang as well works around the issue.
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
if(EXISTS ${LIBDIR})
|
||||
if(DEFINED LIBDIR)
|
||||
add_definitions(-DARCH_HAS_GNU_STL_EXTENSIONS)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -19,7 +19,7 @@ add_definitions(-DBOOST_ALL_NO_LIB)
|
||||
# Clang as well works around the issue.
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
if(EXISTS ${LIBDIR})
|
||||
if(DEFINED LIBDIR)
|
||||
add_definitions(-DARCH_HAS_GNU_STL_EXTENSIONS)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -906,8 +906,10 @@ file(REMOVE ${CMAKE_BINARY_DIR}/bin/lib/libglapi.so.0.0.0)\n
|
||||
# Install to the same directory as the source, so debian-like
|
||||
# distros are happy with their policy.
|
||||
set(_suffix "site-packages")
|
||||
if(${PYTHON_USD_PATH} MATCHES "dist-packages")
|
||||
set(_suffix "dist-packages")
|
||||
if(0) # TODO: `PYTHON_USD_PATH` isn't defined anywhere.
|
||||
if(${PYTHON_USD_PATH} MATCHES "dist-packages")
|
||||
set(_suffix "dist-packages")
|
||||
endif()
|
||||
endif()
|
||||
install(
|
||||
DIRECTORY ${USD_LIBRARY_DIR}/python/
|
||||
|
Loading…
Reference in New Issue
Block a user