Pkg_check_modules windows


















Nonetheless, there are some caveats that require attention when using the macro. This value, usually provided in uppercase, is used as prefix to the variables holding the compiler flags and libraries reported by pkg-config. This will also be used as message during the configure checks: checking for FOO A single call to the macro can check for the presence of one or more packages; you'll see later how to make good use of this feature.

Each entry in the list can have a version comparison specifier, with the same syntax as the Requires keyword in the data files themselves. As most of the original autoconf macros, there are boolean values provided, for the cases when the check succeeded or failed. Collectives on Stack Overflow. Learn more. Ask Question. Asked 6 years, 9 months ago. Active 3 months ago. Viewed 77k times. Improve this question. Grumbel Grumbel 5, 5 5 gold badges 36 36 silver badges 47 47 bronze badges.

Add a comment. Active Oldest Votes. Improve this answer. This does not work if the libraries are not in the default directories. This approach doesn't work for vcpkg. Requiring a build tool like CMake to bundle heuristics to snif every library in the world makes no sense, it's not its role.

And if this scheme is followed, the correct way to use a lib is always through calling pkg-config. Show 4 more comments. If you're using cmake and pkg-config in a pretty normal way, this solution works. I think this failed for me because of gitlab.

Globbing source files is bad practice and discouraged. You may have a developer add a bunch of files locally and have the stuff work on their computer, and not commiting all the files needed.

Then they push their changes and it breaks for other people. Sure, this can be caught by some continuous integration, but this is only the most obvious problem. The Meson build system chose to not implement file globing , and CMake developers explicitly discourage globbing. Looks for at least version 2. Looks for both glib Only if both are found will FOO be considered found. Requires any version of xrender. Example output variables set by a successful call:. Retrieves the value of a pkg-config variable varName and stores it in the result variable resultVar in the calling scope.

If pkg-config returns multiple values for the specified variable, resultVar will contain a ;-list.



0コメント

  • 1000 / 1000