[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] GnuradioConfig.cmake on master
From: |
Sean Nowlan |
Subject: |
Re: [Discuss-gnuradio] GnuradioConfig.cmake on master |
Date: |
Thu, 9 May 2013 11:56:44 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 |
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
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?
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."
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...