diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2013-05-10 15:07:03 -0700 |
---|---|---|
committer | Nicholas Corgan <nick.corgan@ettus.com> | 2013-05-10 15:07:03 -0700 |
commit | 6524f46bc54c36f8d50d6a3aa1c17aafb0a47d75 (patch) | |
tree | 40a0cf8ec54bae728041d7304ecd841339bace81 /host/CMakeLists.txt | |
parent | c6dcb2b4b63841925f4863bc0adbda9b2048475a (diff) | |
parent | 4b72513a8930ec4147dab76c079afa1186e335cd (diff) | |
download | uhd-6524f46bc54c36f8d50d6a3aa1c17aafb0a47d75.tar.gz uhd-6524f46bc54c36f8d50d6a3aa1c17aafb0a47d75.tar.bz2 uhd-6524f46bc54c36f8d50d6a3aa1c17aafb0a47d75.zip |
Merge branch 'maint'
Conflicts:
host/tests/CMakeLists.txt
Diffstat (limited to 'host/CMakeLists.txt')
-rw-r--r-- | host/CMakeLists.txt | 51 |
1 files changed, 36 insertions, 15 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}") |