File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -101,11 +101,20 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
101101 set (CPACK_RPM_DEV_PACKAGE_REQUIRES "${CPACK_RPM_LIB_PACKAGE_NAME} = ${CPACK_PACKAGE_VERSION} " )
102102 elseif (EXISTS "/etc/debian_version" )
103103 set (CPACK_DEB_COMPONENT_INSTALL ON )
104- if (CMAKE_SIZEOF_VOID_P EQUAL 8)
105- set (__arch "amd64" )
106- else ()
107- set (__arch "i386" )
108- endif ()
104+ find_program (DPKG_CMD dpkg)
105+ if (NOT DPKG_CMD)
106+ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
107+ set (__arch "amd64" )
108+ else ()
109+ set (__arch "i386" )
110+ endif ()
111+ else ()
112+ execute_process (COMMAND "${DPKG_CMD} " --print-architecture
113+ OUTPUT_VARIABLE __arch
114+ OUTPUT_STRIP_TRAILING_WHITESPACE
115+ )
116+ endif ()
117+
109118
110119 set (CPACK_GENERATOR "DEB;TGZ;${CPACK_GENERATOR} " CACHE STRING "List of package generators" )
111120
You can’t perform that action at this time.
0 commit comments