CMake 错误未提供 FindGnuradio.cmake

CMake error not providing FindGnuradio.cmake

运行使用 cmake 时出现以下错误,我不确定如何修复它。好像是在告诉我具体要做什么,但不是很熟悉 Linux.

 CMake Error at CMakeLists.txt:153 (find_package):
By not providing "FindGnuradio.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Gnuradio",
but CMake did not find one.

Could not find a package configuration file provided by "Gnuradio"
(requested version 3.7.3) with any of the following names:

GnuradioConfig.cmake
gnuradio-config.cmake

Add the installation prefix of "Gnuradio" to CMAKE_PREFIX_PATH or set
"Gnuradio_DIR" to a directory contaning one of the above files. If
"Gnuradio" provides a separate development package or SDK, be sure it has
been installed.

编辑:所以我找到了一个叫做 FindGnuradioRuntime.cmake 的东西,但我仍然不确定如何处理它。错误消息让我认为它正在寻找名为 "FindGnuradio.cmake" 的东西,而实际上它被称为 "FindGnuradioRuntime.cmake"

运行 全新 Ubuntu 安装的命令:

git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr/
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig
git clone git://git.osmocom.org/gr-osmosdr
cd gr-osmosdr/
mkdir build
cd build/
cmake ../           (here is where I ran into a the problem above)
  1. 安装/构建 GNU Radio。
  2. 删除 CMakeCache.txt
  3. 调用cmake ..时可以传递参数。将路径添加到GnuradioConfig.cmakeFindGnuRadio.cmake的父目录,如

    cmake -DCMAKE_PREFIX_PATH=/gnu/radio/path ..

将我隐藏的回复变成实际答案:

刚刚发现GNURadio网站上提供的安装脚本不仅安装了GNURadio,还安装了RTL SDR要求,所以我擦掉我的VM并重新开始并成功。它需要几个小时,但它是完整且自动化的,因此绝对是安装 GNURadio 的最佳方式。脚本在这里 http://www.sbrac.org/files/build-gnuradio

如之前的回答所述,您没有描述您 运行 遇到此问题的位置。我假设它发生在创建树外 (OOT) 模块时。

OOT Module Page 上,请参阅“注释”部分。他们注意到您需要安装 gr-dev。该软件包将安装 GnuradioConfig.cmake。您可以在标准的 yum 存储库中找到它,并使用 sudo yum install gnuradio-devel.

安装它