Summary: | Detect telepathy-glib in right directory | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Stef Walter <stefw> |
Component: | tp-qt | Assignee: | Telepathy bugs list <telepathy-bugs> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | drf54321 |
Version: | git master | Keywords: | patch |
Hardware: | Other | ||
OS: | All | ||
URL: | http://cgit.collabora.com/git/user/stefw/telepathy-qt4.git/log/?h=build-fixes | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Ignore telepathy-glib installs in system when using another prefix |
Description
Stef Walter
2011-08-11 05:52:34 UTC
Created attachment 50123 [details] [review] Ignore telepathy-glib installs in system when using another prefix If using another build prefix PKG_CONFIG_PATH is set. This means that pkg-config finds telepathy-glib.pc in the alternate prefix. However if telepathy-glib is also installed, the cmake code then goes and uses find_library/find_path, which by default use system directories. Remove usage of system directories, in the case where the pkg-config file is found. After patch: $ PKG_CONFIG_PATH=/data/build/telepathy/lib64/pkgconfig cmake . <snip> -- checking for module 'telepathy-glib>=0.15.1' -- found telepathy-glib, version 0.15.4.1 -- Found TelepathyGlib: /data/build/telepathy/lib64/libtelepathy-glib.so <snip> Oh and without this build patch I obviously get build failures for telepathy-glib features used in telepathy-qt4 but not in my system telepathy-glib. Afaik, find_path() and find_library() are meant to look first in the paths specified on their call, so they *should* use the pkg-config discovered paths BEFORE looking at the system paths. If this bug is still valid, I suspect there is something fishy about those PC_* variables. It may also have been a cmake bug at the time... In any case, I am not convinced that this patch is the correct approach. We used to call find_library with PATHS option, but it has the lowest priority, this the standard system environment variables processed first. Use HINTS option to ensure the right order of lookup directories. See also: https://cmake.org/cmake/help/latest/command/find_library.html https://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=92d1c0966d52887fe84718d5c769198956053f64 |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.