From 09109b903d518882fc9c7fa9cdd5721707d71394 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 26 May 2019 20:23:14 +0200 Subject: [PATCH] Fix libiio detection in macOS --- cmake/Modules/FindLIBIIO.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/Modules/FindLIBIIO.cmake b/cmake/Modules/FindLIBIIO.cmake index 5a9a3806f..ccf9fd133 100644 --- a/cmake/Modules/FindLIBIIO.cmake +++ b/cmake/Modules/FindLIBIIO.cmake @@ -76,6 +76,12 @@ find_library( $ENV{LIBIIO_ROOT}/lib64 ) +if(LIBIIO_LIBRARIES AND APPLE) + if(LIBIIO_LIBRARIES MATCHES "framework") + set(LIBIIO_LIBRARIES ${LIBIIO_LIBRARIES}/iio) + endif() +endif() + include(FindPackageHandleStandardArgs) find_package_handle_standard_args(LIBIIO DEFAULT_MSG LIBIIO_LIBRARIES LIBIIO_INCLUDE_DIRS)