Skip to content

Commit

Permalink
Fix Debian packaging (#8524)
Browse files Browse the repository at this point in the history
* Handle DESTDIR in HalidePackageConfigHelpers.cmake

Fixes #8521

* Fix Halide_[SO]VERSION_OVERRIDE when value is 0

Fixes #8522

* Upgrade LLVM to 19.1.6
  • Loading branch information
alexreinking authored Dec 19, 2024
1 parent d3f19bd commit ac2cd23
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

env:
# TODO: detect this from repo somehow: https://github.com/halide/Halide/issues/8406
LLVM_VERSION: 19.1.4
LLVM_VERSION: 19.1.6
FLATBUFFERS_VERSION: 23.5.26
WABT_VERSION: 1.0.36

Expand Down
4 changes: 2 additions & 2 deletions cmake/HalidePackageConfigHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function(_Halide_install_pkgdeps)
set(depFile "${CMAKE_CURRENT_BINARY_DIR}/${ARG_FILE_NAME}")

_Halide_install_code(
"file(READ \"\${CMAKE_INSTALL_PREFIX}/${ARG_DESTINATION}/${ARG_EXPORT_FILE}\" target_cmake)"
"file(READ \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${ARG_DESTINATION}/${ARG_EXPORT_FILE}\" target_cmake)"
"file(WRITE \"${depFile}.in\" \"\")"
)

Expand All @@ -104,4 +104,4 @@ function(_Halide_install_pkgdeps)
DESTINATION "${ARG_DESTINATION}"
COMPONENT "${ARG_COMPONENT}"
)
endfunction()
endfunction()
9 changes: 5 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@ set(Halide_VERSION_OVERRIDE "${Halide_VERSION}"
CACHE STRING "VERSION to set for custom Halide packaging")
mark_as_advanced(Halide_VERSION_OVERRIDE)

if (Halide_VERSION_OVERRIDE)
# Empty is considered a value distinct from not-defined
if (NOT Halide_VERSION_OVERRIDE STREQUAL "")
# CMake treats an empty VERSION property differently from leaving it unset.
# We also can't check the boolean-ness of Halide_VERSION_OVERRIDE because
# VERSION 0 is valid. See: https://github.com/halide/Halide/issues/8522
set_target_properties(Halide PROPERTIES VERSION "${Halide_VERSION_OVERRIDE}")
endif ()

set(Halide_SOVERSION_OVERRIDE "${Halide_VERSION_MAJOR}"
CACHE STRING "SOVERSION to set for custom Halide packaging")
mark_as_advanced(Halide_SOVERSION_OVERRIDE)

if (Halide_SOVERSION_OVERRIDE)
# Empty is considered a value distinct from not-defined
if (NOT Halide_SOVERSION_OVERRIDE STREQUAL "")
set_target_properties(Halide PROPERTIES SOVERSION "${Halide_SOVERSION_OVERRIDE}")
endif ()

Expand Down

0 comments on commit ac2cd23

Please sign in to comment.