configure: allow to specify CPACK_GENERATOR explicitly
@@ -35,7 +35,10 @@ if [ -z ${OPENSSL_ROOT_DIR} ]; then
fi
fi
-if [ -x "$(command -v rpm)" ]; then
+if [ ! -z ${CPACK_GENERATOR+x} ]; then
+ echo "CPACK_GENERATOR is set, CPack will generate ${CPACK_GENERATOR} packages."
+ CMAKE_FLAGS="-DCPACK_GENERATOR=${CPACK_GENERATOR} ${CMAKE_FLAGS}"
+elif [ -x "$(command -v rpm)" ]; then
echo "'rpm' executable found, CPack will generate RPM packages."
CMAKE_FLAGS="-DCPACK_GENERATOR='RPM' ${CMAKE_FLAGS}"
else
