| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Revert commit 020976d637 (FindPkgConfig: Populate
_STATIC_LINK_LIBRARIES. Add STATIC_TARGET., 2021-12-31,
v3.24.0-rc1~105^2). Several regressions have been reported.
Revert the feature pending further discussion and design work.
Issue: #21714
Fixes: #23642
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
020976d637 FindPkgConfig: Populate _STATIC_LINK_LIBRARIES. Add STATIC_TARGET.
3c5cc79adb Tests: De-duplicate some code in RunCMake.FindPkgConfig
5cfbc76371 FindPkgConfig: Fix parsing of backslash-escaped spaces in pkg-config output
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7070
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add LINK_LIBRARIES test to demonstrate static linking of transitive
dependencies.
Add STATIC_TARGET argument to pkg_check_modules() and pkg_search_module().
Influences the properties of target produced by IMPORTED_TARGET.
When enabled: target's properties will be populated from <XXX>_STATIC_*
variables instead of from <XXX>_* variables.
Update existing tests concerning properties of targets produced via
IMPORTED_TARGET, to test STATIC_TARGET variant too.
Update existing tests concerning <XXX>_* variables to test <XXX>_STATIC_*
variables too.
Breaking changes to pkg_check_modules() and pkg_search_module():
- Variables CMAKE_FIND_LIBRARY_PREFIXES and CMAKE_FIND_LIBRARY_SUFFIXES can no
longer be used to influence library lookup (i.e. the internal call to
find_library()), because FindPkgConfig now internally relies on these
variables to differentiate between shared and static library lookup.
Prefer CMAKE_SHARED_LIBRARY_PREFIX + CMAKE_SHARED_LIBRARY_SUFFIX, or
CMAKE_STATIC_LIBRARY_PREFIX + CMAKE_STATIC_LIBRARY_SUFFIX, depending on
whether you wish to impact static or shared lookup.
- <XXX>_LINK_LIBRARIES will now be populated only with libraries
located via CMAKE_SHARED_LIBRARY_PREFIX + CMAKE_SHARED_LIBRARY_SUFFIX match
- <XXX>_STATIC_LIBRARIES now processes -framework options
- <XXX>_STATIC_LDFLAGS_OTHER now processes -framework options
- <XXX>_STATIC_CFLAGS_OTHER now processes -isystem options
- <XXX>_STATIC_INCLUDE_DIRS now processes -isystem options
Fixes: #21714
|
| |
| |
| |
| |
| |
| |
| |
| | |
Treat backslash-escaped spaces as "space within argument" rather than
"space delimiting arguments".
Update our `FindPkgConfig_LIBRARY_PATH` test case to escape spaces in
the path, and run it unconditionally.
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Fix the ENV save/restore added by commit 36979f5b43 (FindPkgConfig:
Tolerate PKG_CONFIG_SYSTEM_LIBRARY_PATH in environment, 2021-07-13,
v3.22.0-rc1~407^2) to unset the variable if it was originally not set.
While at it, clarify the value to which we temporarily set it. The
`pkg-config` and `pkgconf` tools only check that the variable is set,
and do not care about the value. Set it to a more true-looking value.
Issue: #22148
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit 94a84dc0af (FindPkgConfig: add pkgconf to the search list.,
2021-07-02, v3.22.0-rc1~468^2), `pkgconf` is preferred over `pkg-config`
if they appear in the same directory. In some environments,
`pkg-config` may be a wrapper that adds semantics beyond either
`pkgconf` or the normal `pkg-config`. Prefer `pkg-config` over
`pkgconf` in order to preserve the prior behavior in such environments.
Fixes: #22976
|
|
|
| |
Fixes: #22870
|
|\
| |
| |
| |
| |
| |
| | |
17e4934dbf FindPkgConfig: Restore legacy behavior when CMP0126 is set to NEW
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6461
|
| |
| |
| |
| |
| |
| | |
Module behavior must be independent from `CMP0126` policy.
Fixes: #22526
|
| |
| |
| |
| |
| |
| |
| |
| | |
Tell `pkg-config --libs` not to filter out `-L` flags for entries of
`PKG_CONFIG_SYSTEM_LIBRARY_PATH` (and `LIBRARY_PATH` for `pkgconf`).
We should always search everywhere the `.pc` file expects.
Fixes: #22148
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's common for some people to use the PKG_CONFIG environment variable
to not only load a custom pkg-config/pkgconf but also to load some
default arguments such as `--static` or `--keep-system-libs` which often
worked since shell scripts would call `$PKG_CONFIG --libs pkg` without
quotes, but this breaks FindPkgConfig since it uses the full string as
`argv[0]` and might try looking for a binary called `pkgconf --static`,
instead of looking for `pkgconf` and adding `--static` as the `argv[1]`
Additionally adds RunCMake.FindPkgConfig ARGN test case
Fixes: #22305
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
|
|
|
|
| |
Fixes: #22180
|
|\
| |
| |
| |
| |
| |
| | |
c7bd2d0d97 FindPkgConfig: Restore preference for first pkg-config in PATH
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5914
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since commit ab8bd48352 (FindPkgConfig: Search for pkg-config.bat file
on a Windows host, 2020-09-25, v3.19.0-rc1~98^2) we prefer
`pkg-config.bat` over `pkg-config` regardless of the order they appear
in the `PATH`. Tell `find_program` to consider all names in each
directory so that the first one in `PATH` of any name wins.
Issue: #21239
|
|/
|
|
| |
Issue: #19715
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The strawberry perl distribution ships a pkg-config file and a
pkg-config.bat file.
find_program() does not usually look for a .bat file program unless
explicitly specified in the NAMES argument. This would cause
CMake to find the non-bat file, and executing that with
execute_process() leads to a
'%1 is not a valid Win32 application' error.
Prefer to search for pkg-config.bat file when on a Windows host, in
additiona to the regular pkg-config file.
Fixes: #21239
|
|
|
|
| |
Fixes: #21239
|
|
|
|
| |
Fixes: #20652
|
| |
|
|
|
|
| |
Inspired-by: FUJI Goro <goro@fastly.com>
|
|\
| |
| |
| |
| |
| |
| | |
c3e0d1ffe9 FindPkgConfig: set policies CMP0054 and CMP0057 to new
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4388
|
| |
| |
| |
| |
| |
| | |
One may encounter warnings if FindPkgConfig is used in any project, even
indirectly, that has set any of these policies to old explicitely or requires
an older version.
|
|/
|
|
|
|
| |
When cross compiling from a unix machine, if(UNIX) is false,
whih causes the path not to be fixed for unix, leading to false
negative if PKG_CONFIG_PATH needs to be probed
|
|
|
|
|
|
|
|
|
|
|
|
| |
pkg-config's .pc files can sometimes provide libraries that are visible to
the linker but not present in CMake's known search paths. In the case
where CMake can find some, but not all of the library dependencies
provided in a .pc file, this allows them to be passed through as "-lfoo"
when the full path can't be found.
This also removes the test failure cases that occured because of this
scenario and adjsuts the remaining tests to account for not-found
libraries
|
|
|
|
|
|
|
|
|
|
| |
When running `pkg_search_module`, it may be useful to get the matching
module name in order to run `pkg_get_variable`.
`pkg_search_module` now defines `<prefix>_MODULE_NAME` which contains
the first matching module name.
Fixes: #19648
|
|
|
|
| |
Fixes: #15805
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* The code snippets in the docs consist of CMake code mixed
with syntax definition punctuation like < > [ ] ... Therefore
a pure CMake lexer is inadequate. Here it is replaced by a
CMake syntax definition parser.
* Fixed syntax definition snippets in FindPkgConfig.cmake to
make best use of syntax highlighting. This source file is the
hardest to support because it contains comparison operators
<= = >=, which need special attention to avoid confusion
with the placeholder indicators <...>.
* Fixed syntax in execute_process.rst (there were unbalanced
brackets).
* Disabled syntax highlighting for long string examples in
cmake-language.7.rst.
* No highlighting of removed syntax in CMP0049
* To inspect the outcome of this patch, see e.g. the pages
* manual/cmake-buildsystem.7.html
* module/ExternalProject.html
* module/FindPkgConfig.html
which are particularly rich in complex code snippets.
|
| |
|
|
|
|
|
| |
This was left out of commit v3.13.0-rc1~14^2 (FindPkgConfig: support
also > and < operators for version compares, 2018-10-02).
|
|
|
|
| |
Fixes: #18416
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`-L` in LDFLAGS doesn't mean that standard search paths should be
excluded. Example:
$ pkg-config --libs libmutter-2
-L/usr/lib/mutter -lmutter-2 -lgtk-3 -lgdk-3 -lmutter-clutter-2 -lcairo-gobject -latk-1.0 -lpangocairo-1.0 -lpango-1.0 -lfribidi -ljson-glib-1.0 -lgio-2.0 -lwayland-egl -lwayland-client -lXtst -lXi -lmutter-cogl-2 -lcairo
-lgmodule-2.0 -pthread -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lgbm -ldrm -lwayland-server -lEGL -lXext -lXdamage -lXfixes -lXcomposite -lXrandr -lX11
Most of these libraries are located at standard paths, not in
`/usr/lib/mutter`.
Fixes: #17954
|
|
|
|
| |
_props is never used, it was a leftover from a development step.
|
| |
|
|
|
|
|
|
| |
- Moved block of misplaced comments to correct section
- Improved grammar, readability and consistency
- Updated to conform to style guidelines
|
|
|
|
|
|
| |
The pkgconfig dir is placed at `${PREFIX}/libdata/pkgconfig` on FreeBSD
instead of `${PREFIX}/lib/pkgconfig`, where `${PREFIX}` is `/usr/local`
as default.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit v3.8.0-rc1~47^2 (FindPkgConfig: Recheck pkg-config on
parameter change, 2017-01-17) calling `pkg_check_modules` always
re-runs. The problem is that if there are only 2 arguments passed to
`pkg_check_modules```, then `_module0` will be set and `ARGN` will be
empty. When this is written to cache it will be stored as just the
value of `_module0` without any semicolon, so on the next run this
doesn't match the expected value and the search is rerun.
Revise the logic to handle the case of empty `ARGN` separately.
Fixes: #17003
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During search of the library file `pkg_check_modules()` attempts to find
it in last specified library path in `${_prefix}_LDFLAGS`, that after
dependency resolving contains path to standard location.
So in case when `${_prefix}_LDFLAGS` has:
-L/prefix;-L/usr/local/lib;-llibrary_from_prefix;-ldependency
`library_from_prefix` will not be found.
As solution need try to find the library in all paths preceding to the
library.
Fixes: #16873
|
|
|
|
|
|
|
|
| |
Detect x32-abi through CMakeCompilerABI infrastruture and use this
information at runtime to determine the correct library paths with
`FIND_LIBRARY_USE_LIBX32_PATHS`.
Fixes: #15994
|
|
|
|
| |
Instead of the deprecated --atleast-version one.
|
|
|
|
|
|
|
|
|
| |
Currently, once pkg_check_modules succeeds, it will never call
_pkg_check_modules_internal again. That means that if the parameters
to pkg_check_modules are changed, cmake will be called to reconfigure,
but nothing will change. This change is to store the full string of
arguments to pkg_check_modules and override the FOUND optimization so
that the arguments are reevaluated when modified.
|
|
|
|
|
|
| |
Calls like `pkg_check_modules(somelibrary>=3.22)` that specify a version
requirement should still display an informative error when the package
is not found. Fix our logic accordingly.
|
|
|
|
|
|
|
| |
The options to the find_library call to create the imported target
used a literal string "HINTS /path NO_DEFAULT_PATH" instead of a
list of options. This resulted in never finding any library in my
testing.
|