summaryrefslogtreecommitdiffstats
path: root/Modules/CPackDeb.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-03-28 15:49:48 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-03-28 15:49:48 (GMT)
commit79e581ab802381545fa7fe22d54710200fbe0951 (patch)
tree3cbc2d225cfc7d1cda5adf1f0562d9778bb9d6c6 /Modules/CPackDeb.cmake
parentc761fd772fba53cb8d13872fab079fa1a4270656 (diff)
downloadCMake-79e581ab802381545fa7fe22d54710200fbe0951.zip
CMake-79e581ab802381545fa7fe22d54710200fbe0951.tar.gz
CMake-79e581ab802381545fa7fe22d54710200fbe0951.tar.bz2
ENH: remove hard codeded arch
Diffstat (limited to 'Modules/CPackDeb.cmake')
-rw-r--r--Modules/CPackDeb.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index e41e8d1..b95e5ef 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -36,7 +36,11 @@ ENDIF(NOT CPACK_DEBIAN_PACKAGE_VERSION)
IF(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
# There is no such thing as i686 architecture on debian, you should use i386 instead
# $ dpkg --print-architecture
- EXECUTE_PROCESS(COMMAND dpkg --print-architecture
+ FIND_PROGRAM(DPKG_CMD dpkg)
+ IF(NOT DPKG_CMD)
+ MESSAGE(FATAL_ERROR "Can not find dpkg in your path.")
+ ENDIF(NOT DPKG_CMD)
+ EXECUTE_PROCESS(COMMAND "${DPKG_CMD}" --print-architecture
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
ENDIF(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)