[Discuss-gnuradio] pkg-config cflags for gnuradio-uhd
From:
Alexandru Csete
Subject:
[Discuss-gnuradio] pkg-config cflags for gnuradio-uhd
Date:
Sat, 12 May 2012 13:42:47 +0200
Greetings,
Lets say I am trying to compile a C++ application that uses gnuradio-core and gnuradio-uhd. I have gnuradio installed in /opt/gnuradio/some-version and uhd installed in /opt/uhd/some-version - both of these paths are within pkg-config reach. The problem is if I do:
pkg-config --cflags gnuradio-core gnuradio-uhd
I get: -I/opt/gnuradio/3.6.0/include/gnuradio -I/opt/gnuradio/3.6.0/include
which does not include where the UHD headers are located. Consequently, compilation will fail with:
/opt/gnuradio/3.6.0/include/gnuradio/gr_uhd_api.h:25:26: fatal error: uhd/config.hpp: No such file or directory
In this simple case I could just include uhd as dependency but is it really what I am supposed to do or should gnuradio-uhd pull it in automatically?
Also note that the same happens with --ldflags:
My real problem is that I am trying to build gr-osmosdr from http://cgit.osmocom.org/cgit/gr-osmosdr/ which checks for gnuradio-uhd but not for uhd itself and therefore cmake will not include the UHD paths.