[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] How to link OOT module in CMakeLists.txt
From: |
CEL |
Subject: |
Re: [Discuss-gnuradio] How to link OOT module in CMakeLists.txt |
Date: |
Mon, 5 Mar 2018 12:17:09 +0000 |
Hi Ruiy,
typically, you'd install things to a default *prefix* directory, in
your case /usr/local/.
Then you'd tell CMake that this is your prefix (-DCMAKE_INSTALL_PREFIX,
for example), and then use the name instead of the full path.
Best regards,
Marcus
On Sun, 2018-03-04 at 22:42 +0800, ruiy wrote:
> Now I create a OOT module named slave_demo, and I have installed it.
> And I can find the dynamic lib in /usr/local/lib/libgnuradio-slave-
> demo.so.
>
> So I link it in my CMakeLists.txt by writing like this:
> target_link_libraries(target ... /usr/local/lib/libgnuradio-slave-
> demo.so ...).
>
> I suppose that writing the path directly is a bad coding style. I
> want to know whether gnuradio provides some variables equals to the
> path when I install my created OOT module in my PC. I will appreciate
> it If anyone know something.
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio