[prev in list] [next in list] [prev in thread] [next in thread] 

List:       usrp-users
Subject:    Re: [USRP-users] [Discuss-gnuradio] Include an OOT module in another OOT module?
From:       "Nowlan, Sean via USRP-users" <usrp-users () lists ! ettus ! com>
Date:       2015-06-29 15:30:17
Message-ID: 1435591817203.5841 () gtri ! gatech ! edu
[Download RAW message or body]

Thanks, Doug. It's now working even without me including $PREFIX/lib/cmake/<module>. \
According to [1], find_package *should* be looking for config files in \
$PREFIX/lib/cmake/<module> by default.


Referring back to my example, I suspect I may have broken something by making my own \
custom FindGrFirst.cmake file in gr-second/cmake/Modules. Then I mimicked gr-iqbal's \
approach to creating a PkgConfig entry. Once I scrubbed these two approaches and just \
relied on gr_modtool's default firstConfig.cmake export, all I needed was \
"find_package(first)" to get it to work.


Sean


[1] http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command%3afind_package


________________________________
From: Douglas Geiger <doug.geiger@bioradiation.net>
Sent: Monday, June 29, 2015 10:43 AM
To: Nowlan, Sean
Subject: Re: [Discuss-gnuradio] Include an OOT module in another OOT module?

Sean,
 Not sure if this was *actually* the cause (or related to the fix) of your problem, \
but I'll note that the standard install location for <module>Config.cmake (i.e. \
$PREFIX/lib/cmake/<module>) may not be in your CMAKE_MODULE_PATH. More importantly, \
cmake's default set of search paths for cmake modules may vary with which version of \
cmake you're using, and how it was packaged by e.g. your distribution.  Depending on \
external Find<blah>.cmake or <blah>Config.cmake being installed in the search path \
(when they are not part of cmake's default set of installed things) is a little \
tricky, and it's usually a good idea to do some checking in your CMakeLists.txt to \
make sure it's available.

 Doug

On Sat, Jun 27, 2015 at 6:52 PM, Nowlan, Sean \
<Sean.Nowlan@gtri.gatech.edu<mailto:Sean.Nowlan@gtri.gatech.edu>> wrote:

?Strange. It is now working for me, and I don't know what I did to break or fix it.


Sean


________________________________
From: discuss-gnuradio-bounces+sean.nowlan=gtri.gatech.edu@gnu.org<mailto:gtri.gatech.edu@gnu.org> \
<discuss-gnuradio-bounces+sean.nowlan=gtri.gatech.edu@gnu.org<mailto:gtri.gatech.edu@gnu.org>> \
on behalf of Nowlan, Sean \
                <Sean.Nowlan@gtri.gatech.edu<mailto:Sean.Nowlan@gtri.gatech.edu>>
Sent: Saturday, June 27, 2015 6:27 PM
To: discuss-gnuradio@gnu.org<mailto:discuss-gnuradio@gnu.org>
Subject: [Discuss-gnuradio] Include an OOT module in another OOT module?


Let's say I've made two OOT projects called gr-first and gr-second. I want to link \
gr-second against gr-first, but CMake isn't finding it.


gr-first/CMakeLists.txt seems to install a helper file: \
$PREFIX/lib/cmake/first/firstConfig.cmake


In gr-second/CMakeLists.txt, I add a line:


find_package(first)


But this does not work. I also tried


include(firstConfig)

find_package(first)


I guess I can hack something together using an example like gr-osmosdr, which depends \
on gr-iqbalance. Although if possible, I'd like to use the default helper file and \
get that working, since that's the whole point of having a helper file. Any hints?


Thanks,

Sean

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org<mailto:Discuss-gnuradio@gnu.org>
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio




--
Doug Geiger
doug.geiger@bioradiation.net<mailto:doug.geiger@bioradiation.net>


[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: \
0px; }--></style> </head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
 <p>Thanks, Doug. It's now working even without me including \
$PREFIX/lib/cmake/&lt;module&gt;.&nbsp;<span style="font-size: 12pt;">According to \
[1], find_package *should* be looking for config files \
in&nbsp;$PREFIX/lib/cmake/&lt;module&gt; by default.</span></p> <p><span \
style="font-size: 12pt;"><br> </span></p>
<p><span style="font-size: 12pt;">Referring back to my&nbsp;example,&nbsp;I suspect I \
may have broken something by making my own custom&nbsp;FindGrFirst.cmake file in \
gr-second/cmake/Modules. Then I mimicked gr-iqbal's approach to creating a PkgConfig \
entry. Once I scrubbed  these two approaches and just relied on gr_modtool's default \
firstConfig.cmake export, all I needed was&nbsp;&quot;find_package(first)&quot; to \
get it to work.</span></p> <p><br>
</p>
<p>Sean<br>
</p>
<p><br>
</p>
<p>[1]&nbsp;<a href="http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command%3afind_ \
package">http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command%3afind_package</a><br>
 </p>
