summaryrefslogtreecommitdiffstats
path: root/host/Modules/UHDPackage.cmake
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-03-28 16:53:28 -0700
committerJosh Blum <josh@joshknows.com>2011-03-28 16:53:28 -0700
commit2ce39c4de5f98cb51eeb6498c6c3d23c873d0ebc (patch)
treeca76a796ca8ade58b49f5c3791d18d9ccb493fc1 /host/Modules/UHDPackage.cmake
parent69d19fedd3fd7945a21daac0ae14c06fee78ee91 (diff)
downloaduhd-2ce39c4de5f98cb51eeb6498c6c3d23c873d0ebc.tar.gz
uhd-2ce39c4de5f98cb51eeb6498c6c3d23c873d0ebc.tar.bz2
uhd-2ce39c4de5f98cb51eeb6498c6c3d23c873d0ebc.zip
uhd: expand UHD_RELEASE_MODE setup to all debian and redhats
Diffstat (limited to 'host/Modules/UHDPackage.cmake')
-rw-r--r--host/Modules/UHDPackage.cmake30
1 files 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)
########################################################################