discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to find and link OOT module with gnuradio 3.8?


From: Ron Economos
Subject: Re: How to find and link OOT module with gnuradio 3.8?
Date: Tue, 30 Jun 2020 07:28:36 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

I filed an issue on this over a year ago. I'm not sure if it was ever fully resolved.

https://github.com/gnuradio/gnuradio/issues/2429

Ron

On 6/30/20 07:00, EJ Kreinar wrote:
Hi gnuradio and usrp-users,

I'm trying to update rfnoc OOT modules for gnuradio 3.8 (gasp).

But I'm having trouble finding and linking to gr-ettus specifically, and I wonder how we're supposed to call find_package(<OOT>) and then link to OOT modules in general with the updated cmake workflow... Trying to find and link gr-ettus, I've tried a few things...

1) find_package(ettus)

I believe this worked against gnuradio-3.7. Now, I get the following error during cmake configure...

```
--   No package 'ettus' found
CMake Error at /usr/local/lib/cmake/ettus/ettusConfig.cmake:41 (include):
  include could not find load file:
    /usr/local/lib/cmake/ettus/ettusTarget.cmake
```

2) find_package(gnuradio-ettus)

This seems more promising, since GR_LIBRARY_FOO seems to install gnuradio-ettus cmake files into the lib/cmake/ettus install location. This fails in cmake configure with the following error:

```
CMake Error at gr-theseus/CMakeLists.txt:84 (find_package):
  By not providing "Findgnuradio-ettus.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "gnuradio-ettus", but CMake did not find one.

  Could not find a package configuration file provided by "gnuradio-ettus"
  with any of the following names:

    gnuradio-ettusConfig.cmake
    gnuradio-ettus-config.cmake

  Add the installation prefix of "gnuradio-ettus" to CMAKE_PREFIX_PATH or set   "gnuradio-ettus_DIR" to a directory containing one of the above files.  If   "gnuradio-ettus" provides a separate development package or SDK, be sure it
  has been installed.
```


Interestingly, if I change the GR_CMAKE_DIR *inside gr-ettus* to point to ${CMAKE_MODULES_DIR)/gnuradio-ettus (https://github.com/EttusResearch/gr-ettus/blob/b69260655e974786ea6e611bd91ab578b13ec72a/CMakeLists.txt#L69), then the gnuradio-ettus cmake modules get installed to lib/cmake/gnuradio-ettus. Then, in my OOT module, calling find_package(gnuradio-ettus) finds gr-ettus, and target_link_libraries(<my-library> gnuradio-ettus) links successfully.

So: Is this right? Am I missing something obvious here? Should gnuradio OOT modules set their GR_CMAKE_DIR to gnuradio-<module>?

Thanks for the help!
EJ




reply via email to

[Prev in Thread] Current Thread [Next in Thread]