diff options
Diffstat (limited to 'host/cmake')
-rw-r--r-- | host/cmake/Modules/FindORC.cmake | 2 | ||||
-rw-r--r-- | host/cmake/Modules/FindUSB1.cmake | 2 | ||||
-rw-r--r-- | host/cmake/Modules/UHDPackage.cmake | 34 |
3 files changed, 20 insertions, 18 deletions
diff --git a/host/cmake/Modules/FindORC.cmake b/host/cmake/Modules/FindORC.cmake index 0d9fc9ca1..e13eae235 100644 --- a/host/cmake/Modules/FindORC.cmake +++ b/host/cmake/Modules/FindORC.cmake @@ -9,7 +9,7 @@ PKG_CHECK_MODULES(PC_ORC_V4_11 "orc-0.4 > 0.4.11") #we are using the pkg config as a version check #if we have pkg config, the right version must be found #the alternative is that no pkg config orc is found -if (PC_ORC_V4_11_FOUND OR (NOT PC_ORC_FOUND AND NOT PC_ORC_V4_11_FOUND)) +if (PC_ORC_V4_11_FOUND OR NOT PC_ORC_FOUND) FIND_PATH( ORC_INCLUDE_DIRS diff --git a/host/cmake/Modules/FindUSB1.cmake b/host/cmake/Modules/FindUSB1.cmake index 96e2a5aae..1e8e3ba03 100644 --- a/host/cmake/Modules/FindUSB1.cmake +++ b/host/cmake/Modules/FindUSB1.cmake @@ -23,7 +23,7 @@ FIND_PATH(LIBUSB_INCLUDE_DIRS set(libusb1_library_names usb-1.0 libusb-1.0) #libusb-1.0 compatible library on freebsd -if((CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") OR (CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD")) +if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD") list(APPEND libusb1_library_names usb) endif() diff --git a/host/cmake/Modules/UHDPackage.cmake b/host/cmake/Modules/UHDPackage.cmake index d1c0fc099..a050a083d 100644 --- a/host/cmake/Modules/UHDPackage.cmake +++ b/host/cmake/Modules/UHDPackage.cmake @@ -63,22 +63,24 @@ ELSEIF(DEBIAN AND LIBUHDDEV_PKG) ELSEIF(DEBIAN AND UHDHOST_PKG) SET(CPACK_PACKAGE_FILE_NAME "uhd-host_${TRIMMED_UHD_VERSION}_${CMAKE_SYSTEM_PROCESSOR}") ELSE() - 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(DEBIAN OR REDHAT) + 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) + ENDIF(DEBIAN OR REDHAT) ENDIF(DEBIAN AND LIBUHD_PKG) IF(${CPACK_GENERATOR} STREQUAL NSIS) |