Skip to content

Commit

Permalink
Fix CPack package naming when cross-compiling (#8492)
Browse files Browse the repository at this point in the history
* Fix CPack package naming when cross-compiling

* trigger buildbots

---------

Co-authored-by: Steven Johnson <[email protected]>
  • Loading branch information
alexreinking and steven-johnson authored Dec 2, 2024
1 parent 166cd92 commit e5e2510
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packaging/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,16 @@ set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_LIST_DIR}/common/Welcome.txt")
set(CPACK_RESOURCE_FILE_LICENSE "${Halide_SOURCE_DIR}/LICENSE.txt")
set(CPACK_RESOURCE_FILE_README "${Halide_SOURCE_DIR}/README.md")

set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${Halide_VERSION}-${Halide_HOST_TARGET}")
if (NOT CPACK_PACKAGE_FILE_NAME)
set(arch_tag "${Halide_CMAKE_TARGET}")
list(REMOVE_DUPLICATES arch_tag)
list(SORT arch_tag)
if (arch_tag MATCHES "arm-64-osx;x86-64-osx")
set(arch_tag "universal2")
endif ()
string(REPLACE ";" "_" arch_tag "${arch_tag}")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${Halide_VERSION}-${arch_tag}")
endif ()

include(CPack)

Expand Down

0 comments on commit e5e2510

Please sign in to comment.