Nuand / bladeRF

bladeRF USB 3.0 Superspeed Software Defined Radio Source Code
http://nuand.com
Other
1.13k stars 455 forks source link

cmake having trouble on build-o-matic VM (ubuntu 10.04) #123

Closed rtucker closed 10 years ago

rtucker commented 10 years ago

From an empty build dir, I'm getting:

rtucker@framboise:/tmp/cov_test_dir_3$ mkdir build
rtucker@framboise:/tmp/cov_test_dir_3$ cd build
rtucker@framboise:/tmp/cov_test_dir_3/build$ cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Build type not specified: defaulting to a release build.
CMake Error at host/libraries/libbladeRF/CMakeLists.txt:20 (include):
  include could not find load file:

    Version

CMake Warning at host/libraries/libbladeRF/CMakeLists.txt:99 (find_package):
  Could not find module FindLibUSB.cmake or a configuration file for package
  LibUSB.

  Adjust CMAKE_MODULE_PATH to find FindLibUSB.cmake or set LibUSB_DIR to the
  directory containing a CMake configuration file for LibUSB.  The file will
  have one of the following names:

    LibUSBConfig.cmake
    libusb-config.cmake

CMake Error at host/libraries/libbladeRF/CMakeLists.txt:101 (message):
  libusb-1.0 required to use for libusb backend

-- Configuring incomplete, errors occurred!

This is working on a Linux Mint 15 machine (~Ubuntu 13.04), so it doesn't seem to be a general problem.

cmake is version 2.8.0, libusbx 1.0.17 was installed to /usr/local from tarball. It does appear as libusb-1.0 in pkg-config --list-all. (The VM does not have udev, nor does it have USB at all.) Reproduced with commit c7355c592fa8e6d0b732823549dbcd36d638a64f.

rtucker commented 10 years ago

According to http://cmake.org/Wiki/CMake_Useful_Variables the CMAKE_CURRENT_LIST_DIR variable was introduced in CMake 2.8.3, so the minimum version required is incorrect. Will submit a pull request which should break my build once and for all. :-)