Maybe I'm just confused, then. You weren't clear about the problem you're
experiencing, or what you've tried to resolve it. It sounded in your
initial email like you just don't know how to build a CMake project (using
"g++", for instance, is not how that works). Further leading me to think
this was that you apparently are doing this compilation in-tree, in
gr-qtgui/examples, which isn't a good place for user projects.

The CMakeLists.txt you attached appears to be designed for in-tree
compilation. This means your project would always have to be compiled along
with your own custom branch of Gnuradio, which I'm almost positive is not
what you actually want to do. The out-of-tree module template includes all
of the CMake commands necessary to compile and link your own project
outside the Gnuradio source tree. It should serve as a much better starting
point for your project than the CMakeLists.txt that you attached, which
lacks the necessary find_package calls to properly find and link to
Gnuradio (and any other libraries you might use). You'll want to take a
look at the toplevel CMakeLists.txt in the out-of-tree template as well as
the one in lib/, which you'll want to modify to produce an executable
instead of a library for your project.

You could also look at the CMake files from other standalone Gnuradio
applications for inspiration, such as gqrx.

Nick

On Tue, Oct 8, 2019 at 12:55 PM Moses Browne Mwakyanjala <[email protected]>
wrote:

> Hello Nick,
> As I have mentioned in my previous email, I know how to use CMake as I
> have already made a lot of OOTs before. Please understand that I'm not
> trying to build an OOT. In the program, a top_block_sptr object (think of
> it as a C++ based flowgraph) object is initialized with signal generators
> and qt graphics. The Qt event loop initializes the flowgraph (an object
> called 'mywindow'), makes signal/slot connections and runs it. You can also
> have a look at the CMakeList.txt file I attached. It doesn't look like the
> traditional OOT makefiles.
>
> Regards,
>
> Moses.
>
>
> On Tue, Oct 8, 2019 at 9:21 PM Nick Foster <[email protected]> wrote:
>
>> Within the "out of tree module" link I sent is basic information on how
>> to compile an application using CMake.
>>
>> https://wiki.gnuradio.org/index.php/OutOfTreeModules#Using_CMake
>>
>>
>> On Tue, Oct 8, 2019 at 12:05 PM Moses Browne Mwakyanjala <
>> [email protected]> wrote:
>>
>>> Hello Nick,
>>> Thanks for your email.
>>> I have created the OOTs already. What I'm trying to do it to integrate
>>> my OOTs in a QT C++ application (something akin to Gqrx).
>>> You could see what I'm trying to do from the example source code I
>>> attached.
>>>
>>> Regards,
>>> Moses.
>>>
>>> On Tue, Oct 8, 2019 at 8:56 PM Nick Foster <[email protected]> wrote:
>>>
>>>> I think you should read up on creating out-of-tree GNURadio modules:
>>>>
>>>> https://wiki.gnuradio.org/index.php/OutOfTreeModules
>>>>
>>>> Nick
>>>>
>>>> On Tue, Oct 8, 2019 at 11:44 AM Moses Browne Mwakyanjala <
>>>> [email protected]> wrote:
>>>>
>>>>> Hello all,
>>>>> I'm trying to implement an easy-to-use QT-based receiver in GNU Radio.
>>>>> As a starting point, I would like to compile a C++ example (attached) 
>>>>> under
>>>>> /gnuradio/gr-qtgui/examples/c++ . This example program generates a noisy
>>>>> sine wave and displays on some qt gui qwidgets. I was able to compile and
>>>>> run the program a couple of years ago. Unfortunately, I can't remember 
>>>>> what
>>>>> I did as the whole process was trial and error. I have tried both "make"
>>>>> and "g++" without any luck. Please don't hesitate to ask for
>>>>> more information.
>>>>> All help is highly appreciated.
>>>>> Best regards,
>>>>> Moses.
>>>>> _______________________________________________
>>>>> Discuss-gnuradio mailing list
>>>>> [email protected]
>>>>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>>>>
>>>>
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to