Merge topic 'BLAS-no-target-in-libs'

7d756f37cc FindBLAS: do not write an imported target name into BLAS_LIBRARIES
946846aaf5 FindPkgConfig: do not unset unused variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2006
This commit is contained in:
Brad King
2018-04-25 12:58:34 +00:00
committed by Kitware Robot
2 changed files with 5 additions and 2 deletions
+5 -1
View File
@@ -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)
-1
View File
@@ -222,7 +222,6 @@ function(_pkg_create_imp_target _prefix _no_cmake_path _no_cmake_environment_pat
AND ( ${_prefix}_INCLUDE_DIRS OR _libs OR ${_prefix}_CFLAGS_OTHER ))
add_library(PkgConfig::${_prefix} INTERFACE IMPORTED)
unset(_props)
if(${_prefix}_INCLUDE_DIRS)
set_property(TARGET PkgConfig::${_prefix} PROPERTY
INTERFACE_INCLUDE_DIRECTORIES "${${_prefix}_INCLUDE_DIRS}")