Set CPACK_DEBIAN_PACKAGE_ARCHITECTURE instead of CPACK_DEBIAN_ARCHITECTURE

Because that's the variable actually used by CPack.
This commit is contained in:
Roman Donchenko 2015-06-08 16:08:58 +03:00 committed by Dikay900
parent 2bc4486966
commit 5dd76a4791

View File

@ -20,21 +20,21 @@ endif(NOT OPENCV_CUSTOM_PACKAGE_INFO)
#arch
if(X86)
set(CPACK_DEBIAN_ARCHITECTURE "i386")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "i386")
set(CPACK_RPM_PACKAGE_ARCHITECTURE "i686")
elseif(X86_64)
set(CPACK_DEBIAN_ARCHITECTURE "amd64")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
set(CPACK_RPM_PACKAGE_ARCHITECTURE "x86_64")
elseif(ARM)
set(CPACK_DEBIAN_ARCHITECTURE "armhf")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "armhf")
set(CPACK_RPM_PACKAGE_ARCHITECTURE "armhf")
else()
set(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
set(CPACK_RPM_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
endif()
if(CPACK_GENERATOR STREQUAL "DEB")
set(OPENCV_PACKAGE_ARCH_SUFFIX ${CPACK_DEBIAN_ARCHITECTURE})
set(OPENCV_PACKAGE_ARCH_SUFFIX ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE})
elseif(CPACK_GENERATOR STREQUAL "RPM")
set(OPENCV_PACKAGE_ARCH_SUFFIX ${CPACK_RPM_PACKAGE_ARCHITECTURE})
else()