blender/build_files/build_environment/cmake/hiprt.cmake
Jonas Holzman d5d927b670 Deps: Library changes for Blender 5.2 LTS
### New libraries
- meshoptimizer v1.0
- tomli-w 1.2.0
- Tracy 0.13.1

### Updates of existing libraries
- OpenShadingLanguage 1.15.3.0
- OpenPGL 0.7.1
- ThorVG 1.0.3
- OpenUSD 26.03
- OpenImageIO 3.1.13.1
- libpng 1.6.58
- DPC++ 6.3.0
- Embree 4.4.1
- Intel Graphics Compiler v2.30.1
- Manifold 3.4.1
- x265 4.1
- ROCm / HIP 7.1.1 / 7.1.51803
- libexpat 2.7.5
- libtiff 4.7.1
- mesa 25.3.6
- OpenEXR 3.4.10
- OpenSSL 3.5.6
- Python 3.13.13
- sqlite 3.51.3
- libxml2 2.14.6
- ffmpeg 8.1
- Draco 1.5.7
- SDL 3.4.2

Library changes tracking issue ref: #153974

Co-authored-by: Sebastian Parborg <sebastian@blender.org>
Co-authored-by: Ray Molenkamp <github@lazydodo.com>
Co-authored-by: Sahar A. Kashi <salipour@noreply.localhost>
Co-authored-by: Nikita Sirgienko <nikita.sirgienko@intel.com>
Co-authored-by: Bart van der Braak <bart@blender.org>
Co-authored-by: Thomas Dinges <thomas@blender.org>
Co-authored-by: Alaska <Alaskayou01@gmail.com>

Pull Request: https://projects.blender.org/blender/blender/pulls/157180
2026-05-11 19:04:45 +02:00

69 lines
1.8 KiB
CMake

# SPDX-FileCopyrightText: 2017-2024 Blender Authors
#
# SPDX-License-Identifier: GPL-2.0-or-later
if(NOT HIP_FOUND)
message(STATUS "Missing HIP compiler, skipping HIPRT build")
return()
endif()
# Note the utility apps may use png/tiff/gif system libraries, but the
# library itself does not depend on them, so should give no problems.
get_filename_component(_hip_bin_path ${HIP_HIPCC_EXECUTABLE} DIRECTORY)
get_filename_component(_hip_path ${_hip_bin_path} DIRECTORY)
set(HIPRT_EXTRA_ARGS
-DCMAKE_BUILD_TYPE=Release
-DHIP_PATH=${_hip_path}
-DBITCODE=OFF
-DGENERATE_BAKE_KERNEL=OFF
-DNO_UNITTEST=ON
-DBAKE_COMPILED_KERNEL=ON
-DPRECOMPILE=ON
-DPYTHON_EXECUTABLE=${PYTHON_BINARY}
-DFORCE_DISABLE_CUDA=ON
)
set(HIPRT_SOURCE_DIR ${BUILD_DIR}/hiprt/src/external_hiprt)
set(HIPRT_BUILD_DIR ${BUILD_DIR}/hiprt/src/external_hiprt-build)
ExternalProject_Add(external_hiprt
URL file://${PACKAGE_DIR}/${HIPRT_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${HIPRT_HASH_TYPE}=${HIPRT_HASH}
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
PREFIX ${BUILD_DIR}/hiprt
PATCH_COMMAND
${PATCH_CMD} -p 1 -d
${BUILD_DIR}/hiprt/src/external_hiprt <
${PATCH_DIR}/hiprt_rocm7_support.diff
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${LIBDIR}/hiprt
${HIPRT_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/hiprt
)
add_dependencies(
external_hiprt
external_python
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_hiprt after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/hiprt
${HARVEST_TARGET}/hiprt
DEPENDEES install
)
endif()
else()
harvest(external_hiprt hiprt/include hiprt/include "*.h")
harvest(external_hiprt hiprt/bin hiprt/lib "*${SHAREDLIBEXT}*")
harvest(external_hiprt hiprt/bin hiprt/lib "*.hipfb")
endif()