diff options
author | Josh Blum <josh@joshknows.com> | 2011-05-17 11:35:34 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-05-17 11:35:34 -0700 |
commit | 17ecc9a442c999f4e752a3c0dc6d237392a499e3 (patch) | |
tree | c2c9938dda84bcf0949c17fd71e86ec42cf71bdd | |
parent | 2960bc88bcb7694f54407a18c488d518de46377f (diff) | |
download | uhd-17ecc9a442c999f4e752a3c0dc6d237392a499e3.tar.gz uhd-17ecc9a442c999f4e752a3c0dc6d237392a499e3.tar.bz2 uhd-17ecc9a442c999f4e752a3c0dc6d237392a499e3.zip |
uhd: some build system tweaks
-rw-r--r-- | host/CMakeLists.txt | 5 | ||||
-rw-r--r-- | host/Modules/UHDPackage.cmake | 76 |
2 files changed, 42 insertions, 39 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index 1559bd6bf..034257551 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -231,7 +231,10 @@ ADD_SUBDIRECTORY(usrp_e_utils) ######################################################################## IF(DEFINED UHD_IMAGES_DIR AND EXISTS "${UHD_IMAGES_DIR}") FILE(GLOB _image_files "${UHD_IMAGES_DIR}/*.*") - MESSAGE(STATUS "Using images: ${_image_files}") + MESSAGE(STATUS "Using images:") + FOREACH(_img ${_image_files}) + MESSAGE(STATUS " ${_img}") + ENDFOREACH(_img) INSTALL(FILES ${_image_files} DESTINATION ${PKG_DATA_DIR}/images COMPONENT images) ENDIF(DEFINED UHD_IMAGES_DIR AND EXISTS "${UHD_IMAGES_DIR}") 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 |