summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-12-20 10:59:25 -0800
committerJosh Blum <josh@joshknows.com>2010-12-20 10:59:25 -0800
commit42ed1d34245bf14f71e4777bc8efc1d4ff4db26f (patch)
tree91be1aec11ac39c42dcb14a37c2fd6799de4d012
parent47c92a2ac68fbae59c02f3e2a322cabda499c13b (diff)
downloaduhd-42ed1d34245bf14f71e4777bc8efc1d4ff4db26f.tar.gz
uhd-42ed1d34245bf14f71e4777bc8efc1d4ff4db26f.tar.bz2
uhd-42ed1d34245bf14f71e4777bc8efc1d4ff4db26f.zip
uhd: use the include subdir macro to simplify the lib subdirs cmakelists
-rw-r--r--host/lib/CMakeLists.txt32
-rw-r--r--host/lib/ic_reg_maps/CMakeLists.txt64
-rw-r--r--host/lib/transport/CMakeLists.txt42
-rw-r--r--host/lib/usrp/CMakeLists.txt39
-rw-r--r--host/lib/usrp/dboard/CMakeLists.txt20
-rw-r--r--host/lib/usrp/usrp1/CMakeLists.txt36
-rw-r--r--host/lib/usrp/usrp2/CMakeLists.txt44
-rw-r--r--host/lib/usrp/usrp_e100/CMakeLists.txt40
-rw-r--r--host/lib/utils/CMakeLists.txt20
9 files changed, 187 insertions, 150 deletions
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 <http://www.gnu.org/licenses/>.
#
-#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 <http://www.gnu.org/licenses/>.
#
-#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 <http://www.gnu.org/licenses/>.
#
-#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 <http://www.gnu.org/licenses/>.
#
-#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 <http://www.gnu.org/licenses/>.
#
-#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 <http://www.gnu.org/licenses/>.
#
-#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 <http://www.gnu.org/licenses/>.
#
-#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 <http://www.gnu.org/licenses/>.
#
-#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
)