Skip to content

Commit

Permalink
Fix the Debian package architecture for arm64
Browse files Browse the repository at this point in the history
The system triplet uses aarch64, but Debian calls it arm64, so we need to map
between the two.

See #1973
  • Loading branch information
lmoureaux committed Jan 4, 2024
1 parent b207180 commit 2ed8562
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cmake/CPackConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,16 @@ if(UNIX AND NOT APPLE)
set(CPACK_DEB_COMPONENT_INSTALL "ON")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS "ON")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "fonts-linuxlibertine (>= 5.3.0)")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})

# Set the correct architecture. Be careful with naming differences between
# GCC triplets and Debian
set(DEBIAN_ARCHITECTURE_aarch64 arm64)
if (DEFINED DEBIAN_ARCHITECTURE_${CMAKE_SYSTEM_PROCESSOR})
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE
${DEBIAN_ARCHITECTURE_${CMAKE_SYSTEM_PROCESSOR}})
else()
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
endif()

endif()

Expand Down

0 comments on commit 2ed8562

Please sign in to comment.