discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] GnuradioConfig.cmake on master


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] GnuradioConfig.cmake on master
Date: Thu, 9 May 2013 12:28:03 -0400

On Thu, May 9, 2013 at 11:56 AM, Sean Nowlan
<address@hidden> wrote:
> On 05/09/2013 09:48 AM, Tom Rondeau wrote:
>>
>> Good catch, Sean, and thanks for the patch as well! Seems I can't make any
>> changes without messing up between the master/next changes these days... I'm
>> making sure all of the components are searching for the right headers in
>> master and next.
>
>
> Actually, I'm having trouble with the CORE component. Perhaps it's
> conflicting with the FindGnuradioCore.cmake module.
>
> This works:
> find_package(GnuradioCore)
> set(GR_REQUIRED_COMPONENTS ANALOG DIGITAL BLOCKS FFT FILTER)
> find_package(Gnuradio)
>
> This doesn't:
> set(GR_REQUIRED_COMPONENTS CORE DIGITAL BLOCKS FFT FILTER)
> find_package(Gnuradio)
>
> "cmake ../" succeeds and finds both libgnuradio-core.so and includes in
> /usr/local/include/gnuradio. However, when I run "make," I get:
> fatal error: gr_io_signature.h: No such file or directory

Try it from a clean build directory. I just did and it worked fine.
gr_io_signature.h is in $prefix/include/gnuradio, so if that's in your
include directories like you mentioned above, there should be no
reason for it not to find it.

> Somehow the include statements aren't getting set correctly. I suppose I
> need to keep find_package(GnuradioCore). If so, what's the purpose of
> setting CORE (or RUNTIME) in GR_REQUIRED_COMPONENTS?

You should not need to use find_package(GnuradioCore) (or
GnuradioRuntime) if you are using the GnuradioConfig script. They are
duplications; the latter, if used, should replace any need for the
former in your cmake files.

Try it again. Like I said, I just tried it, and it worked fine for me.

>> See the bottom of the main page in the Doxygen manual (you'll have to
>> build it yourself). It explains it a bit more. Since GnuradioConfig.cmake is
>> installed by GNU Radio, there's no need to put it into modtool; you just
>> have to use it in modtool if you want it's functionality. Right now, by
>> default, projects built with modtool only look for libgnuradio-runtime, just
>> to make sure it's there. If you need the more complicated functionality the
>> GnuradioConfig provides, you can easily add that line to the CmakeLists file
>> yourself to search for the necessary components as well as the API
>> compatible version you need for your OOT project. So it doesn't really need
>> to be part of modtool. Thanks! Tom
>
>
> Ok. Although, I don't think placing a couple of commented-out lines in
> CMakeLists.txt would hurt, with a comment like, "to use GR components,
> uncomment the following and set GR_REQUIRED_COMPONENTS to libraries you want
> to link."

Sure, adding a comment is certainly appropriate here.

> Finally, it looks like it's not necessary to set "include_directories" to
> ${GNURADIO_ALL_INCLUDE_DIRS} and "link_directories" to
> ${GNURADIO_ALL_LIBRARIES}. Cmake is a colossal mystery to me...

Eh, probably not. But they could be easy convenience variables to use.
And it doesn't hurt anything being there, even if unused.

Tom



reply via email to

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