diff options
Diffstat (limited to 'Source/CPack/cmCPackRPMGenerator.h')
-rw-r--r-- | Source/CPack/cmCPackRPMGenerator.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackRPMGenerator.h b/Source/CPack/cmCPackRPMGenerator.h index 4883a0d..eec8204 100644 --- a/Source/CPack/cmCPackRPMGenerator.h +++ b/Source/CPack/cmCPackRPMGenerator.h @@ -35,6 +35,17 @@ public: cmCPackRPMGenerator(); virtual ~cmCPackRPMGenerator(); + static bool CanGenerate() + { +#ifdef __APPLE__ + // on MacOS enable CPackRPM iff rpmbuild is found + return cmSystemTools::FindProgram("rpmbuild") != "" ? true : false; +#else + // legacy behavior on other systems + return true; +#endif + } + protected: virtual int InitializeInternal(); virtual int PackageFiles(); |