summaryrefslogtreecommitdiffstats
path: root/Modules/CPackRPM.cmake
blob: dc6cd1f950e128daf64bc4225b5a245b5b8767a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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)