Add BLAS::BLAS AND LAPACK::LAPACK imported targets

This commit is contained in:
Carles Fernandez 2020-06-13 13:43:00 +02:00
parent ee84f60fb4
commit d40c225ade
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 16 additions and 5 deletions

View File

@ -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()
################################################################################

View File

@ -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