summaryrefslogtreecommitdiffstats
path: root/host/Modules/UHDPackage.cmake
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-05-17 11:35:34 -0700
committerJosh Blum <josh@joshknows.com>2011-05-17 11:35:34 -0700
commit17ecc9a442c999f4e752a3c0dc6d237392a499e3 (patch)
treec2c9938dda84bcf0949c17fd71e86ec42cf71bdd /host/Modules/UHDPackage.cmake
parent2960bc88bcb7694f54407a18c488d518de46377f (diff)
downloaduhd-17ecc9a442c999f4e752a3c0dc6d237392a499e3.tar.gz
uhd-17ecc9a442c999f4e752a3c0dc6d237392a499e3.tar.bz2
uhd-17ecc9a442c999f4e752a3c0dc6d237392a499e3.zip
uhd: some build system tweaks
Diffstat (limited to 'host/Modules/UHDPackage.cmake')
-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