From a963caab9b6500ecef015fa5c514f2a7ae23046f Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 21 Mar 2011 16:40:21 -0700 Subject: uhd: setup cpack components for component based installers --- host/Modules/UHDPackage.cmake | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'host/Modules/UHDPackage.cmake') diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index 2a11d407b..ed705148a 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -19,7 +19,7 @@ INCLUDE(UHDVersion) #sets version information ######################################################################## -# Setup CPack +# Setup CPack General ######################################################################## SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ettus Research - Universal Hardware Driver") SET(CPACK_PACKAGE_VENDOR "Ettus Research LLC") @@ -29,6 +29,35 @@ SET(CPACK_PACKAGE_VERSION_MINOR ${UHD_VERSION_MINOR}) SET(CPACK_PACKAGE_VERSION_PATCH ${UHD_VERSION_PATCH}) SET(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README) SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE) + +######################################################################## +# Setup CPack Components +######################################################################## +SET(CPACK_COMPONENT_LIBRARIES_GROUP "Development") +SET(CPACK_COMPONENT_HEADERS_GROUP "Development") +SET(CPACK_COMPONENT_UTILITIES_GROUP "Runtime") +SET(CPACK_COMPONENT_EXAMPLES_GROUP "Runtime") +SET(CPACK_COMPONENT_TESTS_GROUP "Runtime") +SET(CPACK_COMPONENT_MANUAL_GROUP "Documentation") +SET(CPACK_COMPONENT_DOXYGEN_GROUP "Documentation") + +SET(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries") +SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ Headers") +SET(CPACK_COMPONENT_UTILITIES_DISPLAY_NAME "Utilities") +SET(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Examples") +SET(CPACK_COMPONENT_TESTS_DISPLAY_NAME "Unit Tests") +SET(CPACK_COMPONENT_MANUAL_DISPLAY_NAME "Manual") +SET(CPACK_COMPONENT_DOXYGEN_DISPLAY_NAME "Doxygen") + +SET(CPACK_COMPONENT_UTILITIES_DEPENDS libraries) +SET(CPACK_COMPONENT_EXAMPLES_DEPENDS libraries) +SET(CPACK_COMPONENT_TESTS_DEPENDS libraries) + +SET(CPACK_COMPONENTS_ALL libraries headers utilities examples tests manual doxygen) + +######################################################################## +# Setup CPack Debian +######################################################################## SET(BOOST_MIN_VERSION 1.36) #used in setup for boost STRING(REPLACE "," ", " CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-date-time-dev (>= ${BOOST_MIN_VERSION})," @@ -40,5 +69,11 @@ STRING(REPLACE "," ", " CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-thread-dev (>= ${BOOST_MIN_VERSION})" ) SET(CPACK_DEBIAN_PACKAGE_RECOMMENDS "python, python-tk") + +######################################################################## +# Setup CPack RPM +######################################################################## SET(CPACK_RPM_PACKAGE_REQUIRES "boost-devel >= ${BOOST_MIN_VERSION}") + +######################################################################## INCLUDE(CPack) #include after setting vars -- cgit v1.2.3 From 55b4ca73b44735523e5ab3348735a64cbf19cf30 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 22 Mar 2011 10:37:33 -0700 Subject: uhd: setup UHD_VERSION and CPACK_PACKAGE_FILE_NAME --- host/Modules/UHDPackage.cmake | 8 ++++++++ host/Modules/UHDVersion.cmake | 1 + images/CMakeLists.txt | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'host/Modules/UHDPackage.cmake') diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index ed705148a..6e0af31ba 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -18,6 +18,14 @@ ######################################################################## INCLUDE(UHDVersion) #sets version information +######################################################################## +# Setup package file name +######################################################################## +SET(CPACK_PACKAGE_FILE_NAME "UHD-${UHD_VERSION}") +IF(DEFINED UHD_PACKAGE_SUFFIX) #append optional suffix (usually system type) + SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${UHD_PACKAGE_SUFFIX}) +ENDIF(DEFINED UHD_PACKAGE_SUFFIX) + ######################################################################## # Setup CPack General ######################################################################## diff --git a/host/Modules/UHDVersion.cmake b/host/Modules/UHDVersion.cmake index b0b2ae475..0061dffbc 100644 --- a/host/Modules/UHDVersion.cmake +++ b/host/Modules/UHDVersion.cmake @@ -24,6 +24,7 @@ INCLUDE(UHDPython) #requires python for parsing SET(UHD_VERSION_MAJOR 003) #API compatibility number SET(UHD_VERSION_MINOR 0) #Timestamp of git commit SET(UHD_VERSION_PATCH 0) #Short hash of git commit +SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}") ######################################################################## # Find GIT to get repo information diff --git a/images/CMakeLists.txt b/images/CMakeLists.txt index baac333ea..f93b28ca4 100644 --- a/images/CMakeLists.txt +++ b/images/CMakeLists.txt @@ -32,7 +32,7 @@ SET(CPACK_PACKAGE_CONTACT "support@ettus.com") SET(CPACK_PACKAGE_VERSION_MAJOR ${UHD_VERSION_MAJOR}) SET(CPACK_PACKAGE_VERSION_MINOR ${UHD_VERSION_MINOR}) SET(CPACK_PACKAGE_VERSION_PATCH ${UHD_VERSION_PATCH}) -SET(CPACK_PACKAGE_FILE_NAME "UHD-images-${UHD_VERSION_MAJOR}-${UHD_VERSION_MINOR}-${UHD_VERSION_PATCH}") +SET(CPACK_PACKAGE_FILE_NAME "UHD-images-${UHD_VERSION}") SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "all") INCLUDE(CPack) #include after setting vars MESSAGE(STATUS "Version: ${CPACK_PACKAGE_VERSION}") -- cgit v1.2.3 From 52d66cca9d4930f49dd95696b2075d92662bc85e Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 22 Mar 2011 11:57:44 -0700 Subject: uhd: work on debian package requirements in cpack setup --- host/CMakeLists.txt | 4 ++-- host/Modules/UHDPackage.cmake | 15 +++------------ 2 files changed, 5 insertions(+), 14 deletions(-) (limited to 'host/Modules/UHDPackage.cmake') diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index 590f1b138..4160e8186 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -110,8 +110,8 @@ IF(MSVC) ENDIF(BOOST_ALL_DYN_LINK) ENDIF(MSVC) -SET(Boost_ADDITIONAL_VERSIONS "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44") -FIND_PACKAGE(Boost ${BOOST_MIN_VERSION} COMPONENTS ${BOOST_REQUIRED_COMPONENTS}) +SET(Boost_ADDITIONAL_VERSIONS "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44" "1.45.0" "1.45" "1.46.0" "1.46") +FIND_PACKAGE(Boost 1.36 COMPONENTS ${BOOST_REQUIRED_COMPONENTS}) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index 6e0af31ba..9c0aa0de8 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -23,7 +23,7 @@ INCLUDE(UHDVersion) #sets version information ######################################################################## SET(CPACK_PACKAGE_FILE_NAME "UHD-${UHD_VERSION}") IF(DEFINED UHD_PACKAGE_SUFFIX) #append optional suffix (usually system type) - SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${UHD_PACKAGE_SUFFIX}) + SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${UHD_PACKAGE_SUFFIX}") ENDIF(DEFINED UHD_PACKAGE_SUFFIX) ######################################################################## @@ -66,22 +66,13 @@ SET(CPACK_COMPONENTS_ALL libraries headers utilities examples tests manual doxyg ######################################################################## # Setup CPack Debian ######################################################################## -SET(BOOST_MIN_VERSION 1.36) #used in setup for boost -STRING(REPLACE "," ", " CPACK_DEBIAN_PACKAGE_DEPENDS - "libboost-date-time-dev (>= ${BOOST_MIN_VERSION})," - "libboost-filesystem-dev (>= ${BOOST_MIN_VERSION})," - "libboost-program-options-dev (>= ${BOOST_MIN_VERSION})," - "libboost-regex-dev (>= ${BOOST_MIN_VERSION})," - "libboost-system-dev (>= ${BOOST_MIN_VERSION})," - "libboost-test-dev (>= ${BOOST_MIN_VERSION})," - "libboost-thread-dev (>= ${BOOST_MIN_VERSION})" -) +SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libusb-1.0-0, libboost-dev") SET(CPACK_DEBIAN_PACKAGE_RECOMMENDS "python, python-tk") ######################################################################## # Setup CPack RPM ######################################################################## -SET(CPACK_RPM_PACKAGE_REQUIRES "boost-devel >= ${BOOST_MIN_VERSION}") +SET(CPACK_RPM_PACKAGE_REQUIRES "boost-devel") ######################################################################## INCLUDE(CPack) #include after setting vars -- cgit v1.2.3 From c7bd55e2e117173b643113282507ec3d4b227377 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 22 Mar 2011 12:10:59 -0700 Subject: uhd: added libusb1 to CPACK_RPM_PACKAGE_REQUIRES --- host/Modules/UHDPackage.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host/Modules/UHDPackage.cmake') diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index 9c0aa0de8..a4da03177 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -72,7 +72,7 @@ SET(CPACK_DEBIAN_PACKAGE_RECOMMENDS "python, python-tk") ######################################################################## # Setup CPack RPM ######################################################################## -SET(CPACK_RPM_PACKAGE_REQUIRES "boost-devel") +SET(CPACK_RPM_PACKAGE_REQUIRES "boost-devel, libusb1") ######################################################################## INCLUDE(CPack) #include after setting vars -- cgit v1.2.3 From 585b0455e8176d8e1abc2722f2a0e56eb89e1c58 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 22 Mar 2011 19:21:59 -0700 Subject: uhd: try to be smart when setting up cpack when UHD_PACKAGE_MODE=AUTO --- host/Modules/UHDPackage.cmake | 36 ++++++++++++++++++++++++++++++++---- host/Modules/UHDVersion.cmake | 4 +++- 2 files changed, 35 insertions(+), 5 deletions(-) (limited to 'host/Modules/UHDPackage.cmake') diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index a4da03177..03483e042 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -21,10 +21,38 @@ INCLUDE(UHDVersion) #sets version information ######################################################################## # Setup package file name ######################################################################## -SET(CPACK_PACKAGE_FILE_NAME "UHD-${UHD_VERSION}") -IF(DEFINED UHD_PACKAGE_SUFFIX) #append optional suffix (usually system type) - SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${UHD_PACKAGE_SUFFIX}") -ENDIF(DEFINED UHD_PACKAGE_SUFFIX) +IF(UHD_PACKAGE_MODE STREQUAL AUTO) + FIND_PROGRAM(LSB_RELEASE_EXECUTABLE lsb_release) + FIND_PROGRAM(UNAME_EXECUTABLE uname) + IF(LSB_RELEASE_EXECUTABLE AND UNAME_EXECUTABLE) + + #extract system information by executing the commands + EXECUTE_PROCESS( + COMMAND ${LSB_RELEASE_EXECUTABLE} --short --id + OUTPUT_VARIABLE _os_name OUTPUT_STRIP_TRAILING_WHITESPACE + ) + EXECUTE_PROCESS( + COMMAND ${LSB_RELEASE_EXECUTABLE} --short --release + OUTPUT_VARIABLE _os_version OUTPUT_STRIP_TRAILING_WHITESPACE + ) + EXECUTE_PROCESS( + COMMAND ${UNAME_EXECUTABLE} --machine + OUTPUT_VARIABLE _machine OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + #set generator type for recognized systems + IF(${_os_name} STREQUAL Ubuntu) + SET(CPACK_GENERATOR DEB) + ENDIF() + IF(${_os_name} STREQUAL Fedora) + SET(CPACK_GENERATOR RPM) + ENDIF() + + #set a more sensible package name for this system + SET(CPACK_PACKAGE_FILE_NAME "UHD-${UHD_VERSION}-${_os_name}-${_os_version}-${_machine}") + + ENDIF(LSB_RELEASE_EXECUTABLE AND UNAME_EXECUTABLE) +ENDIF(UHD_PACKAGE_MODE STREQUAL AUTO) ######################################################################## # Setup CPack General diff --git a/host/Modules/UHDVersion.cmake b/host/Modules/UHDVersion.cmake index 0061dffbc..9b20bb98a 100644 --- a/host/Modules/UHDVersion.cmake +++ b/host/Modules/UHDVersion.cmake @@ -24,7 +24,6 @@ INCLUDE(UHDPython) #requires python for parsing SET(UHD_VERSION_MAJOR 003) #API compatibility number SET(UHD_VERSION_MINOR 0) #Timestamp of git commit SET(UHD_VERSION_PATCH 0) #Short hash of git commit -SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}") ######################################################################## # Find GIT to get repo information @@ -61,3 +60,6 @@ IF(GIT_FOUND) ) SET(UHD_VERSION_PATCH ${_git_rev}) ENDIF(GIT_FOUND) + +######################################################################## +SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}") -- cgit v1.2.3 From 95b966a599c0030921dc6b530ca8c94633d905f6 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 23 Mar 2011 18:48:30 -0700 Subject: uhd: update copyright headers with automated script --- host/Modules/UHDComponent.cmake | 2 +- host/Modules/UHDPackage.cmake | 2 +- host/Modules/UHDPython.cmake | 2 +- host/include/uhd/types/serial.hpp | 2 +- host/include/uhd/types/time_spec.hpp | 2 +- host/include/uhd/usrp/gps_ctrl.hpp | 2 +- host/include/uhd/usrp/tune_helper.hpp | 2 +- host/lib/device.cpp | 2 +- host/lib/ic_reg_maps/common.py | 2 +- host/lib/ic_reg_maps/gen_ad9522_regs.py | 2 +- host/lib/transport/if_addrs.cpp | 2 +- host/lib/usrp/CMakeLists.txt | 2 +- host/lib/usrp/dboard_base.cpp | 2 +- host/lib/usrp/dsp_utils.cpp | 2 +- host/lib/usrp/gps_ctrl.cpp | 2 +- host/lib/usrp/tune_helper.cpp | 2 +- host/lib/usrp/usrp1/clock_ctrl.hpp | 2 +- host/lib/usrp/usrp1/usrp1_ctrl.cpp | 2 +- host/lib/usrp/usrp1/usrp1_ctrl.hpp | 2 +- host/lib/usrp/usrp1/usrp1_iface.cpp | 2 +- host/lib/usrp/usrp1/usrp1_iface.hpp | 2 +- host/lib/usrp/usrp2/CMakeLists.txt | 2 +- host/lib/usrp/usrp2/clock_ctrl.cpp | 2 +- host/lib/usrp/usrp2/usrp2_iface.hpp | 2 +- host/lib/usrp/usrp_e100/clock_ctrl.hpp | 2 +- host/lib/usrp/usrp_e100/usrp_e100_iface.hpp | 2 +- host/lib/utils/images.cpp | 2 +- host/tests/addr_test.cpp | 2 +- host/tests/byteswap_test.cpp | 2 +- host/tests/dict_test.cpp | 2 +- host/tests/module_test.cpp | 2 +- host/tests/subdev_spec_test.cpp | 2 +- host/tests/time_spec_test.cpp | 2 +- host/tests/tune_helper_test.cpp | 2 +- host/tests/vrt_test.cpp | 2 +- host/tests/warning_test.cpp | 2 +- 36 files changed, 36 insertions(+), 36 deletions(-) (limited to 'host/Modules/UHDPackage.cmake') diff --git a/host/Modules/UHDComponent.cmake b/host/Modules/UHDComponent.cmake index 4ea55bbb9..52b7450d5 100644 --- a/host/Modules/UHDComponent.cmake +++ b/host/Modules/UHDComponent.cmake @@ -1,5 +1,5 @@ # -# Copyright 2010 Ettus Research LLC +# Copyright 2010-2011 Ettus Research LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index 03483e042..8ca8995cd 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -1,5 +1,5 @@ # -# Copyright 2010 Ettus Research LLC +# Copyright 2010-2011 Ettus Research LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/host/Modules/UHDPython.cmake b/host/Modules/UHDPython.cmake index 345e0187d..90a778609 100644 --- a/host/Modules/UHDPython.cmake +++ b/host/Modules/UHDPython.cmake @@ -1,5 +1,5 @@ # -# Copyright 2010 Ettus Research LLC +# Copyright 2010-2011 Ettus Research LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/host/include/uhd/types/serial.hpp b/host/include/uhd/types/serial.hpp index ef6125933..8281fd3ec 100644 --- a/host/include/uhd/types/serial.hpp +++ b/host/include/uhd/types/serial.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/include/uhd/types/time_spec.hpp b/host/include/uhd/types/time_spec.hpp index 2046fbd3f..02de20ea1 100644 --- a/host/include/uhd/types/time_spec.hpp +++ b/host/include/uhd/types/time_spec.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/include/uhd/usrp/gps_ctrl.hpp b/host/include/uhd/usrp/gps_ctrl.hpp index 74f984ee0..21d400b3b 100644 --- a/host/include/uhd/usrp/gps_ctrl.hpp +++ b/host/include/uhd/usrp/gps_ctrl.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/include/uhd/usrp/tune_helper.hpp b/host/include/uhd/usrp/tune_helper.hpp index e97ab0298..0d468a4e2 100644 --- a/host/include/uhd/usrp/tune_helper.hpp +++ b/host/include/uhd/usrp/tune_helper.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/device.cpp b/host/lib/device.cpp index 0002bee6e..1b3daa103 100644 --- a/host/lib/device.cpp +++ b/host/lib/device.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/ic_reg_maps/common.py b/host/lib/ic_reg_maps/common.py index a509936b4..24f5bf8be 100644 --- a/host/lib/ic_reg_maps/common.py +++ b/host/lib/ic_reg_maps/common.py @@ -1,5 +1,5 @@ # -# Copyright 2010 Ettus Research LLC +# Copyright 2010-2011 Ettus Research LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/host/lib/ic_reg_maps/gen_ad9522_regs.py b/host/lib/ic_reg_maps/gen_ad9522_regs.py index 86605c34a..1512da811 100755 --- a/host/lib/ic_reg_maps/gen_ad9522_regs.py +++ b/host/lib/ic_reg_maps/gen_ad9522_regs.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2010 Ettus Research LLC +# Copyright 2010-2011 Ettus Research LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/host/lib/transport/if_addrs.cpp b/host/lib/transport/if_addrs.cpp index b7c8ad844..83a1ee56f 100644 --- a/host/lib/transport/if_addrs.cpp +++ b/host/lib/transport/if_addrs.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/CMakeLists.txt b/host/lib/usrp/CMakeLists.txt index 59dabbd58..018beb417 100644 --- a/host/lib/usrp/CMakeLists.txt +++ b/host/lib/usrp/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2010 Ettus Research LLC +# Copyright 2010-2011 Ettus Research LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/dboard_base.cpp b/host/lib/usrp/dboard_base.cpp index 999dd9ffc..e14c9d144 100644 --- a/host/lib/usrp/dboard_base.cpp +++ b/host/lib/usrp/dboard_base.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/dsp_utils.cpp b/host/lib/usrp/dsp_utils.cpp index a3a557060..2686e895b 100644 --- a/host/lib/usrp/dsp_utils.cpp +++ b/host/lib/usrp/dsp_utils.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/gps_ctrl.cpp b/host/lib/usrp/gps_ctrl.cpp index e0ab6de90..ff8e9cee6 100644 --- a/host/lib/usrp/gps_ctrl.cpp +++ b/host/lib/usrp/gps_ctrl.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/tune_helper.cpp b/host/lib/usrp/tune_helper.cpp index ced80c187..9637301ad 100644 --- a/host/lib/usrp/tune_helper.cpp +++ b/host/lib/usrp/tune_helper.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp1/clock_ctrl.hpp b/host/lib/usrp/usrp1/clock_ctrl.hpp index 645472f02..339d547e6 100644 --- a/host/lib/usrp/usrp1/clock_ctrl.hpp +++ b/host/lib/usrp/usrp1/clock_ctrl.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp1/usrp1_ctrl.cpp b/host/lib/usrp/usrp1/usrp1_ctrl.cpp index 3fa6cb8b7..22e9fd1ce 100644 --- a/host/lib/usrp/usrp1/usrp1_ctrl.cpp +++ b/host/lib/usrp/usrp1/usrp1_ctrl.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp1/usrp1_ctrl.hpp b/host/lib/usrp/usrp1/usrp1_ctrl.hpp index ee68f8401..970ca2951 100644 --- a/host/lib/usrp/usrp1/usrp1_ctrl.hpp +++ b/host/lib/usrp/usrp1/usrp1_ctrl.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp1/usrp1_iface.cpp b/host/lib/usrp/usrp1/usrp1_iface.cpp index 0c37610ce..ea7c1cea5 100644 --- a/host/lib/usrp/usrp1/usrp1_iface.cpp +++ b/host/lib/usrp/usrp1/usrp1_iface.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp1/usrp1_iface.hpp b/host/lib/usrp/usrp1/usrp1_iface.hpp index fdb7464ce..2ebcdbacc 100644 --- a/host/lib/usrp/usrp1/usrp1_iface.hpp +++ b/host/lib/usrp/usrp1/usrp1_iface.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp2/CMakeLists.txt b/host/lib/usrp/usrp2/CMakeLists.txt index e8811a8fb..49be9ac7d 100644 --- a/host/lib/usrp/usrp2/CMakeLists.txt +++ b/host/lib/usrp/usrp2/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2010 Ettus Research LLC +# Copyright 2010-2011 Ettus Research LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp2/clock_ctrl.cpp b/host/lib/usrp/usrp2/clock_ctrl.cpp index abda53bf2..7572ed6b1 100644 --- a/host/lib/usrp/usrp2/clock_ctrl.cpp +++ b/host/lib/usrp/usrp2/clock_ctrl.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp2/usrp2_iface.hpp b/host/lib/usrp/usrp2/usrp2_iface.hpp index df53ec66a..08f3955f1 100644 --- a/host/lib/usrp/usrp2/usrp2_iface.hpp +++ b/host/lib/usrp/usrp2/usrp2_iface.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp_e100/clock_ctrl.hpp b/host/lib/usrp/usrp_e100/clock_ctrl.hpp index 1f9960ce4..623fbc73b 100644 --- a/host/lib/usrp/usrp_e100/clock_ctrl.hpp +++ b/host/lib/usrp/usrp_e100/clock_ctrl.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/usrp/usrp_e100/usrp_e100_iface.hpp b/host/lib/usrp/usrp_e100/usrp_e100_iface.hpp index cb0ca2dd4..d9fe96db7 100644 --- a/host/lib/usrp/usrp_e100/usrp_e100_iface.hpp +++ b/host/lib/usrp/usrp_e100/usrp_e100_iface.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/lib/utils/images.cpp b/host/lib/utils/images.cpp index 2b6c02772..a124cc208 100644 --- a/host/lib/utils/images.cpp +++ b/host/lib/utils/images.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/tests/addr_test.cpp b/host/tests/addr_test.cpp index d4b45aa1a..01a7ab607 100644 --- a/host/tests/addr_test.cpp +++ b/host/tests/addr_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/tests/byteswap_test.cpp b/host/tests/byteswap_test.cpp index 3d50c9bfa..7d94bbfba 100644 --- a/host/tests/byteswap_test.cpp +++ b/host/tests/byteswap_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/tests/dict_test.cpp b/host/tests/dict_test.cpp index 0501a7878..7b388d090 100644 --- a/host/tests/dict_test.cpp +++ b/host/tests/dict_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/tests/module_test.cpp b/host/tests/module_test.cpp index 47a0e1af9..af2f749a7 100644 --- a/host/tests/module_test.cpp +++ b/host/tests/module_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/tests/subdev_spec_test.cpp b/host/tests/subdev_spec_test.cpp index 8817d5eee..aa0b9a119 100644 --- a/host/tests/subdev_spec_test.cpp +++ b/host/tests/subdev_spec_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/tests/time_spec_test.cpp b/host/tests/time_spec_test.cpp index 070392f93..e57bbced1 100644 --- a/host/tests/time_spec_test.cpp +++ b/host/tests/time_spec_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/tests/tune_helper_test.cpp b/host/tests/tune_helper_test.cpp index aabaaaf6e..51d216825 100644 --- a/host/tests/tune_helper_test.cpp +++ b/host/tests/tune_helper_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/tests/vrt_test.cpp b/host/tests/vrt_test.cpp index 9e131a10b..066f1493b 100644 --- a/host/tests/vrt_test.cpp +++ b/host/tests/vrt_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/host/tests/warning_test.cpp b/host/tests/warning_test.cpp index db19955de..3394f84d4 100644 --- a/host/tests/warning_test.cpp +++ b/host/tests/warning_test.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by -- cgit v1.2.3 From 2249acd9f97e969f619fa87cb206fc9392b9b5fe Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 25 Mar 2011 15:04:23 -0700 Subject: uhd: work on mac osx packaging Renamed README type files to have .txt extension (needed for CPACK_RESOURCE_FILE_*). Tweaks to the cpack setup on CPACK_RESOURCE_FILE_* and handling for when UHD_PACKAGE_MODE==AUTO. As of this commit, the mac packages do not contain the .dylib files (do not know why yet). --- host/AUTHORS | 30 ------------------------------ host/AUTHORS.txt | 40 ++++++++++++++++++++++++++++++++++++++++ host/CMakeLists.txt | 6 +++--- host/LICENSE | 12 ------------ host/LICENSE.txt | 12 ++++++++++++ host/Modules/UHDPackage.cmake | 12 ++++++++++-- host/README | 37 ------------------------------------- host/README.txt | 37 +++++++++++++++++++++++++++++++++++++ 8 files changed, 102 insertions(+), 84 deletions(-) delete mode 100644 host/AUTHORS create mode 100644 host/AUTHORS.txt delete mode 100644 host/LICENSE create mode 100644 host/LICENSE.txt delete mode 100644 host/README create mode 100644 host/README.txt (limited to 'host/Modules/UHDPackage.cmake') diff --git a/host/AUTHORS b/host/AUTHORS deleted file mode 100644 index 512d4752e..000000000 --- a/host/AUTHORS +++ /dev/null @@ -1,30 +0,0 @@ -Matt Ettus - matt@ettus.com - USRP1 FPGA code - USRP2 FPGA code - -Josh Blum - josh@ettus.com - driver framework - USRP2 firmware - USRP2 host code - Basic/LF host code - XCVR2450 host code - RFX Series host code - -Jason Abele - jason@ettus.com - RFX Series host code - WBX host code - -Eric Blossom - eb@comsec.com - USRP1 firmware - USRP2 firmware - -Tom Tsou - ttsou@vt.edu - UHD-USB framework - LIBUSB host code - USRP1 host code - USRP1 firmware - -Nick Foster - nick@ettus.com - LIBUSB host code - USRP1 host code - TVRX host code diff --git a/host/AUTHORS.txt b/host/AUTHORS.txt new file mode 100644 index 000000000..44b7516cd --- /dev/null +++ b/host/AUTHORS.txt @@ -0,0 +1,40 @@ +Matt Ettus - matt@ettus.com + USRP1 FPGA code + USRP2/N200 FPGA code + USRP-E100 FPGA code + +Josh Blum - josh@ettus.com + driver framework + USRP2/N200 firmware + USRP2/N200 host code + USRP-E100 host code + Basic/LF host code + XCVR2450 host code + RFX Series host code + +Jason Abele - jason@ettus.com + RFX Series host code + WBX host code + DBSRX host code + DBSRX2 host code + +Eric Blossom - eb@comsec.com + USRP1 firmware + USRP2 firmware + +Tom Tsou - ttsou@vt.edu + UHD-USB framework + LIBUSB host code + USRP1 host code + USRP1 firmware + +Nick Foster - nick@ettus.com + LIBUSB host code + USRP1 host code + TVRX host code + USRP-N200 firmware + USRP-N200 host code + +Philip Balister - philip@opensdr.com + USRP-E100 kernel module + USRP-E100 utilities diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index 4160e8186..8516da401 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -163,9 +163,9 @@ INSTALL( # Install Package Docs ######################################################################## INSTALL(FILES - ${CMAKE_CURRENT_SOURCE_DIR}/README - ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE - ${CMAKE_CURRENT_SOURCE_DIR}/AUTHORS + ${CMAKE_CURRENT_SOURCE_DIR}/README.txt + ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt + ${CMAKE_CURRENT_SOURCE_DIR}/AUTHORS.txt DESTINATION ${PKG_DOC_DIR} COMPONENT libraries ) diff --git a/host/LICENSE b/host/LICENSE deleted file mode 100644 index 9aa03b39b..000000000 --- a/host/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . diff --git a/host/LICENSE.txt b/host/LICENSE.txt new file mode 100644 index 000000000..9aa03b39b --- /dev/null +++ b/host/LICENSE.txt @@ -0,0 +1,12 @@ +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index 8ca8995cd..65897ceef 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -52,6 +52,13 @@ IF(UHD_PACKAGE_MODE STREQUAL AUTO) SET(CPACK_PACKAGE_FILE_NAME "UHD-${UHD_VERSION}-${_os_name}-${_os_version}-${_machine}") ENDIF(LSB_RELEASE_EXECUTABLE AND UNAME_EXECUTABLE) + + IF(APPLE) + SET(CPACK_GENERATOR PackageMaker) + ELSEIF(WIN32) + SET(CPACK_GENERATOR NSIS) + ENDIF() + ENDIF(UHD_PACKAGE_MODE STREQUAL AUTO) ######################################################################## @@ -63,8 +70,9 @@ SET(CPACK_PACKAGE_CONTACT "support@ettus.com") SET(CPACK_PACKAGE_VERSION_MAJOR ${UHD_VERSION_MAJOR}) SET(CPACK_PACKAGE_VERSION_MINOR ${UHD_VERSION_MINOR}) SET(CPACK_PACKAGE_VERSION_PATCH ${UHD_VERSION_PATCH}) -SET(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README) -SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE) +SET(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_SOURCE_DIR}/README.txt) +SET(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/AUTHORS.txt) +SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE.txt) ######################################################################## # Setup CPack Components diff --git a/host/README b/host/README deleted file mode 100644 index f3dcde53d..000000000 --- a/host/README +++ /dev/null @@ -1,37 +0,0 @@ -######################################################################## -# Ettus Research - Universal Hardware Driver -######################################################################## -The hardware driver for Ettus Research products. - -######################################################################## -# Supported USRP Motherboards -######################################################################## -USRP1 -USRP2 -USRP-N200 -USRP-N210 -USRP-E100 - -######################################################################## -# Supported USRP Daughterboards -######################################################################## -Basic RX -Basic TX -LF RX -LF TX -RFX Series -XCVR 2450 -WBX Series -DBSRX -DBSRX2 -TVRX - -######################################################################## -# Documentation -######################################################################## -Online documentation available at: -http://ettus-apps.sourcerepo.com/redmine/ettus/projects/uhd/wiki/ - -The build system can generate the html for the manual and Doxygen. -Docutils and Doxygen are required to build the html docs. -See the docs directory for the manual source (reStructuredText). diff --git a/host/README.txt b/host/README.txt new file mode 100644 index 000000000..b510493d5 --- /dev/null +++ b/host/README.txt @@ -0,0 +1,37 @@ +############################################### +# Ettus Research - Universal Hardware Driver +############################################### +The hardware driver for Ettus Research products. + +############################################### +# Supported USRP Motherboards +############################################### +USRP1 +USRP2 +USRP-N200 +USRP-N210 +USRP-E100 + +############################################### +# Supported USRP Daughterboards +############################################### +Basic RX +Basic TX +LF RX +LF TX +RFX Series +XCVR 2450 +WBX Series +DBSRX +DBSRX2 +TVRX + +############################################### +# Documentation +############################################### +Online documentation available at: +http://code.ettus.com/redmine/ettus/projects/uhd/wiki + +The build system can generate the html for the manual and Doxygen. +Docutils and Doxygen are required to build the html docs. +See the docs directory for the manual source (reStructuredText). -- cgit v1.2.3 From c6c4b01e09efc037aa44dbf8cdba1c705747bd2f Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 27 Mar 2011 15:04:01 -0700 Subject: uhd: swapped UHD_PACKAGE_MODE with UHD_RELEASE_MODE (boolean) --- host/Modules/UHDPackage.cmake | 4 ++-- host/Modules/UHDVersion.cmake | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'host/Modules/UHDPackage.cmake') diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index 65897ceef..65637ab16 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -21,7 +21,7 @@ INCLUDE(UHDVersion) #sets version information ######################################################################## # Setup package file name ######################################################################## -IF(UHD_PACKAGE_MODE STREQUAL AUTO) +IF(UHD_RELEASE_MODE) FIND_PROGRAM(LSB_RELEASE_EXECUTABLE lsb_release) FIND_PROGRAM(UNAME_EXECUTABLE uname) IF(LSB_RELEASE_EXECUTABLE AND UNAME_EXECUTABLE) @@ -59,7 +59,7 @@ IF(UHD_PACKAGE_MODE STREQUAL AUTO) SET(CPACK_GENERATOR NSIS) ENDIF() -ENDIF(UHD_PACKAGE_MODE STREQUAL AUTO) +ENDIF(UHD_RELEASE_MODE) ######################################################################## # Setup CPack General diff --git a/host/Modules/UHDVersion.cmake b/host/Modules/UHDVersion.cmake index 440ce6698..dbc39b5a9 100644 --- a/host/Modules/UHDVersion.cmake +++ b/host/Modules/UHDVersion.cmake @@ -32,7 +32,7 @@ SET(UHD_VERSION_PATCH 000) ######################################################################## # Version information discovery through git log ######################################################################## -IF(UHD_PACKAGE_MODE STREQUAL AUTO) +IF(UHD_RELEASE_MODE) SET(UHD_VERSION_DISCOVERY FALSE) ELSE() SET(UHD_VERSION_DISCOVERY GIT_FOUND) -- cgit v1.2.3 From 69d19fedd3fd7945a21daac0ae14c06fee78ee91 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 28 Mar 2011 13:44:36 -0700 Subject: uhd: various packing fixes (lib suffix, and library components) 1) setup lib suffix for fedora 64 2) specify component for all library target types (should fix missing library files problem) --- host/Modules/UHDPackage.cmake | 5 +++++ host/lib/CMakeLists.txt | 9 ++++----- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'host/Modules/UHDPackage.cmake') diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index 65637ab16..e7aa386f6 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -48,6 +48,11 @@ IF(UHD_RELEASE_MODE) SET(CPACK_GENERATOR RPM) ENDIF() + #when the library suffix should be 64 (applies to redhat linux family) + IF(EXISTS "/etc/redhat-release" AND _machine MATCHES "64$") + SET(LIB_SUFFIX 64) + ENDIF() + #set a more sensible package name for this system SET(CPACK_PACKAGE_FILE_NAME "UHD-${UHD_VERSION}-${_os_name}-${_os_version}-${_machine}") diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt index cb75979e8..d095255ea 100644 --- a/host/lib/CMakeLists.txt +++ b/host/lib/CMakeLists.txt @@ -113,14 +113,13 @@ ADD_LIBRARY(uhd SHARED ${libuhd_sources}) TARGET_LINK_LIBRARIES(uhd ${Boost_LIBRARIES} ${libuhd_libs}) SET_TARGET_PROPERTIES(uhd PROPERTIES DEFINE_SYMBOL "UHD_DLL_EXPORTS") SET_TARGET_PROPERTIES(uhd PROPERTIES SOVERSION "${UHD_VERSION_MAJOR}") -SET_TARGET_PROPERTIES(uhd PROPERTIES VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}") +SET_TARGET_PROPERTIES(uhd PROPERTIES VERSION "${UHD_VERSION}") IF(DEFINED LIBUHD_OUTPUT_NAME) SET_TARGET_PROPERTIES(uhd PROPERTIES OUTPUT_NAME ${LIBUHD_OUTPUT_NAME}) ENDIF(DEFINED LIBUHD_OUTPUT_NAME) INSTALL(TARGETS uhd - LIBRARY DESTINATION ${LIBRARY_DIR} # .so file - ARCHIVE DESTINATION ${LIBRARY_DIR} # .lib file - RUNTIME DESTINATION ${LIBRARY_DIR} # .dll file - COMPONENT libraries + LIBRARY DESTINATION ${LIBRARY_DIR} COMPONENT libraries # .so file + ARCHIVE DESTINATION ${LIBRARY_DIR} COMPONENT libraries # .lib file + RUNTIME DESTINATION ${LIBRARY_DIR} COMPONENT libraries # .dll file ) -- cgit v1.2.3 From 2ce39c4de5f98cb51eeb6498c6c3d23c873d0ebc Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 28 Mar 2011 16:53:28 -0700 Subject: uhd: expand UHD_RELEASE_MODE setup to all debian and redhats --- host/Modules/UHDPackage.cmake | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'host/Modules/UHDPackage.cmake') diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index e7aa386f6..1bae55b4c 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -22,6 +22,20 @@ INCLUDE(UHDVersion) #sets version information # 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(UNIX AND EXISTS "/etc/debian_version") + SET(CPACK_GENERATOR DEB) + ELSEIF(UNIX AND EXISTS "/etc/redhat-release") + SET(CPACK_GENERATOR RPM) + ELSE() + SET(CPACK_GENERATOR TGZ) + ENDIF() + FIND_PROGRAM(LSB_RELEASE_EXECUTABLE lsb_release) FIND_PROGRAM(UNAME_EXECUTABLE uname) IF(LSB_RELEASE_EXECUTABLE AND UNAME_EXECUTABLE) @@ -40,16 +54,8 @@ IF(UHD_RELEASE_MODE) OUTPUT_VARIABLE _machine OUTPUT_STRIP_TRAILING_WHITESPACE ) - #set generator type for recognized systems - IF(${_os_name} STREQUAL Ubuntu) - SET(CPACK_GENERATOR DEB) - ENDIF() - IF(${_os_name} STREQUAL Fedora) - SET(CPACK_GENERATOR RPM) - ENDIF() - #when the library suffix should be 64 (applies to redhat linux family) - IF(EXISTS "/etc/redhat-release" AND _machine MATCHES "64$") + IF(CPACK_GENERATOR STREQUAL RPM AND _machine MATCHES "64$") SET(LIB_SUFFIX 64) ENDIF() @@ -58,12 +64,6 @@ IF(UHD_RELEASE_MODE) ENDIF(LSB_RELEASE_EXECUTABLE AND UNAME_EXECUTABLE) - IF(APPLE) - SET(CPACK_GENERATOR PackageMaker) - ELSEIF(WIN32) - SET(CPACK_GENERATOR NSIS) - ENDIF() - ENDIF(UHD_RELEASE_MODE) ######################################################################## -- cgit v1.2.3 From 834bcbad6e632d872a5867801b2e4a5c9a5f95cd Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 28 Mar 2011 18:38:47 -0700 Subject: uhd: set LIB_SUFFIX automatically (all 64-bit redhats) Check for and define DEBIAN and REDHAT detection vars. Added LIB_SUFFIX check in top level cmakelists. Use CMAKE_SYSTEM_PROCESSOR rather than exec uname -m. Cleans up release mode logic. --- host/CMakeLists.txt | 4 ++++ host/Modules/UHDPackage.cmake | 35 ++++++++++++++++++----------------- 2 files changed, 22 insertions(+), 17 deletions(-) (limited to 'host/Modules/UHDPackage.cmake') diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index 8516da401..db100129f 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -33,6 +33,10 @@ INCLUDE(UHDPackage) #setup cpack ######################################################################## # Install Dirs ######################################################################## +#when the library suffix should be 64 (applies to redhat linux family) +IF(NOT DEFINED LIB_SUFFIX AND REDHAT AND CMAKE_SYSTEM_PROCESSOR MATCHES "64$") + SET(LIB_SUFFIX 64) +ENDIF() SET(LIB_SUFFIX ${LIB_SUFFIX} CACHE STRING "lib directory suffix") SET(RUNTIME_DIR bin) SET(LIBRARY_DIR lib${LIB_SUFFIX}) diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index 1bae55b4c..ef1a82c9a 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -18,6 +18,17 @@ ######################################################################## INCLUDE(UHDVersion) #sets version information +######################################################################## +# Setup additional defines for OS types +######################################################################## +IF(UNIX AND EXISTS "/etc/debian_version") + SET(DEBIAN TRUE) +ENDIF() + +IF(UNIX AND EXISTS "/etc/redhat-release") + SET(REDHAT TRUE) +ENDIF() + ######################################################################## # Setup package file name ######################################################################## @@ -28,41 +39,31 @@ IF(UHD_RELEASE_MODE) SET(CPACK_GENERATOR PackageMaker) ELSEIF(WIN32) SET(CPACK_GENERATOR NSIS) - ELSEIF(UNIX AND EXISTS "/etc/debian_version") + ELSEIF(DEBIAN) SET(CPACK_GENERATOR DEB) - ELSEIF(UNIX AND EXISTS "/etc/redhat-release") + ELSEIF(REDHAT) SET(CPACK_GENERATOR RPM) ELSE() SET(CPACK_GENERATOR TGZ) ENDIF() FIND_PROGRAM(LSB_RELEASE_EXECUTABLE lsb_release) - FIND_PROGRAM(UNAME_EXECUTABLE uname) - IF(LSB_RELEASE_EXECUTABLE AND UNAME_EXECUTABLE) + IF(LSB_RELEASE_EXECUTABLE) #extract system information by executing the commands EXECUTE_PROCESS( COMMAND ${LSB_RELEASE_EXECUTABLE} --short --id - OUTPUT_VARIABLE _os_name OUTPUT_STRIP_TRAILING_WHITESPACE + OUTPUT_VARIABLE LSB_ID OUTPUT_STRIP_TRAILING_WHITESPACE ) EXECUTE_PROCESS( COMMAND ${LSB_RELEASE_EXECUTABLE} --short --release - OUTPUT_VARIABLE _os_version OUTPUT_STRIP_TRAILING_WHITESPACE + OUTPUT_VARIABLE LSB_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE ) - EXECUTE_PROCESS( - COMMAND ${UNAME_EXECUTABLE} --machine - OUTPUT_VARIABLE _machine OUTPUT_STRIP_TRAILING_WHITESPACE - ) - - #when the library suffix should be 64 (applies to redhat linux family) - IF(CPACK_GENERATOR STREQUAL RPM AND _machine MATCHES "64$") - SET(LIB_SUFFIX 64) - ENDIF() #set a more sensible package name for this system - SET(CPACK_PACKAGE_FILE_NAME "UHD-${UHD_VERSION}-${_os_name}-${_os_version}-${_machine}") + SET(CPACK_PACKAGE_FILE_NAME "UHD-${UHD_VERSION}-${LSB_ID}-${LSB_RELEASE}-${CMAKE_SYSTEM_PROCESSOR}") - ENDIF(LSB_RELEASE_EXECUTABLE AND UNAME_EXECUTABLE) + ENDIF(LSB_RELEASE_EXECUTABLE) ENDIF(UHD_RELEASE_MODE) -- cgit v1.2.3 From 3a1f6c51429cfc195c08f4e327e4e83bf997f911 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 1 Apr 2011 12:02:43 -0700 Subject: uhd: added images and readme installer component --- host/CMakeLists.txt | 4 ++-- host/Modules/UHDPackage.cmake | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) (limited to 'host/Modules/UHDPackage.cmake') diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index 290ffdc7d..3808481bf 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -173,7 +173,7 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt ${CMAKE_CURRENT_SOURCE_DIR}/AUTHORS.txt DESTINATION ${PKG_DOC_DIR} - COMPONENT libraries + COMPONENT readme ) ######################################################################## @@ -215,7 +215,7 @@ 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}") - INSTALL(FILES ${_image_files} DESTINATION ${PKG_DATA_DIR}/images) + 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 ef1a82c9a..7fee51741 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -90,6 +90,7 @@ SET(CPACK_COMPONENT_EXAMPLES_GROUP "Runtime") SET(CPACK_COMPONENT_TESTS_GROUP "Runtime") SET(CPACK_COMPONENT_MANUAL_GROUP "Documentation") SET(CPACK_COMPONENT_DOXYGEN_GROUP "Documentation") +SET(CPACK_COMPONENT_README_GROUP "Documentation") SET(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries") SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ Headers") @@ -98,12 +99,26 @@ SET(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Examples") SET(CPACK_COMPONENT_TESTS_DISPLAY_NAME "Unit Tests") SET(CPACK_COMPONENT_MANUAL_DISPLAY_NAME "Manual") SET(CPACK_COMPONENT_DOXYGEN_DISPLAY_NAME "Doxygen") +SET(CPACK_COMPONENT_README_DISPLAY_NAME "Readme") +SET(CPACK_COMPONENT_IMAGES_DISPLAY_NAME "Images") + +SET(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "Dynamic link library") +SET(CPACK_COMPONENT_HEADERS_DESCRIPTION "C++ development headers") +SET(CPACK_COMPONENT_UTILITIES_DESCRIPTION "Utility executables and python scripts") +SET(CPACK_COMPONENT_EXAMPLES_DESCRIPTION "Example executables") +SET(CPACK_COMPONENT_TESTS_DESCRIPTION "Unit test executables") +SET(CPACK_COMPONENT_MANUAL_DESCRIPTION "Manual/application notes (rst and html)") +SET(CPACK_COMPONENT_DOXYGEN_DESCRIPTION "API documentation (html)") +SET(CPACK_COMPONENT_README_DESCRIPTION "Readme files (txt)") +SET(CPACK_COMPONENT_IMAGES_DESCRIPTION "FPGA and firmware images") + +SET(CPACK_COMPONENT_README_REQUIRED TRUE) SET(CPACK_COMPONENT_UTILITIES_DEPENDS libraries) SET(CPACK_COMPONENT_EXAMPLES_DEPENDS libraries) SET(CPACK_COMPONENT_TESTS_DEPENDS libraries) -SET(CPACK_COMPONENTS_ALL libraries headers utilities examples tests manual doxygen) +SET(CPACK_COMPONENTS_ALL libraries headers utilities examples tests manual doxygen readme images) ######################################################################## # Setup CPack Debian -- cgit v1.2.3 From 83c608e17de45fd5372f05b54f343c721e25ad82 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 1 Apr 2011 15:54:51 -0700 Subject: uhd: define LINUX in build system to simplify some checks --- host/Modules/UHDPackage.cmake | 4 ++++ host/lib/usrp/usrp_e100/CMakeLists.txt | 6 +----- host/usrp_e_utils/CMakeLists.txt | 6 +----- 3 files changed, 6 insertions(+), 10 deletions(-) (limited to 'host/Modules/UHDPackage.cmake') diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index 7fee51741..7ac677d28 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -29,6 +29,10 @@ IF(UNIX AND EXISTS "/etc/redhat-release") SET(REDHAT TRUE) ENDIF() +IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") + SET(LINUX TRUE) +ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux") + ######################################################################## # Setup package file name ######################################################################## diff --git a/host/lib/usrp/usrp_e100/CMakeLists.txt b/host/lib/usrp/usrp_e100/CMakeLists.txt index acbac177e..d0e20a3d8 100644 --- a/host/lib/usrp/usrp_e100/CMakeLists.txt +++ b/host/lib/usrp/usrp_e100/CMakeLists.txt @@ -22,11 +22,7 @@ ######################################################################## # Conditionally configure the USRP-E100 support ######################################################################## -IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") - SET(LINUX_TARGET TRUE) -ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux") - -LIBUHD_REGISTER_COMPONENT("USRP-E100" ENABLE_USRP_E100 OFF "ENABLE_LIBUHD;LINUX_TARGET" OFF) +LIBUHD_REGISTER_COMPONENT("USRP-E100" ENABLE_USRP_E100 OFF "ENABLE_LIBUHD;LINUX" OFF) IF(ENABLE_USRP_E100) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) diff --git a/host/usrp_e_utils/CMakeLists.txt b/host/usrp_e_utils/CMakeLists.txt index f3537e542..e7d6ae4b8 100644 --- a/host/usrp_e_utils/CMakeLists.txt +++ b/host/usrp_e_utils/CMakeLists.txt @@ -18,11 +18,7 @@ ######################################################################## # USRP embedded utilities that get installed into the share path ######################################################################## -IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") - SET(LINUX_TARGET TRUE) -ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux") - -LIBUHD_REGISTER_COMPONENT("USRP-E Utils" ENABLE_USRP_E_UTILS OFF "LINUX_TARGET" OFF) +LIBUHD_REGISTER_COMPONENT("USRP-E Utils" ENABLE_USRP_E_UTILS OFF "LINUX" OFF) IF(ENABLE_USRP_E_UTILS) ENABLE_LANGUAGE(C) -- cgit v1.2.3 From 7cd216e967161a0d3a4d7b9bc03583d270ce4de3 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 4 Apr 2011 13:10:06 -0700 Subject: uhd: specify msvc for implementations known only to work on msvc --- host/CMakeLists.txt | 9 +++++++-- host/Modules/UHDPackage.cmake | 12 ++++++------ host/include/uhd/config.hpp | 2 +- host/include/uhd/utils/byteswap.ipp | 6 +++--- host/lib/transport/CMakeLists.txt | 4 ++-- 5 files changed, 19 insertions(+), 14 deletions(-) (limited to 'host/Modules/UHDPackage.cmake') diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index 3808481bf..7df04995c 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -80,16 +80,21 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX) IF(MSVC) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/msvc) - ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501) #minimum version required is windows xp - ADD_DEFINITIONS(-DNOMINMAX) #disables stupidity and enables std::min and std::max ADD_DEFINITIONS( #stop all kinds of compatibility warnings -D_SCL_SECURE_NO_WARNINGS + -D_SCL_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE + -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE ) ENDIF(MSVC) +IF(WIN32) + ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501) #minimum version required is windows xp + ADD_DEFINITIONS(-DNOMINMAX) #disables stupidity and enables std::min and std::max +ENDIF(WIN32) + ######################################################################## # Setup Boost ######################################################################## diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index 7ac677d28..4986e314c 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -21,18 +21,18 @@ INCLUDE(UHDVersion) #sets version information ######################################################################## # Setup additional defines for OS types ######################################################################## -IF(UNIX AND EXISTS "/etc/debian_version") +IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") + SET(LINUX TRUE) +ENDIF() + +IF(LINUX AND EXISTS "/etc/debian_version") SET(DEBIAN TRUE) ENDIF() -IF(UNIX AND EXISTS "/etc/redhat-release") +IF(LINUX AND EXISTS "/etc/redhat-release") SET(REDHAT TRUE) ENDIF() -IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") - SET(LINUX TRUE) -ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux") - ######################################################################## # Setup package file name ######################################################################## diff --git a/host/include/uhd/config.hpp b/host/include/uhd/config.hpp index fdb168950..6fd2932cf 100644 --- a/host/include/uhd/config.hpp +++ b/host/include/uhd/config.hpp @@ -49,7 +49,7 @@ typedef ptrdiff_t ssize_t; #endif //BOOST_MSVC //define cross platform attribute macros -#if defined(BOOST_HAS_DECLSPEC) +#if defined(BOOST_MSVC) #define UHD_EXPORT __declspec(dllexport) #define UHD_IMPORT __declspec(dllimport) #define UHD_INLINE __forceinline diff --git a/host/include/uhd/utils/byteswap.ipp b/host/include/uhd/utils/byteswap.ipp index a070a7cf5..c090dee55 100644 --- a/host/include/uhd/utils/byteswap.ipp +++ b/host/include/uhd/utils/byteswap.ipp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -21,8 +21,8 @@ /*********************************************************************** * Platform-specific implementation details for byteswap below: **********************************************************************/ -#if defined(UHD_PLATFORM_WIN32) //http://msdn.microsoft.com/en-us/library/a3140177%28VS.80%29.aspx - #include +#if defined(BOOST_MSVC) //http://msdn.microsoft.com/en-us/library/a3140177%28VS.80%29.aspx + #include UHD_INLINE boost::uint16_t uhd::byteswap(boost::uint16_t x){ return _byteswap_ushort(x); diff --git a/host/lib/transport/CMakeLists.txt b/host/lib/transport/CMakeLists.txt index 656ca9987..a7179d561 100644 --- a/host/lib/transport/CMakeLists.txt +++ b/host/lib/transport/CMakeLists.txt @@ -31,10 +31,10 @@ IF(ENABLE_USB) MESSAGE(STATUS "USB support enabled via libusb.") INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIR}) LIBUHD_APPEND_LIBS(${LIBUSB_LIBRARIES}) - IF(WIN32) + IF(MSVC) #needed when statically linking libusb LIBUHD_APPEND_LIBS(Setupapi.lib) - ENDIF(WIN32) + ENDIF(MSVC) LIBUHD_APPEND_SOURCES( ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_control.cpp ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_zero_copy.cpp -- cgit v1.2.3 From dcd555636c282ac0454b463c91d360ce062e316d Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 4 Apr 2011 16:22:38 -0700 Subject: uhd: set CPACK_PACKAGE_INSTALL_DIRECTORY on NSIS so we dont get an inconsistent version suffix --- host/Modules/UHDPackage.cmake | 4 ++++ host/lib/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'host/Modules/UHDPackage.cmake') diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index 4986e314c..bf31df3b3 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -69,6 +69,10 @@ IF(UHD_RELEASE_MODE) ENDIF(LSB_RELEASE_EXECUTABLE) + IF(${CPACK_GENERATOR} STREQUAL NSIS) + SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${CMAKE_PROJECT_NAME}") + ENDIF() + ENDIF(UHD_RELEASE_MODE) ######################################################################## diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt index e65a2d2ba..8ca7c7dca 100644 --- a/host/lib/CMakeLists.txt +++ b/host/lib/CMakeLists.txt @@ -90,7 +90,7 @@ IF(UNIX) FILE(TO_NATIVE_PATH /usr/${PKG_DATA_DIR} INSTALLER_PKG_DATA_DIR) ELSE() #for the NSIS installer, this will be the default path for package data - FILE(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX} ${UHD_VERSION}/${PKG_DATA_DIR}" INSTALLER_PKG_DATA_DIR) + FILE(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}/${PKG_DATA_DIR}" INSTALLER_PKG_DATA_DIR) ENDIF() STRING(REPLACE "\\" "\\\\" INSTALLER_PKG_DATA_DIR ${INSTALLER_PKG_DATA_DIR}) MESSAGE(STATUS "Installer package data directory: ${INSTALLER_PKG_DATA_DIR}") -- cgit v1.2.3 From 905a681afd3b8d089a3dbfe7aa31bbcb5a020c05 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 16 Apr 2011 11:12:33 -0700 Subject: uhd: added option for nsis installer to set PATH --- host/Modules/UHDPackage.cmake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'host/Modules/UHDPackage.cmake') diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index bf31df3b3..1988c7f11 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -139,5 +139,10 @@ SET(CPACK_DEBIAN_PACKAGE_RECOMMENDS "python, python-tk") ######################################################################## SET(CPACK_RPM_PACKAGE_REQUIRES "boost-devel, libusb1") +######################################################################## +# Setup CPack NSIS +######################################################################## +SET(CPACK_NSIS_MODIFY_PATH ON) + ######################################################################## INCLUDE(CPack) #include after setting vars -- cgit v1.2.3 From 46d0e64859cfabfc24ea04051fca624a185bff8b Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 18 Apr 2011 17:17:32 -0700 Subject: uhd: use UHD_PKG_DATA_PATH environment variable to override the one in constants The installer sets UHD_PKG_DATA_PATH, we can can handle transplanted builds. --- host/Modules/UHDPackage.cmake | 10 ++++++++++ host/lib/utils/paths.cpp | 27 +++++++++++---------------- 2 files changed, 21 insertions(+), 16 deletions(-) (limited to 'host/Modules/UHDPackage.cmake') diff --git a/host/Modules/UHDPackage.cmake b/host/Modules/UHDPackage.cmake index 1988c7f11..416d89998 100644 --- a/host/Modules/UHDPackage.cmake +++ b/host/Modules/UHDPackage.cmake @@ -144,5 +144,15 @@ SET(CPACK_RPM_PACKAGE_REQUIRES "boost-devel, libusb1") ######################################################################## SET(CPACK_NSIS_MODIFY_PATH ON) +SET(HLKM_ENV "\\\"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\"") + +SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS " + WriteRegStr HKLM ${HLKM_ENV} \\\"UHD_PKG_DATA_PATH\\\" \\\"$INSTDIR\\\\share\\\\uhd\\\" +") + +SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " + DeleteRegValue HKLM ${HLKM_ENV} \\\"UHD_PKG_DATA_PATH\\\" +") + ######################################################################## INCLUDE(CPack) #include after setting vars diff --git a/host/lib/utils/paths.cpp b/host/lib/utils/paths.cpp index 0ddc80d6e..a0e4da547 100644 --- a/host/lib/utils/paths.cpp +++ b/host/lib/utils/paths.cpp @@ -18,14 +18,13 @@ #include "constants.hpp" #include #include -#include #include #include #include +#include #include #include -namespace po = boost::program_options; namespace fs = boost::filesystem; /*********************************************************************** @@ -44,22 +43,14 @@ namespace fs = boost::filesystem; /*********************************************************************** * Get a list of paths for an environment variable **********************************************************************/ -static std::string name_mapper(const std::string &key, const std::string &var_name){ - return (var_name == key)? var_name : ""; +static std::string get_env_var(const std::string &var_name, const std::string &def_val = ""){ + const char *var_value_ptr = std::getenv(var_name.c_str()); + return (var_value_ptr == NULL)? def_val : var_value_ptr; } static std::vector get_env_paths(const std::string &var_name){ - //register the options - std::string var_value; - po::options_description desc; - desc.add_options() - (var_name.c_str(), po::value(&var_value)->default_value("")) - ; - //parse environment variables - po::variables_map vm; - po::store(po::parse_environment(desc, boost::bind(&name_mapper, var_name, _1)), vm); - po::notify(vm); + std::string var_value = get_env_var(var_name); //convert to filesystem path, filter blank paths std::vector paths; @@ -74,14 +65,18 @@ static std::vector get_env_paths(const std::string &var_name){ /*********************************************************************** * Get a list of special purpose paths **********************************************************************/ +static fs::path get_uhd_pkg_data_path(void){ + return fs::path(get_env_var("UHD_PKG_DATA_PATH", UHD_PKG_DATA_PATH)); +} + std::vector get_image_paths(void){ std::vector paths = get_env_paths("UHD_IMAGE_PATH"); - paths.push_back(fs::path(UHD_PKG_DATA_PATH) / "images"); + paths.push_back(get_uhd_pkg_data_path() / "images"); return paths; } std::vector get_module_paths(void){ std::vector paths = get_env_paths("UHD_MODULE_PATH"); - paths.push_back(fs::path(UHD_PKG_DATA_PATH) / "modules"); + paths.push_back(get_uhd_pkg_data_path() / "modules"); return paths; } -- cgit v1.2.3