summaryrefslogtreecommitdiffstats
path: root/host/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'host/CMakeLists.txt')
-rw-r--r--host/CMakeLists.txt51
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}")