Commit 1936bc06 authored by wan-sdr's avatar wan-sdr

Use UHD_INCLUDE_DIRS and UHD_LIBRARIES to link to UHD. This way works when UHD...

Use UHD_INCLUDE_DIRS and UHD_LIBRARIES to link to UHD. This way works when UHD is installed to /usr/local or a custom prefix
Signed-off-by: default avatarwan-sdr <11093-wan-sdr@users.noreply.gitlab.eurecom.fr>
parent 464a62dd
#find_package(Boost REQUIRED) #find_package(Boost REQUIRED)
find_package(UHD REQUIRED) find_package(UHD REQUIRED UHD)
add_library(oai_usrpdevif MODULE usrp_lib.cpp) add_library(oai_usrpdevif MODULE usrp_lib.cpp)
#target_include_directories(oai_usrpdevif PRIVATE Boost::boost) #target_include_directories(oai_usrpdevif PRIVATE Boost::boost)
target_link_libraries(oai_usrpdevif PRIVATE uhd) target_link_libraries(oai_usrpdevif PRIVATE ${UHD_LIBRARIES})
target_include_directories(oai_usrpdevif PRIVATE ${UHD_INCLUDE_DIRS})
target_link_libraries(oai_usrpdevif PRIVATE UTIL) target_link_libraries(oai_usrpdevif PRIVATE UTIL)
set_target_properties(oai_usrpdevif PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set_target_properties(oai_usrpdevif PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_custom_command(TARGET oai_usrpdevif POST_BUILD add_custom_command(TARGET oai_usrpdevif POST_BUILD
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment