[CMake] [CPACK] debian package

Mathieu Malaterre mathieu.malaterre at gmail.com
Fri Mar 28 12:00:23 EDT 2008


On Fri, Mar 28, 2008 at 4:55 PM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> David Cole wrote:
>  > Why not do a FIND_PROGRAM on dpkg and use it if it's there (and you're
>  > not cross-compiling...) but keep the old logic in place if there is no
>  > dpkg....?
>
>  The version I checked in uses FIND_PROGRAM.

So something like this to support people building debian package on redhat ...

Index: Modules/CPackDeb.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CPackDeb.cmake,v
retrieving revision 1.10
diff -u -r1.10 CPackDeb.cmake
--- Modules/CPackDeb.cmake      28 Mar 2008 15:49:48 -0000      1.10
+++ Modules/CPackDeb.cmake      28 Mar 2008 15:56:37 -0000
@@ -38,7 +38,8 @@
   # $ dpkg --print-architecture
   FIND_PROGRAM(DPKG_CMD dpkg)
   IF(NOT DPKG_CMD)
-    MESSAGE(FATAL_ERROR "Can not find dpkg in your path.")
+    MESSAGE("Can not find dpkg in your path default to i386.")
+    SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
   ENDIF(NOT DPKG_CMD)
   EXECUTE_PROCESS(COMMAND "${DPKG_CMD}" --print-architecture
     OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE)


-- 
Mathieu


More information about the CMake mailing list