|
From: | Morman, Joshua |
Subject: | Re: [EXTERNAL] Re: Using function from OOT in another OOT |
Date: | Tue, 5 Nov 2019 21:00:03 +0000 |
Michael,
Thank you for the response. Here is what I ended up doing:
If I have gr-myoot that I want to reference from gr-anotheroot
In gr-anotheroot/cmake/modules, create FindMyoot.cmake, which should look something like:
######################################################## find_package(PkgConfig)
pkg_check_modules(PC_GNURADIO_RUNTIME gnuradio-runtime) find_path(MYOOT_INCLUDE_DIR myoot/one_of_the_header_files.h HINTS ${PC_GNURADIO_RUNTIME_INCLUDEDIR} ${PC_GNURADIO_RUNTIME_INCLUDE_DIRS} PATH_SUFFIXES myoot ) find_library(MYOOT_LIBRARY NAMES gnuradio-myoot HINTS ${PC_GNURADIO_RUNTIME_LIBDIR} ${PC_GNURADIO_RUNTIME_LIBRARY_DIRS} ) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set MYOOT_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(Myoot DEFAULT_MSG MYOOT_LIBRARY MYOOT_INCLUDE_DIR) mark_as_advanced(MYOOT_INCLUDE_DIR MYOOT_LIBRARY ) set(MYOOT_LIBRARIES ${MYOOT_LIBRARY} ) set(MYOOT_INCLUDE_DIRS ${MYOOT_INCLUDE_DIR} ) ######################################################## I'm sure there are better ways to do this, but this did the trick quick and dirty. It looks like some other oots have .pc files installed which help with the process, but that doesn't look to be standard.
Josh From: Michael Dickens <address@hidden>
Sent: Tuesday, November 5, 2019 2:14 PM To: Morman, Joshua Cc: address@hidden Subject: [EXTERNAL] Re: Using function from OOT in another OOT Hi Josh - I don't think there's a standard way to do this. -Most- OOTs install cmake scripts that can be used to "find" them, if you can determine the correct "find" name (might be "gr-OOT" or just "OOT", where 'OOT' is the name of the OOT module).
Once found, you can then use either the target or returned variables (OOT_INCLUDE_DIRS, OOT_LIBRARIES most likely) to find the API and link against the ABI. Nothing special, but generic enough that it should work on different OSs & GR installs. Hope this is
useful! - MLD
On Tue, Nov 5, 2019 at 1:42 PM Morman, Joshua <address@hidden> wrote:
Michael Dickens
Ettus Research Technical Support Email: address@hidden Web: https://ettus.com/ [ettus.com] |
[Prev in Thread] | Current Thread | [Next in Thread] |