Fix building on non-rpm systems when rpm is not installed
This commit is contained in:
parent
a08af6d0c6
commit
8e70740c7e
@ -497,16 +497,18 @@ else(WIN32)
|
|||||||
# .rpm settings
|
# .rpm settings
|
||||||
# RPM package building needs rpmbuild, but cpack doesn't check for it first...
|
# RPM package building needs rpmbuild, but cpack doesn't check for it first...
|
||||||
find_program(RPM_AVAILABLE "rpmbuild")
|
find_program(RPM_AVAILABLE "rpmbuild")
|
||||||
execute_process(COMMAND rpm -q rpm
|
if(RPM_AVAILABLE)
|
||||||
RESULT_VARIABLE RPM_VERSION_EXIT
|
execute_process(COMMAND rpm -q rpm
|
||||||
OUTPUT_VARIABLE RPMCOMMAND_PACKAGE_VERSION
|
RESULT_VARIABLE RPM_VERSION_EXIT
|
||||||
ERROR_QUIET
|
OUTPUT_VARIABLE RPMCOMMAND_PACKAGE_VERSION
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
ERROR_QUIET
|
||||||
if(RPM_VERSION_EXIT)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
if(NOT RPMCOMMAND_PACKAGE_VERSION STREQUAL "package rpm is not installed")
|
if(RPM_VERSION_EXIT)
|
||||||
message(FATAL_ERROR "Could not determine version of installed rpm package")
|
if(NOT RPMCOMMAND_PACKAGE_VERSION STREQUAL "package rpm is not installed")
|
||||||
endif(NOT RPMCOMMAND_PACKAGE_VERSION STREQUAL "package rpm is not installed")
|
message(FATAL_ERROR "Could not determine version of installed rpm package")
|
||||||
endif(RPM_VERSION_EXIT)
|
endif(NOT RPMCOMMAND_PACKAGE_VERSION STREQUAL "package rpm is not installed")
|
||||||
|
endif(RPM_VERSION_EXIT)
|
||||||
|
endif(RPM_AVAILABLE)
|
||||||
if(RPM_AVAILABLE AND NOT RPM_VERSION_EXIT)
|
if(RPM_AVAILABLE AND NOT RPM_VERSION_EXIT)
|
||||||
message(STATUS "rpmbuild found - enabling .rpm package generation")
|
message(STATUS "rpmbuild found - enabling .rpm package generation")
|
||||||
set(CPACK_GENERATOR ${CPACK_GENERATOR} RPM)
|
set(CPACK_GENERATOR ${CPACK_GENERATOR} RPM)
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
(intentionally).
|
(intentionally).
|
||||||
- Fixed a compilation failure on Fedora when using postgresql
|
- Fixed a compilation failure on Fedora when using postgresql
|
||||||
- Fixed failure to compile with gcc 6
|
- Fixed failure to compile with gcc 6
|
||||||
|
- Fixed failure to compile when rpm is not installed
|
||||||
|
(e.g. on non-rpm systems...)
|
||||||
[31 May 2016]
|
[31 May 2016]
|
||||||
Features:
|
Features:
|
||||||
- Support for postgresql backend added
|
- Support for postgresql backend added
|
||||||
|
Loading…
x
Reference in New Issue
Block a user