mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2026-09-19 09:51:28 +03:00
configure: select TGZ rather than DEB for CPack on macOS
configure picks the CPack generator by probing for an rpm executable: if present it selects RPM, otherwise it falls through to DEB. macOS has neither, so it selects DEB, which is not a meaningful package format there. Add a Darwin branch selecting TGZ, which always works. An explicit CPACK_GENERATOR in the environment still takes precedence, so anyone wanting productbuild or DragNDrop can ask for it. This only affects 'make package'; ordinary builds never read CPACK_GENERATOR, which is why macOS CI is unaffected.
This commit is contained in:
@@ -40,6 +40,9 @@ fi
|
||||
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 [ "$(uname -s)" = "Darwin" ]; then
|
||||
echo "Darwin detected, CPack will generate TGZ archives."
|
||||
CMAKE_FLAGS="-DCPACK_GENERATOR='TGZ' ${CMAKE_FLAGS}"
|
||||
elif [ -x "$(command -v rpm)" ]; then
|
||||
echo "'rpm' executable found, CPack will generate RPM packages."
|
||||
CMAKE_FLAGS="-DCPACK_GENERATOR='RPM' ${CMAKE_FLAGS}"
|
||||
|
||||
Reference in New Issue
Block a user