diff options
author | Brad King <brad.king@kitware.com> | 2018-05-14 13:46:02 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-05-14 13:46:31 (GMT) |
commit | 99e658258e13f444ed935d0240c6a1be1d76d306 (patch) | |
tree | d4d951395b7a6a36ff55c290ffaeb58a5baf898b /Tests | |
parent | 5a227ce805f06bf8a31cc3a47169bcf1f33bda1b (diff) | |
parent | 92ac721a44bcae43ed9ad33d4d0fb22968073a92 (diff) | |
download | CMake-99e658258e13f444ed935d0240c6a1be1d76d306.zip CMake-99e658258e13f444ed935d0240c6a1be1d76d306.tar.gz CMake-99e658258e13f444ed935d0240c6a1be1d76d306.tar.bz2 |
Merge topic 'FindPkgConfig-LINK_LIBRARIES'
92ac721a44 FindPkgConfig: export the list of found libraries also as variable
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2068
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake index 606b1df..1150568 100644 --- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake +++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake @@ -85,3 +85,15 @@ pkg_check_modules(FakePackage2 REQUIRED QUIET IMPORTED_TARGET cmakeinternalfakep if (NOT TARGET PkgConfig::FakePackage2) message(FATAL_ERROR "No import target for fake package 2 with prefix path") endif() + +# check that the full library path is also returned +if (NOT FakePackage2_LINK_LIBRARIES STREQUAL "${fakePkgDir}/lib/libcmakeinternalfakepackage2.a") + message(FATAL_ERROR "FakePackage2_LINK_LIBRARIES has bad content on first run: ${FakePackage2_LINK_LIBRARIES}") +endif() + +# the information in *_LINK_LIBRARIES is not cached, so ensure is also is present on second run +unset(FakePackage2_LINK_LIBRARIES) +pkg_check_modules(FakePackage2 REQUIRED QUIET IMPORTED_TARGET cmakeinternalfakepackage2) +if (NOT FakePackage2_LINK_LIBRARIES STREQUAL "${fakePkgDir}/lib/libcmakeinternalfakepackage2.a") + message(FATAL_ERROR "FakePackage2_LINK_LIBRARIES has bad content on second run: ${FakePackage2_LINK_LIBRARIES}") +endif() |