diff options
author | Eric NOULARD <eric.noulard@gmail.com> | 2012-03-30 15:07:06 (GMT) |
---|---|---|
committer | Eric NOULARD <eric.noulard@gmail.com> | 2012-05-20 20:04:32 (GMT) |
commit | 2a34b579381cd73a18553c331d91b99a42292367 (patch) | |
tree | d4c0ae6331fcbd1b4122ed3f364875ffd861d692 /Source/CPack/cmCPackDebGenerator.h | |
parent | 77ec098b44ea036078a574754b6c935837a2fd75 (diff) | |
download | CMake-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.h | 11 |
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(); /** |