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

Support all debian architectue in cpack #515

Merged
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
19 changes: 14 additions & 5 deletions CMakeCPack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,20 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(CPACK_RPM_DEV_PACKAGE_REQUIRES "${CPACK_RPM_LIB_PACKAGE_NAME} = ${CPACK_PACKAGE_VERSION}")
elseif(EXISTS "/etc/debian_version")
set(CPACK_DEB_COMPONENT_INSTALL ON)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(__arch "amd64")
else()
set(__arch "i386")
endif()
find_program(DPKG_CMD dpkg)
if(NOT DPKG_CMD)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(__arch "amd64")
else()
set(__arch "i386")
endif()
else ()
execute_process(COMMAND "${DPKG_CMD}" --print-architecture
OUTPUT_VARIABLE __arch
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif ()


set(CPACK_GENERATOR "DEB;TGZ;${CPACK_GENERATOR}" CACHE STRING "List of package generators")

Expand Down
Loading