summaryrefslogtreecommitdiffstats
path: root/host/Modules
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-05-17 15:12:38 -0700
committerJosh Blum <josh@joshknows.com>2011-05-17 15:12:38 -0700
commit0aff497dacc9cc4eba5d800cc46343da083cfdf1 (patch)
tree86ba88e9b103e82140a0413b1ed62ef8d38d0d7b /host/Modules
parent9065043544dd129e16d7bb30ae8cb8d5562c3326 (diff)
parent17ecc9a442c999f4e752a3c0dc6d237392a499e3 (diff)
downloaduhd-release_003_001_000.tar.gz
uhd-release_003_001_000.tar.bz2
uhd-release_003_001_000.zip
Merge branch 'master' into release_workrelease_003_001_000
Diffstat (limited to 'host/Modules')
-rw-r--r--host/Modules/UHDPackage.cmake76
1 files changed, 38 insertions, 38 deletions
diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake
index c230f1b1e..e36793d73 100644
--- a/host/Modules/UHDPackage.cmake
+++ b/host/Modules/UHDPackage.cmake
@@ -36,46 +36,46 @@ IF(LINUX AND EXISTS "/etc/redhat-release")
ENDIF()
########################################################################
+# Set generator type for recognized systems
+########################################################################
+IF(CPACK_GENERATOR)
+ #already set
+ELSEIF(APPLE)
+ SET(CPACK_GENERATOR PackageMaker)
+ELSEIF(WIN32)
+ SET(CPACK_GENERATOR NSIS)
+ELSEIF(DEBIAN)
+ SET(CPACK_GENERATOR DEB)
+ELSEIF(REDHAT)
+ SET(CPACK_GENERATOR RPM)
+ELSE()
+ SET(CPACK_GENERATOR TGZ)
+ENDIF()
+
+########################################################################
# 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(DEBIAN)
- SET(CPACK_GENERATOR DEB)
- ELSEIF(REDHAT)
- SET(CPACK_GENERATOR RPM)
- ELSE()
- SET(CPACK_GENERATOR TGZ)
- ENDIF()
-
- FIND_PROGRAM(LSB_RELEASE_EXECUTABLE lsb_release)
- IF(LSB_RELEASE_EXECUTABLE)
-
- #extract system information by executing the commands
- EXECUTE_PROCESS(
- COMMAND ${LSB_RELEASE_EXECUTABLE} --short --id
- OUTPUT_VARIABLE LSB_ID OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- EXECUTE_PROCESS(
- COMMAND ${LSB_RELEASE_EXECUTABLE} --short --release
- OUTPUT_VARIABLE LSB_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE
- )
-
- #set a more sensible package name for this system
- SET(CPACK_PACKAGE_FILE_NAME "UHD-${UHD_VERSION}-${LSB_ID}-${LSB_RELEASE}-${CMAKE_SYSTEM_PROCESSOR}")
-
- ENDIF(LSB_RELEASE_EXECUTABLE)
-
- IF(${CPACK_GENERATOR} STREQUAL NSIS)
- SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${CMAKE_PROJECT_NAME}")
- ENDIF()
-
-ENDIF(UHD_RELEASE_MODE)
+FIND_PROGRAM(LSB_RELEASE_EXECUTABLE lsb_release)
+IF((DEBIAN OR REDHAT) AND LSB_RELEASE_EXECUTABLE)
+
+ #extract system information by executing the commands
+ EXECUTE_PROCESS(
+ COMMAND ${LSB_RELEASE_EXECUTABLE} --short --id
+ OUTPUT_VARIABLE LSB_ID OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ EXECUTE_PROCESS(
+ COMMAND ${LSB_RELEASE_EXECUTABLE} --short --release
+ OUTPUT_VARIABLE LSB_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+
+ #set a more sensible package name for this system
+ SET(CPACK_PACKAGE_FILE_NAME "UHD-${UHD_VERSION}-${LSB_ID}-${LSB_RELEASE}-${CMAKE_SYSTEM_PROCESSOR}")
+
+ENDIF()
+
+IF(${CPACK_GENERATOR} STREQUAL NSIS)
+ SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${CMAKE_PROJECT_NAME}")
+ENDIF()
########################################################################
# Setup CPack General