From a78a72f25416ecbd17f821a3fba358da6bb08e32 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 16 Dec 2010 15:27:17 -0800 Subject: usrp1: negate the rx cordic reg word because things were inverted and nobody noticed --- host/lib/usrp/usrp1/dsp_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host/lib/usrp/usrp1') diff --git a/host/lib/usrp/usrp1/dsp_impl.cpp b/host/lib/usrp/usrp1/dsp_impl.cpp index e9a5e60a6..370f4831f 100644 --- a/host/lib/usrp/usrp1/dsp_impl.cpp +++ b/host/lib/usrp/usrp1/dsp_impl.cpp @@ -102,7 +102,7 @@ void usrp1_impl::rx_dsp_set(const wax::obj &key_, const wax::obj &val){ ("0", FR_RX_FREQ_0) ("1", FR_RX_FREQ_1) ("2", FR_RX_FREQ_2) ("3", FR_RX_FREQ_3) ; - _iface->poke32(freq_name_to_reg_val[key.name], reg_word); + _iface->poke32(freq_name_to_reg_val[key.name], ~reg_word + 1); _rx_dsp_freqs[key.name] = new_freq; return; } -- cgit v1.2.3 From 47c92a2ac68fbae59c02f3e2a322cabda499c13b Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 20 Dec 2010 01:23:31 -0800 Subject: uhd: implemented top-level component registry now docs, examples, utils, usb, are configurable components with dependencies --- host/CMakeLists.txt | 37 ++++++++++++--- host/config/Component.cmake | 82 ++++++++++++++++++++++++++++++++++ host/docs/CMakeLists.txt | 16 +++++-- host/docs/build.rst | 2 +- host/lib/CMakeLists.txt | 40 ----------------- host/lib/transport/CMakeLists.txt | 13 +++--- host/lib/usrp/usrp1/CMakeLists.txt | 7 +-- host/lib/usrp/usrp2/CMakeLists.txt | 2 +- host/lib/usrp/usrp_e100/CMakeLists.txt | 2 +- 9 files changed, 135 insertions(+), 66 deletions(-) create mode 100644 host/config/Component.cmake (limited to 'host/lib/usrp/usrp1') diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index 75331ddfc..efc439af0 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -22,6 +22,7 @@ ENABLE_TESTING() ######################################################################## # Config Files (include order is important) ######################################################################## +INCLUDE(${CMAKE_SOURCE_DIR}/config/Component.cmake) INCLUDE(${CMAKE_SOURCE_DIR}/config/Python.cmake) INCLUDE(${CMAKE_SOURCE_DIR}/config/Version.cmake) INCLUDE(${CMAKE_SOURCE_DIR}/config/CPack.cmake) @@ -34,7 +35,6 @@ SET(LIBRARY_DIR lib${LIB_SUFFIX}) SET(INCLUDE_DIR include) SET(PKG_DATA_DIR share/uhd) SET(PKG_DOC_DIR share/doc/uhd) -MESSAGE(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}") ######################################################################## # Local Include Dir @@ -133,12 +133,39 @@ INSTALL(FILES DESTINATION ${PKG_DOC_DIR} ) +######################################################################## +# Register top level components +######################################################################## +SET(ENABLE_LIBUHD ON) #always enabled +LIBUHD_REGISTER_COMPONENT("Examples" ENABLE_EXAMPLES ON "ENABLE_LIBUHD" OFF) +LIBUHD_REGISTER_COMPONENT("Utils" ENABLE_UTILS ON "ENABLE_LIBUHD" OFF) +LIBUHD_REGISTER_COMPONENT("Tests" ENABLE_TESTS ON "ENABLE_LIBUHD" OFF) + ######################################################################## # Add the subdirectories ######################################################################## ADD_SUBDIRECTORY(docs) -ADD_SUBDIRECTORY(examples) + +IF(ENABLE_EXAMPLES) + ADD_SUBDIRECTORY(examples) +ENDIF(ENABLE_EXAMPLES) + ADD_SUBDIRECTORY(include) -ADD_SUBDIRECTORY(lib) -ADD_SUBDIRECTORY(test) -ADD_SUBDIRECTORY(utils) + +IF(ENABLE_LIBUHD) + ADD_SUBDIRECTORY(lib) +ENDIF(ENABLE_LIBUHD) + +IF(ENABLE_TESTS) + ADD_SUBDIRECTORY(test) +ENDIF(ENABLE_TESTS) + +IF(ENABLE_UTILS) + ADD_SUBDIRECTORY(utils) +ENDIF(ENABLE_UTILS) + +######################################################################## +# Print Summary +######################################################################## +UHD_PRINT_COMPONENT_SUMMARY() +MESSAGE(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}") diff --git a/host/config/Component.cmake b/host/config/Component.cmake new file mode 100644 index 000000000..5384cc53f --- /dev/null +++ b/host/config/Component.cmake @@ -0,0 +1,82 @@ +# +# Copyright 2010 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 +# 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 . +# + +######################################################################## +SET(_uhd_enabled_components "" CACHE INTERNAL "" FORCE) +SET(_uhd_disabled_components "" CACHE INTERNAL "" FORCE) + +######################################################################## +# Register a component into the system +# Usage: LIBUHD_REGISTER_COMPONENT( ) +######################################################################## +FUNCTION(LIBUHD_REGISTER_COMPONENT name var) + INCLUDE(CMakeDependentOption) + MESSAGE(STATUS "") + MESSAGE(STATUS "Configuring ${name} support...") + IF(DEFINED ${var}) + MESSAGE(STATUS "${name} support configured ${var}=${${var}}") + ELSE(DEFINED ${var}) #not defined: automatic enabling of component + MESSAGE(STATUS "${name} support configured automatically") + ENDIF(DEFINED ${var}) + + #setup the dependent option for this component + CMAKE_DEPENDENT_OPTION(${var} "enable ${name} support" ${ARGN}) + + #remove previous occurrence of component in either list + IF(DEFINED _uhd_enabled_components) + LIST(REMOVE_ITEM _uhd_enabled_components ${name}) + ENDIF(DEFINED _uhd_enabled_components) + IF(DEFINED _uhd_disabled_components) + LIST(REMOVE_ITEM _uhd_disabled_components ${name}) + ENDIF(DEFINED _uhd_disabled_components) + + #append the component into one of the lists + IF(${var}) + MESSAGE(STATUS " Enabling ${name} support.") + LIST(APPEND _uhd_enabled_components ${name}) + ELSE(${var}) + MESSAGE(STATUS " Disabling ${name} support.") + LIST(APPEND _uhd_disabled_components ${name}) + ENDIF(${var}) + + #make components lists into global variables + SET(_uhd_enabled_components ${_uhd_enabled_components} CACHE INTERNAL "" FORCE) + SET(_uhd_disabled_components ${_uhd_disabled_components} CACHE INTERNAL "" FORCE) +ENDFUNCTION(LIBUHD_REGISTER_COMPONENT) + +######################################################################## +# Print the registered component summary +######################################################################## +FUNCTION(UHD_PRINT_COMPONENT_SUMMARY) + MESSAGE(STATUS "") + MESSAGE(STATUS "######################################################") + MESSAGE(STATUS "# LibUHD enabled components ") + MESSAGE(STATUS "######################################################") + FOREACH(comp ${_uhd_enabled_components}) + MESSAGE(STATUS " * ${comp}") + ENDFOREACH(comp) + + MESSAGE(STATUS "") + MESSAGE(STATUS "######################################################") + MESSAGE(STATUS "# LibUHD disabled components ") + MESSAGE(STATUS "######################################################") + FOREACH(comp ${_uhd_disabled_components}) + MESSAGE(STATUS " * ${comp}") + ENDFOREACH(comp) + + MESSAGE(STATUS "") +ENDFUNCTION(UHD_PRINT_COMPONENT_SUMMARY) diff --git a/host/docs/CMakeLists.txt b/host/docs/CMakeLists.txt index 296ce9922..d6a7801bf 100644 --- a/host/docs/CMakeLists.txt +++ b/host/docs/CMakeLists.txt @@ -41,10 +41,16 @@ FIND_PROGRAM(RST2HTML rst2html) IF(${RST2HTML} STREQUAL "RST2HTML-NOTFOUND") MESSAGE(STATUS "Checking for rst2html (docutils) - not found") MESSAGE(STATUS " Disabled generation of HTML manual.") + SET(HAVE_RST2HTML FALSE) ELSE(${RST2HTML} STREQUAL "RST2HTML-NOTFOUND") MESSAGE(STATUS "Checking for rst2html (docutils) - found") MESSAGE(STATUS " Enabled generation of HTML manual.") + SET(HAVE_RST2HTML TRUE) +ENDIF(${RST2HTML} STREQUAL "RST2HTML-NOTFOUND") + +LIBUHD_REGISTER_COMPONENT("Manual" ENABLE_MANUAL ON "HAVE_RST2HTML" OFF) +IF(ENABLE_MANUAL) #setup rst2html options SET(stylesheet ${CMAKE_CURRENT_SOURCE_DIR}/style.css) SET(rst2html_options @@ -73,7 +79,7 @@ ELSE(${RST2HTML} STREQUAL "RST2HTML-NOTFOUND") #make the html manual a build-time dependency ADD_CUSTOM_TARGET(manual_html ALL DEPENDS ${manual_html_files}) -ENDIF(${RST2HTML} STREQUAL "RST2HTML-NOTFOUND") +ENDIF(ENABLE_MANUAL) INSTALL(FILES ${manual_sources} DESTINATION ${PKG_DOC_DIR}/manual/rst) @@ -84,7 +90,9 @@ MESSAGE(STATUS "") MESSAGE(STATUS "Checking for doxygen") INCLUDE(FindDoxygen) -IF(DOXYGEN_FOUND) +LIBUHD_REGISTER_COMPONENT("Doxygen" ENABLE_DOXYGEN ON "DOXYGEN_FOUND" OFF) + +IF(ENABLE_DOXYGEN) MESSAGE(STATUS " Enabled generation of Doxygen documentation.") #generate the doxygen configuration file @@ -105,6 +113,6 @@ IF(DOXYGEN_FOUND) #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}) -ELSE(DOXYGEN_FOUND) +ELSE(ENABLE_DOXYGEN) MESSAGE(STATUS " Disabled generation of Doxygen documentation.") -ENDIF(DOXYGEN_FOUND) +ENDIF(ENABLE_DOXYGEN) diff --git a/host/docs/build.rst b/host/docs/build.rst index a41ce8331..812b5c1a9 100644 --- a/host/docs/build.rst +++ b/host/docs/build.rst @@ -39,7 +39,7 @@ Other compilers have not been tested yet or confirmed working. CMake ^^^^^^^^^^^^^^^^ * **Purpose:** generates project build files -* **Version:** at least 2.8 +* **Version:** at least 2.6 * **Usage:** build time (required) * **Download URL:** http://www.cmake.org/cmake/resources/software.html diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt index a198b476a..e4de7bcc7 100644 --- a/host/lib/CMakeLists.txt +++ b/host/lib/CMakeLists.txt @@ -61,25 +61,6 @@ MACRO(LIBUHD_PYTHON_GEN_SOURCE pyfile outfile) LIBUHD_APPEND_SOURCES(${outfile}) ENDMACRO(LIBUHD_PYTHON_GEN_SOURCE) -MACRO(LIBUHD_REGISTER_COMPONENT name var auto) - MESSAGE(STATUS "") - MESSAGE(STATUS "Configuring ${name} support...") - IF(DEFINED ${var}) - MESSAGE(STATUS "${name} support configured ${var}=${${var}}") - ELSE(DEFINED ${var}) #not defined: automatic enabling of component - SET(${var} ${auto}) - MESSAGE(STATUS "${name} support configured automatically") - ENDIF(DEFINED ${var}) - OPTION(${var} "enable ${name} support" ${${var}}) - IF(${var}) - MESSAGE(STATUS " Enabling ${name} support.") - LIST(APPEND _libuhd_enabled_components ${name}) - ELSE(${var}) - MESSAGE(STATUS " Disabling ${name} support.") - LIST(APPEND _libuhd_disabled_components ${name}) - ENDIF(${var}) -ENDMACRO(LIBUHD_REGISTER_COMPONENT) - ######################################################################## # Include CMakeLists.txt from subdirectories ######################################################################## @@ -128,24 +109,3 @@ INSTALL(TARGETS uhd ARCHIVE DESTINATION ${LIBRARY_DIR} # .lib file RUNTIME DESTINATION ${LIBRARY_DIR} # .dll file ) - -######################################################################## -# Print configuration summary -######################################################################## -MESSAGE(STATUS "") -MESSAGE(STATUS "######################################################") -MESSAGE(STATUS "# LibUHD enabled components ") -MESSAGE(STATUS "######################################################") -FOREACH(comp ${_libuhd_enabled_components}) - MESSAGE(STATUS " * ${comp}") -ENDFOREACH(comp) - -MESSAGE(STATUS "") -MESSAGE(STATUS "######################################################") -MESSAGE(STATUS "# LibUHD disabled components ") -MESSAGE(STATUS "######################################################") -FOREACH(comp ${_libuhd_disabled_components}) - MESSAGE(STATUS " * ${comp}") -ENDFOREACH(comp) - -MESSAGE(STATUS "") diff --git a/host/lib/transport/CMakeLists.txt b/host/lib/transport/CMakeLists.txt index b5f1fc940..4d0a0f1f7 100644 --- a/host/lib/transport/CMakeLists.txt +++ b/host/lib/transport/CMakeLists.txt @@ -20,12 +20,12 @@ ######################################################################## # Setup libusb ######################################################################## -MESSAGE(STATUS "") -MESSAGE(STATUS "Configuring USB support...") LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/lib/transport) FIND_PACKAGE(USB1 REQUIRED) -IF(LIBUSB_FOUND) +LIBUHD_REGISTER_COMPONENT("USB" ENABLE_USB ON "ENABLE_LIBUHD;LIBUSB_FOUND" OFF) + +IF(ENABLE_USB) MESSAGE(STATUS "USB support enabled via libusb.") INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIR}) LIBUHD_APPEND_LIBS(${LIBUSB_LIBRARIES}) @@ -38,14 +38,11 @@ IF(LIBUSB_FOUND) IF(MSVC) #include our custom stdint for libusb INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib/transport/msvc) ENDIF(MSVC) - SET(HAVE_USB_SUPPORT TRUE) -ELSE(LIBUSB_FOUND) - MESSAGE(STATUS "USB support disabled.") +ELSE(ENABLE_USB) LIBUHD_APPEND_SOURCES( ${CMAKE_SOURCE_DIR}/lib/transport/usb_dummy_impl.cpp ) - SET(HAVE_USB_SUPPORT FALSE) -ENDIF(LIBUSB_FOUND) +ENDIF(ENABLE_USB) ######################################################################## # Check for SIMD headers diff --git a/host/lib/usrp/usrp1/CMakeLists.txt b/host/lib/usrp/usrp1/CMakeLists.txt index 8b6ba78d2..13db50790 100644 --- a/host/lib/usrp/usrp1/CMakeLists.txt +++ b/host/lib/usrp/usrp1/CMakeLists.txt @@ -20,12 +20,7 @@ ######################################################################## # Conditionally configure the USRP1 support ######################################################################## -LIBUHD_REGISTER_COMPONENT("USRP1" ENABLE_USRP1 ${HAVE_USB_SUPPORT}) - -#sanity check when USRP1 support enabled -IF(ENABLE_USRP1 AND NOT HAVE_USB_SUPPORT) - MESSAGE(FATAL_ERROR "USRP1 support enabled without USB support") -ENDIF(ENABLE_USRP1 AND NOT HAVE_USB_SUPPORT) +LIBUHD_REGISTER_COMPONENT("USRP1" ENABLE_USRP1 ON "ENABLE_LIBUHD;ENABLE_USB" OFF) IF(ENABLE_USRP1) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/../firmware/fx2/common) diff --git a/host/lib/usrp/usrp2/CMakeLists.txt b/host/lib/usrp/usrp2/CMakeLists.txt index afd69cae9..43f384015 100644 --- a/host/lib/usrp/usrp2/CMakeLists.txt +++ b/host/lib/usrp/usrp2/CMakeLists.txt @@ -20,7 +20,7 @@ ######################################################################## # Conditionally configure the USRP2 support ######################################################################## -LIBUHD_REGISTER_COMPONENT("USRP2" ENABLE_USRP2 TRUE) +LIBUHD_REGISTER_COMPONENT("USRP2" ENABLE_USRP2 ON "ENABLE_LIBUHD" OFF) IF(ENABLE_USRP2) LIBUHD_APPEND_SOURCES( diff --git a/host/lib/usrp/usrp_e100/CMakeLists.txt b/host/lib/usrp/usrp_e100/CMakeLists.txt index 3c5c58ee0..42db82321 100644 --- a/host/lib/usrp/usrp_e100/CMakeLists.txt +++ b/host/lib/usrp/usrp_e100/CMakeLists.txt @@ -20,7 +20,7 @@ ######################################################################## # Conditionally configure the USRP-E100 support ######################################################################## -LIBUHD_REGISTER_COMPONENT("USRP-E100" ENABLE_USRP_E100 FALSE) +LIBUHD_REGISTER_COMPONENT("USRP-E100" ENABLE_USRP_E100 OFF "ENABLE_LIBUHD" ON) IF(ENABLE_USRP_E100) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/include) -- cgit v1.2.3 From 42ed1d34245bf14f71e4777bc8efc1d4ff4db26f Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 20 Dec 2010 10:59:25 -0800 Subject: uhd: use the include subdir macro to simplify the lib subdirs cmakelists --- host/lib/CMakeLists.txt | 32 ++++++++++++++--- host/lib/ic_reg_maps/CMakeLists.txt | 64 ++++++++++++++++++---------------- host/lib/transport/CMakeLists.txt | 42 +++++++++++----------- host/lib/usrp/CMakeLists.txt | 39 +++++++++++---------- host/lib/usrp/dboard/CMakeLists.txt | 20 ++++++----- host/lib/usrp/usrp1/CMakeLists.txt | 36 ++++++++++--------- host/lib/usrp/usrp2/CMakeLists.txt | 44 ++++++++++++----------- host/lib/usrp/usrp_e100/CMakeLists.txt | 40 +++++++++++---------- host/lib/utils/CMakeLists.txt | 20 ++++++----- 9 files changed, 187 insertions(+), 150 deletions(-) (limited to 'host/lib/usrp/usrp1') diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt index e4de7bcc7..28e4bcca2 100644 --- a/host/lib/CMakeLists.txt +++ b/host/lib/CMakeLists.txt @@ -61,13 +61,35 @@ MACRO(LIBUHD_PYTHON_GEN_SOURCE pyfile outfile) LIBUHD_APPEND_SOURCES(${outfile}) ENDMACRO(LIBUHD_PYTHON_GEN_SOURCE) +MACRO(INCLUDE_SUBDIRECTORY subdir) + #insert the current directories on the front of the list + LIST(INSERT _cmake_source_dirs 0 ${CMAKE_CURRENT_SOURCE_DIR}) + LIST(INSERT _cmake_binary_dirs 0 ${CMAKE_CURRENT_BINARY_DIR}) + + #set the current directories to the names of the subdirs + SET(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}) + SET(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${subdir}) + + #include the subdirectory CMakeLists to run it + FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt) + + #reset the value of the current directories + LIST(GET _cmake_source_dirs 0 CMAKE_CURRENT_SOURCE_DIR) + LIST(GET _cmake_binary_dirs 0 CMAKE_CURRENT_BINARY_DIR) + + #pop the subdir names of the front of the list + LIST(REMOVE_AT _cmake_source_dirs 0) + LIST(REMOVE_AT _cmake_binary_dirs 0) +ENDMACRO(INCLUDE_SUBDIRECTORY) + ######################################################################## -# Include CMakeLists.txt from subdirectories +# Include subdirectories (different than add) ######################################################################## -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/ic_reg_maps/CMakeLists.txt) -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/transport/CMakeLists.txt) -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/usrp/CMakeLists.txt) -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/utils/CMakeLists.txt) +INCLUDE_SUBDIRECTORY(ic_reg_maps) +INCLUDE_SUBDIRECTORY(transport) +INCLUDE_SUBDIRECTORY(usrp) +INCLUDE_SUBDIRECTORY(utils) ######################################################################## # Append to the list of sources for lib uhd diff --git a/host/lib/ic_reg_maps/CMakeLists.txt b/host/lib/ic_reg_maps/CMakeLists.txt index ac051b843..67a63c32b 100644 --- a/host/lib/ic_reg_maps/CMakeLists.txt +++ b/host/lib/ic_reg_maps/CMakeLists.txt @@ -15,76 +15,78 @@ # along with this program. If not, see . # -#This file will be included by cmake, use absolute paths! +######################################################################## +# This file included, use CMake directory variables +######################################################################## -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/lib/ic_reg_maps) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_adf4350_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/adf4350_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_adf4350_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/adf4350_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_adf4360_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/adf4360_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_adf4360_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/adf4360_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_ad9510_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/ad9510_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_ad9510_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/ad9510_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_ad9777_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/ad9777_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_ad9777_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/ad9777_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_ad5623_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/ad5623_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_ad5623_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/ad5623_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_ad7922_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/ad7922_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_ad7922_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/ad7922_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_max2829_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/max2829_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_max2829_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/max2829_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_max2118_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/max2118_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_max2118_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/max2118_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_max2112_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/max2112_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_max2112_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/max2112_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_max2112_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/max2112_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_max2112_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/max2112_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_ad9862_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/ad9862_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_ad9862_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/ad9862_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_ad9522_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/ad9522_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_ad9522_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/ad9522_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_ads62p44_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/ads62p44_regs.hpp - ) + ${CMAKE_CURRENT_SOURCE_DIR}/gen_ads62p44_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/ads62p44_regs.hpp +) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_tuner_4937di5_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/tuner_4937di5_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_tuner_4937di5_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/tuner_4937di5_regs.hpp ) diff --git a/host/lib/transport/CMakeLists.txt b/host/lib/transport/CMakeLists.txt index 4d0a0f1f7..de2f1fdd0 100644 --- a/host/lib/transport/CMakeLists.txt +++ b/host/lib/transport/CMakeLists.txt @@ -15,12 +15,14 @@ # along with this program. If not, see . # -#This file will be included by cmake, use absolute paths! +######################################################################## +# This file included, use CMake directory variables +######################################################################## ######################################################################## # Setup libusb ######################################################################## -LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/lib/transport) +LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) FIND_PACKAGE(USB1 REQUIRED) LIBUHD_REGISTER_COMPONENT("USB" ENABLE_USB ON "ENABLE_LIBUHD;LIBUSB_FOUND" OFF) @@ -30,17 +32,17 @@ IF(ENABLE_USB) INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIR}) LIBUHD_APPEND_LIBS(${LIBUSB_LIBRARIES}) LIBUHD_APPEND_SOURCES( - ${CMAKE_SOURCE_DIR}/lib/transport/libusb1_control.cpp - ${CMAKE_SOURCE_DIR}/lib/transport/libusb1_zero_copy.cpp - ${CMAKE_SOURCE_DIR}/lib/transport/libusb1_base.cpp - ${CMAKE_SOURCE_DIR}/lib/transport/libusb1_base.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_control.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_zero_copy.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_base.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_base.hpp ) IF(MSVC) #include our custom stdint for libusb - INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib/transport/msvc) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/msvc) ENDIF(MSVC) ELSE(ENABLE_USB) LIBUHD_APPEND_SOURCES( - ${CMAKE_SOURCE_DIR}/lib/transport/usb_dummy_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usb_dummy_impl.cpp ) ENDIF(ENABLE_USB) @@ -87,29 +89,29 @@ ENDIF(HAVE_IFADDRS_H) # Append to the list of sources for lib uhd ######################################################################## LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/transport/gen_vrt_if_packet.py - ${CMAKE_BINARY_DIR}/lib/transport/vrt_if_packet.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_vrt_if_packet.py + ${CMAKE_CURRENT_BINARY_DIR}/vrt_if_packet.cpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/transport/gen_convert_types.py - ${CMAKE_BINARY_DIR}/lib/transport/convert_types.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_convert_types.py + ${CMAKE_CURRENT_BINARY_DIR}/convert_types.cpp ) # append this directory to the include path so the generated convert types # can include the implementation convert types file in the source directory -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib/transport) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) # make the generated convert types depend on the implementation header SET_SOURCE_FILES_PROPERTIES( - ${CMAKE_BINARY_DIR}/lib/transport/convert_types.cpp PROPERTIES - OBJECT_DEPENDS ${CMAKE_SOURCE_DIR}/lib/transport/convert_types_impl.hpp + ${CMAKE_CURRENT_BINARY_DIR}/convert_types.cpp PROPERTIES + OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/convert_types_impl.hpp ) LIBUHD_APPEND_SOURCES( - ${CMAKE_SOURCE_DIR}/lib/transport/if_addrs.cpp - ${CMAKE_SOURCE_DIR}/lib/transport/udp_simple.cpp - ${CMAKE_SOURCE_DIR}/lib/transport/udp_zero_copy_asio.cpp - ${CMAKE_SOURCE_DIR}/lib/transport/vrt_packet_handler.hpp - ${CMAKE_SOURCE_DIR}/lib/transport/zero_copy.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/if_addrs.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/udp_simple.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/udp_zero_copy_asio.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/vrt_packet_handler.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/zero_copy.cpp ) diff --git a/host/lib/usrp/CMakeLists.txt b/host/lib/usrp/CMakeLists.txt index bd26d29a1..9dc74a5fe 100644 --- a/host/lib/usrp/CMakeLists.txt +++ b/host/lib/usrp/CMakeLists.txt @@ -15,25 +15,26 @@ # along with this program. If not, see . # -#This file will be included by cmake, use absolute paths! - +######################################################################## +# This file included, use CMake directory variables +######################################################################## LIBUHD_APPEND_SOURCES( - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard_base.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard_eeprom.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard_id.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard_iface.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard_manager.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dsp_utils.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/mboard_eeprom.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/misc_utils.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/multi_usrp.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/single_usrp.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/subdev_spec.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/tune_helper.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/wrapper_utils.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_base.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_eeprom.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_id.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_iface.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_manager.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dsp_utils.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mboard_eeprom.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/misc_utils.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/multi_usrp.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/single_usrp.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/subdev_spec.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tune_helper.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/wrapper_utils.hpp ) -INCLUDE(${CMAKE_SOURCE_DIR}/lib/usrp/dboard/CMakeLists.txt) -INCLUDE(${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/CMakeLists.txt) -INCLUDE(${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/CMakeLists.txt) -INCLUDE(${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/CMakeLists.txt) +INCLUDE_SUBDIRECTORY(dboard) +INCLUDE_SUBDIRECTORY(usrp1) +INCLUDE_SUBDIRECTORY(usrp2) +INCLUDE_SUBDIRECTORY(usrp_e100) diff --git a/host/lib/usrp/dboard/CMakeLists.txt b/host/lib/usrp/dboard/CMakeLists.txt index 79cd42d18..7bd201294 100644 --- a/host/lib/usrp/dboard/CMakeLists.txt +++ b/host/lib/usrp/dboard/CMakeLists.txt @@ -15,16 +15,18 @@ # along with this program. If not, see . # -#This file will be included by cmake, use absolute paths! +######################################################################## +# This file included, use CMake directory variables +######################################################################## LIBUHD_APPEND_SOURCES( - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard/db_basic_and_lf.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard/db_rfx.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard/db_xcvr2450.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard/db_wbx.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard/db_dbsrx.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard/db_unknown.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard/db_tvrx.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard/db_dbsrx2.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/db_basic_and_lf.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/db_rfx.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/db_xcvr2450.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/db_wbx.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/db_dbsrx.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/db_unknown.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/db_tvrx.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/db_dbsrx2.cpp ) diff --git a/host/lib/usrp/usrp1/CMakeLists.txt b/host/lib/usrp/usrp1/CMakeLists.txt index 13db50790..519e17bfa 100644 --- a/host/lib/usrp/usrp1/CMakeLists.txt +++ b/host/lib/usrp/usrp1/CMakeLists.txt @@ -15,7 +15,9 @@ # along with this program. If not, see . # -#This file will be included by cmake, use absolute paths! +######################################################################## +# This file included, use CMake directory variables +######################################################################## ######################################################################## # Conditionally configure the USRP1 support @@ -26,21 +28,21 @@ IF(ENABLE_USRP1) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/../firmware/fx2/common) LIBUHD_APPEND_SOURCES( - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/clock_ctrl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/clock_ctrl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/codec_ctrl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/codec_ctrl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/codec_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/dboard_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/dboard_iface.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/dsp_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/io_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/mboard_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/usrp1_iface.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/usrp1_iface.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/usrp1_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/usrp1_impl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/usrp1_ctrl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/usrp1_ctrl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/clock_ctrl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/clock_ctrl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/codec_ctrl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/codec_ctrl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/codec_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_iface.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dsp_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/io_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mboard_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp1_iface.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp1_iface.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp1_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp1_impl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp1_ctrl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp1_ctrl.hpp ) ENDIF(ENABLE_USRP1) diff --git a/host/lib/usrp/usrp2/CMakeLists.txt b/host/lib/usrp/usrp2/CMakeLists.txt index 43f384015..527669852 100644 --- a/host/lib/usrp/usrp2/CMakeLists.txt +++ b/host/lib/usrp/usrp2/CMakeLists.txt @@ -15,7 +15,9 @@ # along with this program. If not, see . # -#This file will be included by cmake, use absolute paths! +######################################################################## +# This file included, use CMake directory variables +######################################################################## ######################################################################## # Conditionally configure the USRP2 support @@ -24,25 +26,25 @@ LIBUHD_REGISTER_COMPONENT("USRP2" ENABLE_USRP2 ON "ENABLE_LIBUHD" OFF) IF(ENABLE_USRP2) LIBUHD_APPEND_SOURCES( - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/clock_ctrl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/clock_ctrl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/codec_ctrl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/codec_ctrl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/codec_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/dboard_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/dboard_iface.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/dsp_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/gps_ctrl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/gps_ctrl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/io_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/mboard_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/serdes_ctrl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/serdes_ctrl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/usrp2_iface.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/usrp2_iface.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/usrp2_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/usrp2_impl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/usrp2_regs.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/usrp2_regs.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/clock_ctrl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/clock_ctrl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/codec_ctrl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/codec_ctrl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/codec_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_iface.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dsp_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gps_ctrl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gps_ctrl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/io_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mboard_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/serdes_ctrl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/serdes_ctrl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp2_iface.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp2_iface.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp2_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp2_impl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp2_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp2_regs.cpp ) ENDIF(ENABLE_USRP2) diff --git a/host/lib/usrp/usrp_e100/CMakeLists.txt b/host/lib/usrp/usrp_e100/CMakeLists.txt index 42db82321..5d8a9791d 100644 --- a/host/lib/usrp/usrp_e100/CMakeLists.txt +++ b/host/lib/usrp/usrp_e100/CMakeLists.txt @@ -15,7 +15,9 @@ # along with this program. If not, see . # -#This file will be included by cmake, use absolute paths! +######################################################################## +# This file included, use CMake directory variables +######################################################################## ######################################################################## # Conditionally configure the USRP-E100 support @@ -23,25 +25,25 @@ LIBUHD_REGISTER_COMPONENT("USRP-E100" ENABLE_USRP_E100 OFF "ENABLE_LIBUHD" ON) IF(ENABLE_USRP_E100) - INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/include) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) LIBUHD_APPEND_SOURCES( - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/clock_ctrl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/clock_ctrl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/codec_ctrl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/codec_ctrl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/codec_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/dboard_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/dboard_iface.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/dsp_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/fpga-downloader.cc - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/io_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/mboard_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/usrp_e100_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/usrp_e100_impl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/usrp_e100_iface.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/usrp_e100_iface.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/usrp_e100_mmap_zero_copy.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/usrp_e100_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/clock_ctrl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/clock_ctrl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/codec_ctrl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/codec_ctrl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/codec_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_iface.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dsp_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/fpga-downloader.cc + ${CMAKE_CURRENT_SOURCE_DIR}/io_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mboard_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp_e100_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp_e100_impl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp_e100_iface.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp_e100_iface.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp_e100_mmap_zero_copy.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp_e100_regs.hpp ) ENDIF(ENABLE_USRP_E100) diff --git a/host/lib/utils/CMakeLists.txt b/host/lib/utils/CMakeLists.txt index aecd3a4b0..60df24eef 100644 --- a/host/lib/utils/CMakeLists.txt +++ b/host/lib/utils/CMakeLists.txt @@ -15,7 +15,9 @@ # along with this program. If not, see . # -#This file will be included by cmake, use absolute paths! +######################################################################## +# This file included, use CMake directory variables +######################################################################## ######################################################################## # Setup defines for process scheduling @@ -79,12 +81,12 @@ ENDIF(HAVE_DLFCN_H) # Append sources ######################################################################## LIBUHD_APPEND_SOURCES( - ${CMAKE_SOURCE_DIR}/lib/utils/assert.cpp - ${CMAKE_SOURCE_DIR}/lib/utils/gain_group.cpp - ${CMAKE_SOURCE_DIR}/lib/utils/images.cpp - ${CMAKE_SOURCE_DIR}/lib/utils/load_modules.cpp - ${CMAKE_SOURCE_DIR}/lib/utils/paths.cpp - ${CMAKE_SOURCE_DIR}/lib/utils/props.cpp - ${CMAKE_SOURCE_DIR}/lib/utils/thread_priority.cpp - ${CMAKE_SOURCE_DIR}/lib/utils/warning.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/assert.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gain_group.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/images.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/load_modules.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/paths.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/props.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/thread_priority.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/warning.cpp ) -- cgit v1.2.3