summaryrefslogtreecommitdiff
path: root/Modules/FindBLAS.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindBLAS.cmake')
-rw-r--r--Modules/FindBLAS.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 8e8c6f4f2..5223b1d0b 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -90,7 +90,11 @@ if(BLA_PREFER_PKGCONFIG)
find_package(PkgConfig)
pkg_check_modules(PKGC_BLAS IMPORTED_TARGET blas)
if(PKGC_BLAS_FOUND)
- set(BLAS_LIBRARIES PkgConfig::PKGC_BLAS)
+ # FIXME: We should not interpret the INTERFACE_LINK_LIBRARIES property
+ # because it could have generator expressions and such. This is a
+ # workaround for pkg_check_modules not providing a first-class way to
+ # get the list of libraries.
+ get_property(BLAS_LIBRARIES TARGET PkgConfig::PKGC_BLAS PROPERTY INTERFACE_LINK_LIBRARIES)
find_package_handle_standard_args(BLAS
REQUIRED_VARS BLAS_LIBRARIES
VERSION_VAR PKGC_BLAS_VERSION)