diff --git a/test/phy/CMakeLists.txt b/test/phy/CMakeLists.txt index 943cf44d8..fd5f8e3f5 100644 --- a/test/phy/CMakeLists.txt +++ b/test/phy/CMakeLists.txt @@ -6,18 +6,20 @@ # the distribution. # -add_executable(nr_phy_test nr_phy_test.cc) -target_link_libraries(nr_phy_test - srsue_phy_nr - srsue_phy - srsran_common - srsran_phy - srsran_radio - srsenb_phy - ${CMAKE_THREAD_LIBS_INIT} - ${Boost_LIBRARIES} - ${CMAKE_THREAD_LIBS_INIT} - ${Boost_LIBRARIES} - ${ATOMIC_LIBS}) +if (RF_FOUND AND ENABLE_SRSUE AND ENABLE_SRSENB) + add_executable(nr_phy_test nr_phy_test.cc) + target_link_libraries(nr_phy_test + srsue_phy_nr + srsue_phy + srsran_common + srsran_phy + srsran_radio + srsenb_phy + ${CMAKE_THREAD_LIBS_INIT} + ${Boost_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} + ${Boost_LIBRARIES} + ${ATOMIC_LIBS}) -add_nr_test(nr_phy_test nr_phy_test) \ No newline at end of file + add_nr_test(nr_phy_test nr_phy_test) +endif () \ No newline at end of file