mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-30 05:12:26 -04: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)
|
elseif (APPLE)
|
||||||
set (CPACK_GENERATOR "DragNDrop")
|
set (CPACK_GENERATOR "DragNDrop")
|
||||||
else ()
|
else ()
|
||||||
#
|
find_program (DPKG_BUILDER dpkg-buildpackage DOC "Debian package builder")
|
||||||
# Derive the correct filename for a Debian package because the DEB
|
if (DPKG_BUILDER)
|
||||||
# generator doesn't do this correctly at present.
|
#
|
||||||
#
|
# Derive the correct filename for a Debian package because the DEB
|
||||||
find_program (DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems")
|
# generator doesn't do this correctly at present.
|
||||||
if (DPKG_PROGRAM)
|
#
|
||||||
execute_process (
|
find_program (DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems")
|
||||||
COMMAND ${DPKG_PROGRAM} --print-architecture
|
if (DPKG_PROGRAM)
|
||||||
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
|
execute_process (
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
COMMAND ${DPKG_PROGRAM} --print-architecture
|
||||||
)
|
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
|
||||||
else (DPKG_PROGRAM)
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
set (CPACK_DEBIAN_PACKAGE_ARCHITECTURE noarch)
|
)
|
||||||
endif (DPKG_PROGRAM)
|
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 ()
|
endif ()
|
||||||
|
|
||||||
set (CPACK_DEBIAN_PACKAGE_DESCRIPTION "${PROJECT_DESCRIPTION}")
|
set (CPACK_DEBIAN_PACKAGE_DESCRIPTION "${PROJECT_DESCRIPTION}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user