diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 077de56b..19e4e99a 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -96,10 +96,10 @@ jobs: run: wget https://www.sdrplay.com/software/SDRplay_RSP_API-MacOSX-3.07.3.pkg && sudo installer -pkg SDRplay_RSP_API-MacOSX-3.07.3.pkg -target / - name: Install libiio - run: git clone https://github.com/analogdevicesinc/libiio && cd libiio && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DOSX_PACKAGE=OFF -DCMAKE_INSTALL_PREFIX=/usr/local .. && make -j3 && sudo make install && cd ../../ + run: git clone https://github.com/analogdevicesinc/libiio && cd libiio && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make -j3 && sudo make install && cd ../../ - name: Install libad9361 - run: git clone https://github.com/analogdevicesinc/libad9361-iio && cd libad9361-iio && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DOSX_PACKAGE=OFF -DCMAKE_INSTALL_PREFIX=/usr/local .. && make -j3 && sudo make install && cd ../../ + run: git clone https://github.com/analogdevicesinc/libad9361-iio && cd libad9361-iio && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make -j3 && sudo make install && cd ../../ - name: Prepare CMake working-directory: ${{runner.workspace}}/build diff --git a/source_modules/plutosdr_source/CMakeLists.txt b/source_modules/plutosdr_source/CMakeLists.txt index 14f4afd2..1b9ef841 100644 --- a/source_modules/plutosdr_source/CMakeLists.txt +++ b/source_modules/plutosdr_source/CMakeLists.txt @@ -25,18 +25,28 @@ if (MSVC) target_link_libraries(plutosdr_source PRIVATE libiio) target_link_libraries(plutosdr_source PRIVATE libad9361) else (MSVC) - find_package(PkgConfig) + if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + target_include_directories(plutosdr_source PRIVATE "/Library/Frameworks/iio.framework/Headers") + target_link_libraries(plutosdr_source PRIVATE "/Library/Frameworks/iio.framework/iio") - pkg_check_modules(LIBIIO REQUIRED libiio) - pkg_check_modules(LIBAD9361 REQUIRED libad9361) + target_include_directories(plutosdr_source PRIVATE "/Library/Frameworks/ad9361.framework/Headers") + target_link_libraries(plutosdr_source PRIVATE "/Library/Frameworks/ad9361.framework/ad9361") + else() + find_package(PkgConfig) - target_include_directories(plutosdr_source PRIVATE ${LIBIIO_INCLUDE_DIRS}) - target_link_directories(plutosdr_source PRIVATE ${LIBIIO_LIBRARY_DIRS}) - target_link_libraries(plutosdr_source PRIVATE ${LIBIIO_LIBRARIES}) + pkg_check_modules(LIBIIO REQUIRED libiio) + pkg_check_modules(LIBAD9361 REQUIRED libad9361) + + target_include_directories(plutosdr_source PRIVATE ${LIBIIO_INCLUDE_DIRS}) + target_link_directories(plutosdr_source PRIVATE ${LIBIIO_LIBRARY_DIRS}) + target_link_libraries(plutosdr_source PRIVATE ${LIBIIO_LIBRARIES}) + + target_include_directories(plutosdr_source PRIVATE ${LIBAD9361_INCLUDE_DIRS}) + target_link_directories(plutosdr_source PRIVATE ${LIBAD9361_LIBRARY_DIRS}) + target_link_libraries(plutosdr_source PRIVATE ${LIBAD9361_LIBRARIES}) + endif() target_include_directories(plutosdr_source PRIVATE ${LIBAD9361_INCLUDE_DIRS}) - target_link_directories(plutosdr_source PRIVATE ${LIBAD9361_LIBRARY_DIRS}) - target_link_libraries(plutosdr_source PRIVATE ${LIBAD9361_LIBRARIES}) endif () # Install directives