Santos,
this depends on a lot of things. Here's an example:
https://github.com/stwunsch/gr-nacl/blob/d6dd3c02dcda3f601979908b61b1595476f6bf95/CMakeLists.txt#L144-L152
gr-nacl uses libsodium as an external dependency. You can see all the
variables that contain SODIUM; they are in fact generated by this line:
https://github.com/stwunsch/gr-nacl/blob/d6dd3c02dcda3f601979908b61b1595476f6bf95/CMakeLists.txt#L111
...typically, that's a workflow you want. If your dependency doesn't
have a way to be picked up by CMake, you can point to the library files
directly.
-- M
On 03/03/2017 03:05 PM, Santos Campos wrote:
> Hello, all!
>
> I'm trying to include a c++ library for an oot. It builds fine with
> using make, but trying to use it in grc throws an AttributeError.
>
> Someone over on the irc said that I needed to modify the cmakelists.txt
> by locating the library, add the headers to the include search path, and
> add the shared library file to the linking step. Could someone help me
> understand the syntax of what's going on in the cmakelists.txt?
>
> For example I see some lines that sound like what I need, like:
> include_directories(${Boost_INCLUDE_DIR})
> link_directories(${Boost_LIBRARY_DIRS})
> ...
> add_library(gnuradio-"OOT Name" SHARED ${"OOT Name"_sources})
>
> The arguments look like variables for paths, but I don't understand
> how/where they're defined or how I can make my own for the c++ library I
> want to use.
>
> Any help or push in the right direction would be much appreciated!
> -Santos
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
No comments:
Post a Comment