summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2013-05-10 15:07:03 -0700
committerNicholas Corgan <nick.corgan@ettus.com>2013-05-10 15:07:03 -0700
commit6524f46bc54c36f8d50d6a3aa1c17aafb0a47d75 (patch)
tree40a0cf8ec54bae728041d7304ecd841339bace81 /host
parentc6dcb2b4b63841925f4863bc0adbda9b2048475a (diff)
parent4b72513a8930ec4147dab76c079afa1186e335cd (diff)
downloaduhd-6524f46bc54c36f8d50d6a3aa1c17aafb0a47d75.tar.gz
uhd-6524f46bc54c36f8d50d6a3aa1c17aafb0a47d75.tar.bz2
uhd-6524f46bc54c36f8d50d6a3aa1c17aafb0a47d75.zip
Merge branch 'maint'
Conflicts: host/tests/CMakeLists.txt
Diffstat (limited to 'host')
-rw-r--r--host/CMakeLists.txt51
-rw-r--r--host/cmake/Modules/UHDComponent.cmake56
-rw-r--r--host/cmake/Modules/UHDPackage.cmake40
-rw-r--r--host/cmake/Modules/UHDVersion.cmake9
-rw-r--r--host/docs/CMakeLists.txt19
-rw-r--r--host/examples/CMakeLists.txt6
-rw-r--r--host/include/uhd/CMakeLists.txt6
-rw-r--r--host/include/uhd/transport/CMakeLists.txt2
-rw-r--r--host/include/uhd/types/CMakeLists.txt2
-rw-r--r--host/include/uhd/usrp/CMakeLists.txt2
-rw-r--r--host/include/uhd/utils/CMakeLists.txt2
-rw-r--r--host/lib/CMakeLists.txt20
-rw-r--r--host/lib/uhd.rc.in4
-rw-r--r--host/tests/CMakeLists.txt1
-rw-r--r--host/utils/CMakeLists.txt20
15 files changed, 168 insertions, 72 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt
index 8526166b4..e79edc6be 100644
--- a/host/CMakeLists.txt
+++ b/host/CMakeLists.txt
@@ -1,5 +1,5 @@
#
-# Copyright 2010-2012 Ettus Research LLC
+# Copyright 2010-2013 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
@@ -27,6 +27,15 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(UHD CXX)
ENABLE_TESTING()
LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
+
+########################################################################
+# Packaging Variables
+########################################################################
+
+SET(LIBUHD_PKG ${LIBUHD_PKG} CACHE BOOL "Build Debian libuhd003 package")
+SET(LIBUHDDEV_PKG ${LIBUHDDEV_PKG} CACHE BOOL "Build Debian libuhd-dev package")
+SET(UHDHOST_PKG ${UHDPOST_PKG} CACHE BOOL "Build Debian uhd-host package")
+
INCLUDE(UHDComponent) #enable components
INCLUDE(UHDPackage) #setup cpack
@@ -187,7 +196,7 @@ ADD_CUSTOM_TARGET(uninstall
########################################################################
# Install Package Docs
########################################################################
-INSTALL(FILES
+UHD_INSTALL(FILES
${CMAKE_CURRENT_SOURCE_DIR}/README.txt
${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt
${CMAKE_CURRENT_SOURCE_DIR}/AUTHORS.txt
@@ -215,12 +224,12 @@ LIBUHD_REGISTER_COMPONENT("Tests" ENABLE_TESTS ON "ENABLE_LIBUHD" OFF)
########################################################################
ADD_SUBDIRECTORY(docs)
+ADD_SUBDIRECTORY(include)
+
IF(ENABLE_EXAMPLES)
ADD_SUBDIRECTORY(examples)
ENDIF(ENABLE_EXAMPLES)
-ADD_SUBDIRECTORY(include)
-
IF(ENABLE_LIBUHD)
ADD_SUBDIRECTORY(lib)
ENDIF(ENABLE_LIBUHD)
@@ -255,16 +264,18 @@ IF(CMAKE_CROSSCOMPILING)
UNSET(UHD_PC_LIBS)
ENDIF(CMAKE_CROSSCOMPILING)
-CONFIGURE_FILE(
- ${CMAKE_CURRENT_SOURCE_DIR}/uhd.pc.in
- ${CMAKE_CURRENT_BINARY_DIR}/uhd.pc
-@ONLY)
+IF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
+ CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/uhd.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/uhd.pc
+ @ONLY)
-INSTALL(
- FILES ${CMAKE_CURRENT_BINARY_DIR}/uhd.pc
- DESTINATION ${LIBRARY_DIR}/pkgconfig
- COMPONENT libraries
-)
+ INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/uhd.pc
+ DESTINATION ${LIBRARY_DIR}/pkgconfig
+ COMPONENT libraries
+ )
+ENDIF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
########################################################################
# Handle pre-built images
@@ -275,13 +286,23 @@ IF(DEFINED UHD_IMAGES_DIR AND EXISTS "${UHD_IMAGES_DIR}")
FOREACH(_img ${_image_files})
MESSAGE(STATUS " ${_img}")
ENDFOREACH(_img)
- INSTALL(FILES ${_image_files} DESTINATION ${PKG_DATA_DIR}/images COMPONENT images)
+ UHD_INSTALL(FILES ${_image_files} DESTINATION ${PKG_DATA_DIR}/images COMPONENT images)
ENDIF(DEFINED UHD_IMAGES_DIR AND EXISTS "${UHD_IMAGES_DIR}")
########################################################################
# Print Summary
########################################################################
+IF(LIBUHD_PKG)
+ MESSAGE(STATUS "")
+ SET(PRINT_APPEND " (Debian libuhd003 package configuration)")
+ELSEIF(LIBUHDDEV_PKG)
+ MESSAGE(STATUS "")
+ SET(PRINT_APPEND " (Debian libuhd-dev package configuration)")
+ELSEIF(UHDHOST_PKG)
+ MESSAGE(STATUS "")
+ SET(PRINT_APPEND " (Debian uhd-host package configuration)")
+ENDIF(LIBUHD_PKG)
UHD_PRINT_COMPONENT_SUMMARY()
-MESSAGE(STATUS "Building version: ${UHD_VERSION}")
+MESSAGE(STATUS "Building version: ${UHD_VERSION}${PRINT_APPEND}")
MESSAGE(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}")
MESSAGE(STATUS "Compatible images can be downloaded from: ${UHD_IMAGES_DOWNLOAD_SRC}")
diff --git a/host/cmake/Modules/UHDComponent.cmake b/host/cmake/Modules/UHDComponent.cmake
index 52b7450d5..d0b8442d9 100644
--- a/host/cmake/Modules/UHDComponent.cmake
+++ b/host/cmake/Modules/UHDComponent.cmake
@@ -1,5 +1,5 @@
#
-# Copyright 2010-2011 Ettus Research LLC
+# Copyright 2010-2011,2013 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
@@ -54,6 +54,60 @@ MACRO(LIBUHD_REGISTER_COMPONENT name var enb deps dis)
ENDMACRO(LIBUHD_REGISTER_COMPONENT)
########################################################################
+# Install only if appropriate for package and if component is enabled
+########################################################################
+FUNCTION(UHD_INSTALL)
+ include(CMakeParseArguments)
+ CMAKE_PARSE_ARGUMENTS(UHD_INSTALL "" "DESTINATION;COMPONENT" "TARGETS;FILES;PROGRAMS" ${ARGN})
+
+ IF(UHD_INSTALL_FILES)
+ SET(TO_INSTALL "${UHD_INSTALL_FILES}")
+ ELSEIF(UHD_INSTALL_PROGRAMS)
+ SET(TO_INSTALL "${UHD_INSTALL_PROGRAMS}")
+ ELSEIF(UHD_INSTALL_TARGETS)
+ SET(TO_INSTALL "${UHD_INSTALL_TARGETS}")
+ ENDIF(UHD_INSTALL_FILES)
+
+ IF(UHD_INSTALL_COMPONENT STREQUAL "headers")
+ IF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
+ INSTALL(${ARGN})
+ ENDIF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
+ ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "examples")
+ IF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+ INSTALL(${ARGN})
+ ENDIF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+ ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "tests")
+ IF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+ INSTALL(${ARGN})
+ ENDIF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+ ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "utilities")
+ IF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+ INSTALL(${ARGN})
+ ENDIF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+ ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "manual")
+ IF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+ INSTALL(${ARGN})
+ ENDIF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+ ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "doxygen")
+ IF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
+ INSTALL(${ARGN})
+ ENDIF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG)
+ ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "manpages")
+ IF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+ INSTALL(${ARGN})
+ ENDIF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG)
+ ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "images")
+ IF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG AND NOT UHDHOST_PKG)
+ INSTALL(${ARGN})
+ ENDIF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG AND NOT UHDHOST_PKG)
+ ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "readme")
+ IF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG AND NOT UHDHOST_PKG)
+ INSTALL(${ARGN})
+ ENDIF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG AND NOT UHDHOST_PKG)
+ ENDIF(UHD_INSTALL_COMPONENT STREQUAL "headers")
+ENDFUNCTION(UHD_INSTALL)
+
+########################################################################
# Print the registered component summary
########################################################################
FUNCTION(UHD_PRINT_COMPONENT_SUMMARY)
diff --git a/host/cmake/Modules/UHDPackage.cmake b/host/cmake/Modules/UHDPackage.cmake
index 1f1d266e2..0ce390699 100644
--- a/host/cmake/Modules/UHDPackage.cmake
+++ b/host/cmake/Modules/UHDPackage.cmake
@@ -1,5 +1,5 @@
#
-# Copyright 2010-2012 Ettus Research LLC
+# Copyright 2010-2013 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
@@ -55,23 +55,31 @@ ENDIF()
########################################################################
# Setup package file name
########################################################################
-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}")
+IF(DEBIAN AND LIBUHD_PKG)
+ SET(CPACK_PACKAGE_FILE_NAME "libuhd${UHD_VERSION_MAJOR}_${TRIMMED_UHD_VERSION}_${CMAKE_SYSTEM_PROCESSOR}")
+ELSEIF(DEBIAN AND LIBUHDDEV_PKG)
+ SET(CPACK_PACKAGE_FILE_NAME "libuhd-dev_${TRIMMED_UHD_VERSION}_${CMAKE_SYSTEM_PROCESSOR}")
+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()
+ENDIF(DEBIAN AND LIBUHD_PKG)
IF(${CPACK_GENERATOR} STREQUAL NSIS)
diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake
index 01cd2741e..c81e9510b 100644
--- a/host/cmake/Modules/UHDVersion.cmake
+++ b/host/cmake/Modules/UHDVersion.cmake
@@ -30,7 +30,7 @@ SET(UHD_VERSION_MINOR 005)
SET(UHD_VERSION_PATCH 003)
########################################################################
-# Set up DLL resource version numbers
+# Set up trimmed version numbers for DLL resource files and packages
########################################################################
FUNCTION(DEPAD_NUM input_num output_num)
@@ -42,9 +42,10 @@ FUNCTION(DEPAD_NUM input_num output_num)
SET(${output_num} ${depadded_num} PARENT_SCOPE)
ENDFUNCTION(DEPAD_NUM)
-DEPAD_NUM(${UHD_VERSION_MAJOR} RC_VERSION_MAJOR)
-DEPAD_NUM(${UHD_VERSION_MINOR} RC_VERSION_MINOR)
-DEPAD_NUM(${UHD_VERSION_PATCH} RC_VERSION_PATCH)
+DEPAD_NUM(${UHD_VERSION_MAJOR} TRIMMED_VERSION_MAJOR)
+DEPAD_NUM(${UHD_VERSION_MINOR} TRIMMED_VERSION_MINOR)
+DEPAD_NUM(${UHD_VERSION_PATCH} TRIMMED_VERSION_PATCH)
+SET(TRIMMED_UHD_VERSION "${TRIMMED_VERSION_MAJOR}.${TRIMMED_VERSION_MINOR}.${TRIMMED_VERSION_PATCH}")
########################################################################
# Version information discovery through git log
diff --git a/host/docs/CMakeLists.txt b/host/docs/CMakeLists.txt
index faf0c49de..cba97218a 100644
--- a/host/docs/CMakeLists.txt
+++ b/host/docs/CMakeLists.txt
@@ -1,5 +1,5 @@
#
-# Copyright 2010-2012 Ettus Research LLC
+# Copyright 2010-2013 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
@@ -45,6 +45,10 @@ FIND_PACKAGE(Docutils)
LIBUHD_REGISTER_COMPONENT("Manual" ENABLE_MANUAL ON "DOCUTILS_FOUND" OFF)
+IF(UHDHOST_PKG)
+ SET(PKG_DOC_DIR share/doc/uhd-host)
+ENDIF(UHDHOST_PKG)
+
IF(ENABLE_MANUAL)
#setup rst2html options
SET(stylesheet ${CMAKE_CURRENT_SOURCE_DIR}/style.css)
@@ -69,15 +73,14 @@ IF(ENABLE_MANUAL)
#make the manual target depend on the html file
LIST(APPEND manual_html_files ${htmlfile})
- INSTALL(FILES ${htmlfile} DESTINATION ${PKG_DOC_DIR}/manual/html COMPONENT manual)
+ UHD_INSTALL(FILES ${htmlfile} DESTINATION ${PKG_DOC_DIR}/manual/html COMPONENT manual)
ENDFOREACH(rstfile ${manual_sources})
#make the html manual a build-time dependency
ADD_CUSTOM_TARGET(manual_html ALL DEPENDS ${manual_html_files})
+ UHD_INSTALL(FILES ${manual_sources} DESTINATION ${PKG_DOC_DIR}/manual/rst COMPONENT manual)
ENDIF(ENABLE_MANUAL)
-INSTALL(FILES ${manual_sources} DESTINATION ${PKG_DOC_DIR}/manual/rst COMPONENT manual)
-
########################################################################
# Setup Doxygen
########################################################################
@@ -86,6 +89,10 @@ FIND_PACKAGE(Doxygen)
LIBUHD_REGISTER_COMPONENT("Doxygen" ENABLE_DOXYGEN ON "DOXYGEN_FOUND" OFF)
+IF(LIBUHDDEV_PKG)
+ SET(PKG_DOC_DIR share/doc/libuhd-dev)
+ENDIF(LIBUHDDEV_PKG)
+
IF(ENABLE_DOXYGEN)
#generate the doxygen configuration file
SET(CMAKE_CURRENT_BINARY_DIR_DOXYGEN ${CMAKE_CURRENT_BINARY_DIR}/doxygen)
@@ -104,7 +111,7 @@ IF(ENABLE_DOXYGEN)
#make the doxygen generation a built-time dependency
ADD_CUSTOM_TARGET(doxygen_docs ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN})
- INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} DESTINATION ${PKG_DOC_DIR} COMPONENT doxygen)
+ UHD_INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} DESTINATION ${PKG_DOC_DIR} COMPONENT doxygen)
ENDIF(ENABLE_DOXYGEN)
########################################################################
@@ -146,7 +153,7 @@ IF(ENABLE_MAN_PAGES)
#make the man page target depend on the gz file
LIST(APPEND man_page_gz_files ${gzfile})
- INSTALL(FILES ${gzfile} DESTINATION ${PKG_MAN_DIR} COMPONENT manpages)
+ UHD_INSTALL(FILES ${gzfile} DESTINATION ${PKG_MAN_DIR} COMPONENT manpages)
ENDFOREACH(manfile ${man_page_sources})
#make the man pages a build-time dependency
diff --git a/host/examples/CMakeLists.txt b/host/examples/CMakeLists.txt
index 3ba483134..bdefeba0a 100644
--- a/host/examples/CMakeLists.txt
+++ b/host/examples/CMakeLists.txt
@@ -1,5 +1,5 @@
#
-# Copyright 2010-2012 Ettus Research LLC
+# Copyright 2010-2013 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
@@ -43,7 +43,7 @@ FOREACH(example_source ${example_sources})
GET_FILENAME_COMPONENT(example_name ${example_source} NAME_WE)
ADD_EXECUTABLE(${example_name} ${example_source})
TARGET_LINK_LIBRARIES(${example_name} uhd)
- INSTALL(TARGETS ${example_name} RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples)
+ UHD_INSTALL(TARGETS ${example_name} RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples)
ENDFOREACH(example_source)
########################################################################
@@ -55,5 +55,5 @@ IF(CURSES_FOUND)
INCLUDE_DIRECTORIES(${CURSES_INCLUDE_DIR})
ADD_EXECUTABLE(rx_ascii_art_dft rx_ascii_art_dft.cpp)
TARGET_LINK_LIBRARIES(rx_ascii_art_dft uhd ${CURSES_LIBRARIES})
- INSTALL(TARGETS rx_ascii_art_dft RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples)
+ UHD_INSTALL(TARGETS rx_ascii_art_dft RUNTIME DESTINATION ${PKG_LIB_DIR}/examples COMPONENT examples)
ENDIF(CURSES_FOUND)
diff --git a/host/include/uhd/CMakeLists.txt b/host/include/uhd/CMakeLists.txt
index 1df04d577..2827cb826 100644
--- a/host/include/uhd/CMakeLists.txt
+++ b/host/include/uhd/CMakeLists.txt
@@ -1,5 +1,5 @@
-#
-# Copyright 2010-2011 Ettus Research LLC
+
+# Copyright 2010-2011,2013 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,7 +21,7 @@ ADD_SUBDIRECTORY(types)
ADD_SUBDIRECTORY(usrp)
ADD_SUBDIRECTORY(utils)
-INSTALL(FILES
+UHD_INSTALL(FILES
config.hpp
convert.hpp
deprecated.hpp
diff --git a/host/include/uhd/transport/CMakeLists.txt b/host/include/uhd/transport/CMakeLists.txt
index bf7497ee7..1031da817 100644
--- a/host/include/uhd/transport/CMakeLists.txt
+++ b/host/include/uhd/transport/CMakeLists.txt
@@ -16,7 +16,7 @@
#
-INSTALL(FILES
+UHD_INSTALL(FILES
bounded_buffer.hpp
bounded_buffer.ipp
buffer_pool.hpp
diff --git a/host/include/uhd/types/CMakeLists.txt b/host/include/uhd/types/CMakeLists.txt
index 0971ca472..28e646117 100644
--- a/host/include/uhd/types/CMakeLists.txt
+++ b/host/include/uhd/types/CMakeLists.txt
@@ -16,7 +16,7 @@
#
-INSTALL(FILES
+UHD_INSTALL(FILES
clock_config.hpp
device_addr.hpp
dict.ipp
diff --git a/host/include/uhd/usrp/CMakeLists.txt b/host/include/uhd/usrp/CMakeLists.txt
index d7b936fc2..d30a2900a 100644
--- a/host/include/uhd/usrp/CMakeLists.txt
+++ b/host/include/uhd/usrp/CMakeLists.txt
@@ -16,7 +16,7 @@
#
-INSTALL(FILES
+UHD_INSTALL(FILES
#### dboard headers ###
dboard_base.hpp
diff --git a/host/include/uhd/utils/CMakeLists.txt b/host/include/uhd/utils/CMakeLists.txt
index de91993fe..cdef2e946 100644
--- a/host/include/uhd/utils/CMakeLists.txt
+++ b/host/include/uhd/utils/CMakeLists.txt
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-INSTALL(FILES
+UHD_INSTALL(FILES
algorithm.hpp
assert_has.hpp
assert_has.ipp
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt
index d8ff66a96..a37a8ab85 100644
--- a/host/lib/CMakeLists.txt
+++ b/host/lib/CMakeLists.txt
@@ -1,5 +1,5 @@
#
-# Copyright 2010-2011 Ettus Research LLC
+# Copyright 2010-2011,2013 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
@@ -111,14 +111,18 @@ ENDIF(MSVC)
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}")
+IF(NOT LIBUHDDEV_PKG)
+ SET_TARGET_PROPERTIES(uhd PROPERTIES SOVERSION "${UHD_VERSION_MAJOR}")
+ SET_TARGET_PROPERTIES(uhd PROPERTIES VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}")
+ENDIF(NOT LIBUHDDEV_PKG)
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} COMPONENT libraries # .so file
- ARCHIVE DESTINATION ${LIBRARY_DIR} COMPONENT libraries # .lib file
- RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT libraries # .dll file
-)
+IF(NOT UHDHOST_PKG) #Syntax makes it unusable by UHD_INSTALL
+ INSTALL(TARGETS uhd
+ LIBRARY DESTINATION ${LIBRARY_DIR} COMPONENT libraries # .so file
+ ARCHIVE DESTINATION ${LIBRARY_DIR} COMPONENT libraries # .lib file
+ RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT libraries # .dll file
+ )
+ENDIF(NOT UHDHOST_PKG)
diff --git a/host/lib/uhd.rc.in b/host/lib/uhd.rc.in
index 01a5e07f5..feb006bd3 100644
--- a/host/lib/uhd.rc.in
+++ b/host/lib/uhd.rc.in
@@ -1,8 +1,8 @@
#include <afxres.h>
VS_VERSION_INFO VERSIONINFO
- FILEVERSION @RC_VERSION_MAJOR@,@RC_VERSION_MINOR@,@RC_VERSION_PATCH@,@UHD_GIT_COUNT@
- PRODUCTVERSION @RC_VERSION_MAJOR@,@RC_VERSION_MINOR@,@RC_VERSION_PATCH@,@UHD_GIT_COUNT@
+ FILEVERSION @TRIMMED_VERSION_MAJOR@,@TRIMMED_VERSION_MINOR@,@TRIMMED_VERSION_PATCH@,@UHD_GIT_COUNT@
+ PRODUCTVERSION @TRIMMED_VERSION_MAJOR@,@TRIMMED_VERSION_MINOR@,@TRIMMED_VERSION_PATCH@,@UHD_GIT_COUNT@
FILEFLAGSMASK 0x3fL
#ifndef NDEBUG
FILEFLAGS 0x0L
diff --git a/host/tests/CMakeLists.txt b/host/tests/CMakeLists.txt
index f5cead184..2a40d0050 100644
--- a/host/tests/CMakeLists.txt
+++ b/host/tests/CMakeLists.txt
@@ -53,6 +53,7 @@ FOREACH(test_source ${test_sources})
ADD_EXECUTABLE(${test_name} ${test_source})
TARGET_LINK_LIBRARIES(${test_name} uhd)
UHD_ADD_TEST(${test_name} ${test_name})
+ UHD_INSTALL(TARGETS ${test_name} RUNTIME DESTINATION ${PKG_LIB_DIR}/tests COMPONENT tests)
ENDFOREACH(test_source)
########################################################################
diff --git a/host/utils/CMakeLists.txt b/host/utils/CMakeLists.txt
index 73be96016..ceeab0050 100644
--- a/host/utils/CMakeLists.txt
+++ b/host/utils/CMakeLists.txt
@@ -32,7 +32,7 @@ FOREACH(util_source ${util_runtime_sources})
GET_FILENAME_COMPONENT(util_name ${util_source} NAME_WE)
ADD_EXECUTABLE(${util_name} ${util_source})
TARGET_LINK_LIBRARIES(${util_name} uhd)
- INSTALL(TARGETS ${util_name} RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT utilities)
+ UHD_INSTALL(TARGETS ${util_name} RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT utilities)
ENDFOREACH(util_source)
########################################################################
@@ -51,7 +51,7 @@ IF(ENABLE_USB)
ENDIF(ENABLE_USB)
IF(LINUX AND ENABLE_USB)
- INSTALL(FILES
+ UHD_INSTALL(FILES
uhd-usrp.rules
DESTINATION ${PKG_LIB_DIR}/utils
COMPONENT utilities
@@ -63,23 +63,23 @@ FOREACH(util_source ${util_share_sources})
GET_FILENAME_COMPONENT(util_name ${util_source} NAME_WE)
ADD_EXECUTABLE(${util_name} ${util_source})
TARGET_LINK_LIBRARIES(${util_name} uhd)
- INSTALL(TARGETS ${util_name} RUNTIME DESTINATION ${PKG_LIB_DIR}/utils COMPONENT utilities)
+ UHD_INSTALL(TARGETS ${util_name} RUNTIME DESTINATION ${PKG_LIB_DIR}/utils COMPONENT utilities)
ENDFOREACH(util_source)
-INSTALL(TARGETS usrp_n2xx_simple_net_burner RUNTIME DESTINATION ${PKG_LIB_DIR}/utils COMPONENT utilities)
+UHD_INSTALL(TARGETS usrp_n2xx_simple_net_burner RUNTIME DESTINATION ${PKG_LIB_DIR}/utils COMPONENT utilities)
#UHD images downloader configuration
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/uhd_images_downloader.py.in
${CMAKE_CURRENT_BINARY_DIR}/uhd_images_downloader.py
@ONLY)
-INSTALL(PROGRAMS
+UHD_INSTALL(PROGRAMS
${CMAKE_CURRENT_BINARY_DIR}/uhd_images_downloader.py
DESTINATION ${PKG_LIB_DIR}/utils
COMPONENT utilities
)
IF(LINUX)
- INSTALL(PROGRAMS
+ UHD_INSTALL(PROGRAMS
${CMAKE_CURRENT_BINARY_DIR}/uhd_images_downloader.py
RENAME uhd_images_downloader
DESTINATION ${RUNTIME_DIR}
@@ -100,19 +100,19 @@ IF(ENABLE_USRP2)
"http://files.ettus.com/dd.exe"
${CMAKE_CURRENT_BINARY_DIR}/dd.exe
)
- INSTALL(FILES
+ UHD_INSTALL(FILES
${CMAKE_CURRENT_BINARY_DIR}/dd.exe
DESTINATION ${PKG_LIB_DIR}/utils
COMPONENT utilities
)
ENDIF(WIN32 AND UHD_RELEASE_MODE)
IF(LINUX)
- INSTALL(PROGRAMS
+ UHD_INSTALL(PROGRAMS
usrp2_recovery.py
DESTINATION ${PKG_LIB_DIR}/utils
COMPONENT utilities
)
- INSTALL(PROGRAMS
+ UHD_INSTALL(PROGRAMS
usrp2_card_burner.py
RENAME usrp2_card_burner
DESTINATION ${RUNTIME_DIR}
@@ -120,7 +120,7 @@ IF(ENABLE_USRP2)
)
ENDIF(LINUX)
FOREACH(burner ${burners})
- INSTALL(PROGRAMS
+ UHD_INSTALL(PROGRAMS
${burner}
DESTINATION ${PKG_LIB_DIR}/utils
COMPONENT utilities