aboutsummaryrefslogtreecommitdiffstats
path: root/host/Modules
diff options
context:
space:
mode:
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