diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2018-05-11 15:17:26 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2018-05-11 17:35:53 (GMT) |
commit | 92ac721a44bcae43ed9ad33d4d0fb22968073a92 (patch) | |
tree | 67ed61634abc00ea8d403f39a5964bdd1defdaa9 /Tests | |
parent | c9e995c9efdaa462ac2649f1c1ff4e511db7fcf5 (diff) | |
download | CMake-92ac721a44bcae43ed9ad33d4d0fb22968073a92.zip CMake-92ac721a44bcae43ed9ad33d4d0fb22968073a92.tar.gz CMake-92ac721a44bcae43ed9ad33d4d0fb22968073a92.tar.bz2 |
FindPkgConfig: export the list of found libraries also as variable
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() |