Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CPack package naming when cross-compiling #8492

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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