analogdevicesinc / libad9361-iio

IIO AD9361 library for filter design and handling, multi-chip sync, etc.
http://analogdevicesinc.github.io/libad9361-iio/
GNU Lesser General Public License v2.1
73 stars 48 forks source link

Missing environment variables [LIBIIO_INCLUDEDIR] #108

Closed HIT-zhangrun closed 5 months ago

HIT-zhangrun commented 5 months ago

When I clone the code, mkdir build / cd build / cmake .. an error occurred

Make Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: LIBIIO_INCLUDEDIR CMake Error in CMakeLists.txt: Found relative path while evaluating include directories of "ad9361": "LIBIIO_INCLUDEDIR-NOTFOUND"

I think libad9361 requires libiio dependency, and this operation is not mentioned in the Readme.md. When I added my libiio path "set(LIBIIO_INCLUDEDIR "/home/XX/drivers/libiio/include")" in CMakeLists.txt , this problem is solved

So could you add some additional explanations to the Readme.md?

tfcollins commented 5 months ago

We can add a note to the readme but as long as libiio is on your path it will find it. Otherwise you'll need to explicitly tell cmake where it is like any other dependency. This is typically done through variable definitions when invoking cmake's CLI.

HIT-zhangrun commented 5 months ago

Got it, thank you for your reply! And another problem, I found that some function interfaces of the main branch of libiio have been reconstructed, causing lib9361iio to fail to compile successfully. The required special branch of the libiio library should be noted.