From 2ce39c4de5f98cb51eeb6498c6c3d23c873d0ebc Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 28 Mar 2011 16:53:28 -0700 Subject: uhd: expand UHD_RELEASE_MODE setup to all debian and redhats --- host/Modules/UHDPackage.cmake | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index e7aa386f6..1bae55b4c 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -22,6 +22,20 @@ INCLUDE(UHDVersion) #sets version information # Setup package file name ######################################################################## IF(UHD_RELEASE_MODE) + + #set generator type for recognized systems + IF(APPLE) + SET(CPACK_GENERATOR PackageMaker) + ELSEIF(WIN32) + SET(CPACK_GENERATOR NSIS) + ELSEIF(UNIX AND EXISTS "/etc/debian_version") + SET(CPACK_GENERATOR DEB) + ELSEIF(UNIX AND EXISTS "/etc/redhat-release") + SET(CPACK_GENERATOR RPM) + ELSE() + SET(CPACK_GENERATOR TGZ) + ENDIF() + FIND_PROGRAM(LSB_RELEASE_EXECUTABLE lsb_release) FIND_PROGRAM(UNAME_EXECUTABLE uname) IF(LSB_RELEASE_EXECUTABLE AND UNAME_EXECUTABLE) @@ -40,16 +54,8 @@ IF(UHD_RELEASE_MODE) OUTPUT_VARIABLE _machine OUTPUT_STRIP_TRAILING_WHITESPACE ) - #set generator type for recognized systems - IF(${_os_name} STREQUAL Ubuntu) - SET(CPACK_GENERATOR DEB) - ENDIF() - IF(${_os_name} STREQUAL Fedora) - SET(CPACK_GENERATOR RPM) - ENDIF() - #when the library suffix should be 64 (applies to redhat linux family) - IF(EXISTS "/etc/redhat-release" AND _machine MATCHES "64$") + IF(CPACK_GENERATOR STREQUAL RPM AND _machine MATCHES "64$") SET(LIB_SUFFIX 64) ENDIF() @@ -58,12 +64,6 @@ IF(UHD_RELEASE_MODE) ENDIF(LSB_RELEASE_EXECUTABLE AND UNAME_EXECUTABLE) - IF(APPLE) - SET(CPACK_GENERATOR PackageMaker) - ELSEIF(WIN32) - SET(CPACK_GENERATOR NSIS) - ENDIF() - ENDIF(UHD_RELEASE_MODE) ######################################################################## -- cgit v1.2.3