diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-08-08 15:33:42 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-08-08 15:33:42 (GMT) |
commit | 7432ef206e47118d8812be5dc62c7250c9e0bfdd (patch) | |
tree | d103f0a5fa3a97c614d1876b494e0515507a3b8b /Modules | |
parent | b34078bca98a052907bb1198e2301d1223b3aae0 (diff) | |
download | CMake-7432ef206e47118d8812be5dc62c7250c9e0bfdd.zip CMake-7432ef206e47118d8812be5dc62c7250c9e0bfdd.tar.gz CMake-7432ef206e47118d8812be5dc62c7250c9e0bfdd.tar.bz2 |
ENH: add empty RPM package generator, Eric Noulard wants to work on it
Alex
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CPack.cmake | 2 | ||||
-rw-r--r-- | Modules/CPackRPM.cmake | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake index ac9be77..1e05036 100644 --- a/Modules/CPack.cmake +++ b/Modules/CPack.cmake @@ -115,6 +115,7 @@ if(NOT CPACK_GENERATOR) option(CPACK_TGZ "Enable to build TGZ packages" ON) option(CPACK_TBZ2 "Enable to build TBZ2 packages" ON) option(CPACK_DEB "Enable to build Debian packages" OFF) + option(CPACK_RPM "Enable to build RPM packages" OFF) option(CPACK_NSIS "Enable to build NSIS packages" OFF) endif(CYGWIN) else(UNIX) @@ -126,6 +127,7 @@ if(NOT CPACK_GENERATOR) cpack_optional_append(CPACK_GENERATOR CPACK_OSXX11 OSXX11) cpack_optional_append(CPACK_GENERATOR CPACK_CYGWIN_BINARY CygwinBinary) cpack_optional_append(CPACK_GENERATOR CPACK_DEB DEB) + cpack_optional_append(CPACK_GENERATOR CPACK_RPM RPM) cpack_optional_append(CPACK_GENERATOR CPACK_NSIS NSIS) cpack_optional_append(CPACK_GENERATOR CPACK_STGZ STGZ) cpack_optional_append(CPACK_GENERATOR CPACK_TGZ TGZ) diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake new file mode 100644 index 0000000..dc6cd1f --- /dev/null +++ b/Modules/CPackRPM.cmake @@ -0,0 +1,14 @@ +IF(CMAKE_BINARY_DIR) + MESSAGE(FATAL_ERROR "CPackRPM.cmake may only be used by CPack internally.") +ENDIF(CMAKE_BINARY_DIR) + +IF(NOT UNIX) + MESSAGE(FATAL_ERROR "CPackRPM.cmake may only be used under UNIX.") +ENDIF(NOT UNIX) + +FIND_PROGRAM(RPMBUILD_EXECUTABLE rpmbuild) + +IF(NOT RPMBUILD_EXECUTABLE) + MESSAGE(FATAL_ERROR "RPM package requires rpmbuild executable") +ENDIF(NOT RPMBUILD_EXECUTABLE) + |