CMake: add support for RPM packaging with CPack

This commit is contained in:
Davide Beatrici committed 2018-08-13 05:48:45 +02:00
1 parent 4ed7c559f1
commit de656ba1a7
2 files changed
+17 -2

No files matched your search

Vendored
+10
View File
@@ -35,6 +35,16 @@ if [ -z ${OPENSSL_ROOT_DIR} ]; then
fi
fi
if [ -x "$(command -v rpmbuild)" ]; then
echo "'rpmbuild' executable found, CPack will generate RPM packages."
CMAKE_FLAGS="-DCPACK_GENERATOR='RPM' ${CMAKE_FLAGS}"
else
echo "'rpmbuild' executable not found, CPack will generate DEB packages."
CMAKE_FLAGS="-DCPACK_GENERATOR='DEB' ${CMAKE_FLAGS}"
fi
echo ""
(cd tmp && cmake ${CMAKE_FLAGS} .. || exit 1)