diff --git a/CMakeLists.txt b/CMakeLists.txt index dd040f4b1..256c6276f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1512,8 +1512,13 @@ if(NOT BLAS_FOUND) endif() message(FATAL_ERROR "BLAS is required to build gnss-sdr") endif() - - +if(NOT TARGET BLAS::BLAS) + add_library(BLAS::BLAS SHARED IMPORTED) + set_target_properties(BLAS::BLAS PROPERTIES + IMPORTED_LOCATION ${BLAS_LIBRARIES} + INTERFACE_LINK_LIBRARIES ${BLAS_LIBRARIES} + ) +endif() ################################################################################ # Check that LAPACK (Linear Algebra PACKage) is found in the system @@ -1540,7 +1545,13 @@ if(NOT LAPACK_FOUND) endif() message(FATAL_ERROR "LAPACK is required to build gnss-sdr") endif() - +if(NOT TARGET LAPACK::LAPACK) + add_library(LAPACK::LAPACK SHARED IMPORTED) + set_target_properties(BLAS::BLAS PROPERTIES + IMPORTED_LOCATION ${LAPACK_LIBRARIES} + INTERFACE_LINK_LIBRARIES ${LAPACK_LIBRARIES} + ) +endif() ################################################################################ diff --git a/src/algorithms/libs/rtklib/CMakeLists.txt b/src/algorithms/libs/rtklib/CMakeLists.txt index ed59fe391..f1149c07e 100644 --- a/src/algorithms/libs/rtklib/CMakeLists.txt +++ b/src/algorithms/libs/rtklib/CMakeLists.txt @@ -73,8 +73,8 @@ target_link_libraries(algorithms_libs_rtklib core_system_parameters Gflags::gflags Glog::glog - ${LAPACK_LIBRARIES} - ${BLAS_LIBRARIES} + LAPACK::LAPACK + BLAS::BLAS ) set_property(TARGET algorithms_libs_rtklib