summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackDebGenerator.h
diff options
context:
space:
mode:
authorEric NOULARD <eric.noulard@gmail.com>2012-03-30 15:07:06 (GMT)
committerEric NOULARD <eric.noulard@gmail.com>2012-05-20 20:04:32 (GMT)
commit2a34b579381cd73a18553c331d91b99a42292367 (patch)
treed4c0ae6331fcbd1b4122ed3f364875ffd861d692 /Source/CPack/cmCPackDebGenerator.h
parent77ec098b44ea036078a574754b6c935837a2fd75 (diff)
downloadCMake-2a34b579381cd73a18553c331d91b99a42292367.zip
CMake-2a34b579381cd73a18553c331d91b99a42292367.tar.gz
CMake-2a34b579381cd73a18553c331d91b99a42292367.tar.bz2
CPack allow RPM and DEB generator to be used on OSX.
More generally add the check for possible generator "activation" at runtime depending on a generator specific check. The dynamic behavior is currently implemented only for MacOS and should be fully backward compatible for other system. Inspired-By Tom Hughes <tomtheengineer@gmail.com>
Diffstat (limited to 'Source/CPack/cmCPackDebGenerator.h')
-rw-r--r--Source/CPack/cmCPackDebGenerator.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackDebGenerator.h b/Source/CPack/cmCPackDebGenerator.h
index f536c47..7f2352f 100644
--- a/Source/CPack/cmCPackDebGenerator.h
+++ b/Source/CPack/cmCPackDebGenerator.h
@@ -31,6 +31,17 @@ public:
cmCPackDebGenerator();
virtual ~cmCPackDebGenerator();
+ static bool CanGenerate()
+ {
+#ifdef __APPLE__
+ // on MacOS enable CPackDeb iff dpkg is found
+ return cmSystemTools::FindProgram("dpkg") != "" ? true : false;
+#else
+ // legacy behavior on other systems
+ return true;
+#endif
+ }
+
protected:
virtual int InitializeInternal();
/**