mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-23 20:58:55 -05:00
Only do package generation if appropriate tools are available
Debian packages are only build if dpkg-buildpackage is available and RPM package generation is only done if rpmbuild is available. Merged from wsjtx-1.4 branch. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4504 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
4083407d74
commit
0b01920726
@ -969,22 +969,30 @@ if (WIN32)
|
||||
elseif (APPLE)
|
||||
set (CPACK_GENERATOR "DragNDrop")
|
||||
else ()
|
||||
#
|
||||
# Derive the correct filename for a Debian package because the DEB
|
||||
# generator doesn't do this correctly at present.
|
||||
#
|
||||
find_program (DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems")
|
||||
if (DPKG_PROGRAM)
|
||||
execute_process (
|
||||
COMMAND ${DPKG_PROGRAM} --print-architecture
|
||||
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
else (DPKG_PROGRAM)
|
||||
set (CPACK_DEBIAN_PACKAGE_ARCHITECTURE noarch)
|
||||
endif (DPKG_PROGRAM)
|
||||
find_program (DPKG_BUILDER dpkg-buildpackage DOC "Debian package builder")
|
||||
if (DPKG_BUILDER)
|
||||
#
|
||||
# Derive the correct filename for a Debian package because the DEB
|
||||
# generator doesn't do this correctly at present.
|
||||
#
|
||||
find_program (DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems")
|
||||
if (DPKG_PROGRAM)
|
||||
execute_process (
|
||||
COMMAND ${DPKG_PROGRAM} --print-architecture
|
||||
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
else (DPKG_PROGRAM)
|
||||
set (CPACK_DEBIAN_PACKAGE_ARCHITECTURE noarch)
|
||||
endif (DPKG_PROGRAM)
|
||||
|
||||
set (CPACK_GENERATOR "DEB" "RPM")
|
||||
list (APPEND CPACK_GENERATOR "DEB")
|
||||
endif (DPKG_BUILDER)
|
||||
|
||||
find_program (RPMBUILDER rpmbuild DOC "RPM package builder")
|
||||
if (RPMBUILDER)
|
||||
list (APPEND CPACK_GENERATOR "RPM")
|
||||
endif (RPBUILDER)
|
||||
endif ()
|
||||
|
||||
set (CPACK_DEBIAN_PACKAGE_DESCRIPTION "${PROJECT_DESCRIPTION}")
|
||||
|
Loading…
Reference in New Issue
Block a user