Browse Source

configure: allow to specify CPACK_GENERATOR explicitly

Ilya Shipitsin 6 years ago
parent
commit
07c5716374
1 changed files with 4 additions and 1 deletions
  1. 4 1
      configure

+ 4 - 1
configure

@@ -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