https://bugs.gentoo.org/831322 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,17 +1,29 @@ add_executable(FilterDesignerTest filter_designer_test.c) -target_link_libraries(FilterDesignerTest LINK_PRIVATE ${LIBIIO_LIBRARIES} ad9361) +if(WIN32) + target_link_libraries(FilterDesignerTest LINK_PRIVATE ${LIBIIO_LIBRARIES} ad9361) +else() + target_link_libraries(FilterDesignerTest LINK_PRIVATE ${LIBIIO_LIBRARIES} ad9361 m) +endif() add_test(NAME FilterDesignerTest COMMAND FilterDesignerTest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) add_executable(GenerateRatesTest gen_rates_test.c) -target_link_libraries(GenerateRatesTest LINK_PRIVATE ${LIBIIO_LIBRARIES} ad9361) +if(WIN32) + target_link_libraries(GenerateRatesTest LINK_PRIVATE ${LIBIIO_LIBRARIES} ad9361) +else() + target_link_libraries(GenerateRatesTest LINK_PRIVATE ${LIBIIO_LIBRARIES} ad9361 m) +endif() add_test(NAME GenerateRatesTest COMMAND GenerateRatesTest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) add_executable(FilterDesignerHardwareTest filter_designer_hw.c) -target_link_libraries(FilterDesignerHardwareTest LINK_PRIVATE ${LIBIIO_LIBRARIES} ad9361) +if(WIN32) + target_link_libraries(FilterDesignerHardwareTest LINK_PRIVATE ${LIBIIO_LIBRARIES} ad9361) +else() + target_link_libraries(FilterDesignerHardwareTest LINK_PRIVATE ${LIBIIO_LIBRARIES} ad9361 m) +endif() add_test(NAME FilterDesignerHardwareTest COMMAND FilterDesignerHardwareTest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) @@ -27,7 +39,11 @@ add_test(NAME FMComms5SyncTest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) add_executable(AutoRateTest auto_rate_test_hw.c) -target_link_libraries(AutoRateTest LINK_PRIVATE ${LIBIIO_LIBRARIES} ad9361) +if(WIN32) + target_link_libraries(AutoRateTest LINK_PRIVATE ${LIBIIO_LIBRARIES} ad9361) +else() + target_link_libraries(AutoRateTest LINK_PRIVATE ${LIBIIO_LIBRARIES} ad9361 m) +endif() add_test(NAME AutoRateTest COMMAND AutoRateTest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})