summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-04-27 10:38:49 +0100
committerPatrick Steinhardt <ps@pks.im>2018-05-09 13:50:42 +0200
commit0f62e4c7393366acd8ab0887c069d9929c358d07 (patch)
tree3d39a197b259bc27cbc48856cd9cf4022f74d6ac /examples
parent86353a7260404e501153fe1781fbd194a5925f1a (diff)
downloadlibgit2-0f62e4c7393366acd8ab0887c069d9929c358d07.tar.gz
cmake: resolve libraries found by pkg-config
Libraries found by CMake modules are usually handled with their full path. This makes linking against those libraries a lot more robust when it comes to libraries in non-standard locations, as otherwise we might mix up libraries from different locations when link directories are given. One excemption are libraries found by PKG_CHECK_MODULES. Instead of returning libraries with their complete path, it will return the variable names as well as a set of link directories. In case where multiple sets of the same library are installed in different locations, this can lead the compiler to link against the wrong libraries in the end, when link directories of other dependencies are added. To fix this shortcoming, we need to manually resolve library paths returned by CMake against their respective library directories. This is an easy task to do with `FIND_LIBRARY`.
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions