gr-fosphor: Rewrite the FindGnuradioRuntime to use all libraries in .pc
The .pc has several libraries listed but the current cmake module for it only takes gnuradio-runtime. The new logic takes all libraries in the .pc and only fallsback to only gnuradio-runtime if no .pc is found This seems required for OSX. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
parent
6db631c466
commit
72f71d5f00
|
@ -13,10 +13,15 @@ if(NOT GNURADIO_RUNTIME_FOUND)
|
|||
/usr/include
|
||||
)
|
||||
|
||||
if(NOT PC_GNURADIO_RUNTIME_FOUND)
|
||||
set(PC_GNURADIO_RUNTIME_LIBRARIES gnuradio-runtime)
|
||||
endif(NOT PC_GNURADIO_RUNTIME_FOUND)
|
||||
|
||||
foreach(libname ${PC_GNURADIO_RUNTIME_LIBRARIES})
|
||||
# look for libs
|
||||
FIND_LIBRARY(
|
||||
GNURADIO_RUNTIME_LIBRARIES
|
||||
NAMES gnuradio-runtime
|
||||
GNURADIO_RUNTIME_LIBRARIES_${libname}
|
||||
NAMES ${libname}
|
||||
HINTS $ENV{GNURADIO_RUNTIME_DIR}/lib
|
||||
${PC_GNURADIO_RUNTIME_LIBDIR}
|
||||
${CMAKE_INSTALL_PREFIX}/lib/
|
||||
|
@ -26,6 +31,8 @@ if(NOT GNURADIO_RUNTIME_FOUND)
|
|||
/usr/lib
|
||||
/usr/lib64
|
||||
)
|
||||
list(APPEND GNURADIO_RUNTIME_LIBRARIES ${GNURADIO_RUNTIME_LIBRARIES_${libname}})
|
||||
endforeach(libname)
|
||||
|
||||
if (GNURADIO_RUNTIME_INCLUDE_DIRS AND GNURADIO_RUNTIME_LIBRARIES)
|
||||
set(GNURADIO_RUNTIME_FOUND TRUE CACHE INTERNAL "gnuradio-runtime found")
|
||||
|
|
Loading…
Reference in New Issue