<p><br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" \
style="font-size:11pt"><b>From:</b> Douglas Geiger \
&lt;doug.geiger@bioradiation.net&gt;<br> <b>Sent:</b> Monday, June 29, 2015 10:43 \
AM<br> <b>To:</b> Nowlan, Sean<br>
<b>Subject:</b> Re: [Discuss-gnuradio] Include an OOT module in another OOT \
module?</font> <div>&nbsp;</div>
</div>
<div>
<div dir="ltr">Sean,
<div>&nbsp;Not sure if this was *actually* the cause (or related to the fix) of your \
problem, but I'll note that the standard install location for \
&lt;module&gt;Config.cmake (i.e. $PREFIX/lib/cmake/&lt;module&gt;) may not be in your \
CMAKE_MODULE_PATH. More importantly, cmake's  default set of search paths for cmake \
modules may vary with which version of cmake you're using, and how it was packaged by \
e.g. your distribution.</div> <div>&nbsp;Depending on external Find&lt;blah&gt;.cmake \
or &lt;blah&gt;Config.cmake being installed in the search path (when they are not \
part of cmake's default set of installed things) is a little tricky, and it's usually \
a good idea to do some checking in your CMakeLists.txt  to make sure it's \
available.</div> <div><br>
</div>
<div>&nbsp;Doug</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sat, Jun 27, 2015 at 6:52 PM, Nowlan, Sean <span \
dir="ltr"> &lt;<a href="mailto:Sean.Nowlan@gtri.gatech.edu" \
target="_blank">Sean.Nowlan@gtri.gatech.edu</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; \
padding-left:1ex"> <div dir="ltr" style="font-size:12pt; color:#000000; \
background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif"> \
<p>&#8203;Strange. It is now working for me, and I don't know what I did to break or \
fix it.<br> </p>
<p><br>
</p>
<p>Sean<br>
</p>
<p><br>
</p>
<div dir="ltr" style="font-size:12pt; color:#000000; background-color:#ffffff; \
font-family:Calibri,Arial,Helvetica,sans-serif"> <hr style="display:inline-block; \
width:98%"> <div dir="ltr"><font face="Calibri, sans-serif" color="#000000" \
style="font-size:11pt"><b>From:</b> discuss-gnuradio-bounces&#43;sean.nowlan=<a \
href="mailto:gtri.gatech.edu@gnu.org" target="_blank">gtri.gatech.edu@gnu.org</a> \
&lt;discuss-gnuradio-bounces&#43;sean.nowlan=<a href="mailto:gtri.gatech.edu@gnu.org" \
target="_blank">gtri.gatech.edu@gnu.org</a>&gt;  on behalf of Nowlan, Sean &lt;<a \
href="mailto:Sean.Nowlan@gtri.gatech.edu" \
target="_blank">Sean.Nowlan@gtri.gatech.edu</a>&gt;<br> <b>Sent:</b> Saturday, June \
27, 2015 6:27 PM<br> <b>To:</b> <a href="mailto:discuss-gnuradio@gnu.org" \
target="_blank">discuss-gnuradio@gnu.org</a><br> <b>Subject:</b> [Discuss-gnuradio] \
Include an OOT module in another OOT module?</font> <div>&nbsp;</div>
</div>
<div>
<div class="h5">
<div>
<p>Let's say I've made two OOT projects called gr-first and gr-second. I want to link \
gr-second against gr-first, but CMake isn't finding it.<br> </p>
<p><br>
</p>
<p>gr-first/CMakeLists.txt seems to install a helper file: \
$PREFIX/lib/cmake/first/firstConfig.cmake<br> </p>
<p><br>
</p>
<p>In gr-second/CMakeLists.txt, I add a line:<br>
</p>
<p><br>
</p>
<p>find_package(first)<br>
</p>
<p><br>
</p>
<p>But this does not work. I also tried<br>
</p>
<p><br>
</p>
<p>include(firstConfig)<br>
</p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; \
font-size:16.3636360168457px; \
background-color:rgb(255,255,255)">find_package(first)</span><br> </p>
<p><br>
</p>
<p>I guess I can hack something together using an example like gr-osmosdr, which \
depends on&nbsp;gr-iqbalance. Although if possible, I'd like to use the \
default&nbsp;helper file and get that working, since that's the whole&nbsp;point of \
having a helper file. Any hints?<br> </p>
<p><br>
</p>
<p>Thanks,<br>
</p>
<p>Sean<br>
</p>
</div>
</div>
</div>
</div>
</div>
<br>
_______________________________________________<br>
Discuss-gnuradio mailing list<br>
<a href="mailto:Discuss-gnuradio@gnu.org">Discuss-gnuradio@gnu.org</a><br>
<a href="https://lists.gnu.org/mailman/listinfo/discuss-gnuradio" rel="noreferrer" \
target="_blank">https://lists.gnu.org/mailman/listinfo/discuss-gnuradio</a><br> <br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">Doug Geiger<br>
<a href="mailto:doug.geiger@bioradiation.net" \
target="_blank">doug.geiger@bioradiation.net</a></div> </div>
</div>
</div>
</body>
</html>



_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

--===============5883872624631416639==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic