summaryrefslogtreecommitdiff
path: root/Modules/FindPkgConfig.cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify CMake per-source license noticesBrad King2016-09-271-16/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* Use string(APPEND) in ModulesDaniel Pfeifer2016-07-281-1/+1
| | | | | | | Automate with: find Modules -type f -print0 | xargs -0 perl -i -0pe \ 's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
* Merge topic 'pkgconfig-targets'Brad King2016-06-201-2/+6
|\ | | | | | | | | 8345c646 FindPkgConfig: define the imported targets also when the data comes from cache
| * FindPkgConfig: define the imported targets also when the data comes from cacheRolf Eike Beer2016-06-191-2/+6
| |
* | Teach find_library and find_package to search lib32 paths (#11260)Daniel Scharrer2016-06-101-2/+6
|/ | | | | | | Add a ``FIND_LIBRARY_USE_LIB32_PATHS`` global property analogous to the ``FIND_LIBRARY_USE_LIB64_PATHS`` property. This helps find commands on multilib systems that use ``lib32`` directories and either do not have ``lib`` symlinks or point ``lib`` to ``lib64``.
* FindPkgConfig: optionally create imported target for the found librariesRolf Eike Beer2016-05-141-6/+76
|
* FindPkgConfig: set correctly named variables in cache (#15903)Ben Boeckel2016-03-211-1/+1
| | | | | | | | | | The fix in commit v3.5.0-rc1~27^2 (FindPkgConfig: set standard variables in the cache, 2016-01-20) added the wrong variable name to the cache. The test was only testing that the cache variable existed, not that it also had the correct value. Update the test to ensure that the cache value matches the local variable value. Reported-by: Bernd Lörwald
* FindPkgConfig: set standard variables in the cacheBen Boeckel2016-01-211-0/+3
| | | | | | | | | Fixes a regression introduced when the code was simplified to use the variable queries. Fixes #15903. Reported-by: Bernd Lörwald
* FindPkgConfig: Quote ${_pkgconfig_path} to protect semicolons on WindowsRob Gowin2016-01-191-4/+4
|
* FindPkgConfig: Fix restoration of PKG_CONFIG_PATH in environmentRob Gowin2016-01-151-1/+1
| | | | | | The original value is saved in `_pkg_config_path_old`. Fix this typo left by commit v3.1.0-rc1~763^2 (FindPkgConfig: Extend PKG_CONFIG_PATH using CMake variables, 2014-03-06).
* FindPkgConfig: add PREFIX/share/pkgconfig to PKG_CONFIG_PATH (#15910)Sam Thursfield2016-01-121-0/+1
| | | | | | | | | | Most packages install their .pc files into PREFIX/lib/pkgconfig, but some put them into PREFIX/share/pkgconfig. Either is valid, and pkg-config itself looks in both for the /usr and /usr/local prefixes. This fixes an issue where some packages (yajl, for example) are not found if they are installed into a non-standard prefix and CMAKE_PREFIX_PATH is used to locate them.
* FindPkgConfig: return actual error when a package is not found (#15810)Benjamin Chrétien2015-10-281-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases, CMake returned the following error: -- Checking for module 'foo' -- Package 'foo' not found When the actual error returned by pkg-config was: Package 'bar', required by 'foo', not found Now, the actual error is forwarded to the user. -- Checking for module 'foo' -- Package 'bar', required by 'foo', not found For the standard case (i.e. the package was indeed not found), the CMake error was: -- Checking for module 'foo' -- Package 'foo' not found But it now prints: -- Checking for module 'foo' -- No package 'foo' found The associated test was also updated. ${last} refers to the last CLI argument.
* FindPkgConfig: add a command to query arbitrary variablesBen Boeckel2015-09-211-3/+23
|
* FindPkgConfig: use execute_process to strip trailing whitespaceBen Boeckel2015-09-171-2/+2
|
* FindPkgConfig: remove variable dereferenceRolf Eike Beer2015-08-181-1/+1
| | | | | | | | | | | | | | | | | | If CMAKE_MINIMUM_REQUIRED_VERSION is not set because no cmake_minimum_required() call is present this line can lead to an error as that string is empty so too few arguments are passed to if(): See also "/var/tmp/paludis/build/kde-krdc-15.08.0/work/build/CMakeFiles/CMakeOutput.log". See also "/var/tmp/paludis/build/kde-krdc-15.08.0/work/build/CMakeFiles/CMakeError.log". CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:112 (elseif): given arguments: "VERSION_LESS" "3.1" Unknown arguments specified Call Stack (most recent call first): /usr/share/cmake/Modules/FindPkgConfig.cmake:501 (_pkgconfig_parse_options) /usr/share/cmake/Modules/FindOpenSSL.cmake:43 (pkg_check_modules)
* FindPkgConfig: Capitalize first letter of all message()sChristopher Meng2015-08-121-5/+5
| | | | | This makes FindPkgConfig output more formal and more consistent with many other messages produced by CMake.
* FindPkgConfig: Fix extra paths for CMAKE_{FRAMEWORK,APPBUNDLE}_PATH varsDaniele E. Domenichelli2015-05-291-1/+1
| | | | | | | | The CMAKE_FRAMEWORK_PATH and CMAKE_APPBUNDLE_PATH cache variables are supposed to be used to generate the extra paths passed to pkg-config, but instead the CMAKE_PREFIX_PATH variable is used. This bug was introduced by the refactor in commit v3.1.0-rc1~747^2~1.
* Modules: Check for ARGC before using ARGV#Daniele E. Domenichelli2015-02-271-1/+1
| | | | ARGV# could be defined from a parent scope.
* Modules: Wrap long lines in pre-formatted documentation blocksBrad King2014-11-061-3/+4
| | | | Help format the blocks better for display without a wide screen.
* Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)Rolf Eike Beer2014-04-141-4/+4
| | | | | | The matches have already been calculated and can simply be taken from CMAKE_MATCH_n variables. This avoids multiple compilations of the same or very similar regular expressions.
* FindPkgConfig: Stop processing when REQUIRED package not found (#14381)Christoph Grüninger2014-03-241-1/+1
| | | | Make the behavior similar to find_package.
* FindPkgConfig: small refactoringDaniele E. Domenichelli2014-03-171-24/+31
|
* FindPkgConfig: Extend PKG_CONFIG_PATH using CMake variables (#12926)Daniele E. Domenichelli2014-03-171-8/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use CMAKE_PREFIX_PATH, CMAKE_FRAMEWORK_PATH, and CMAKE_APPBUNDLE_PATH cache and environment variables to extend PKG_CONFIG_PATH before calling pkg-config. In each of the path in these variables it searches for lib/pkgconfig. Then, depending on the system, it searches for lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig (debian) or for lib64/pkgconfig (other 64 bit unixes). If any of these path is found, it is appended to the PKG_CONFIG_PATH enviromnent variable. Add two new arguments to the pkg_check_module and pkg_search_module macro, NO_CMAKE_PATH and NO_CMAKE_ENVIRONMENT_PATH. The new signature are therefore: pkg_check_modules(<PREFIX> [REQUIRED] [QUIET] [NO_CMAKE_PATH] [NO_CMAKE_ENVIRONMENT_PATH] <MODULE> [<MODULE>]*) pkg_search_module(<PREFIX> [REQUIRED] [QUIET] [NO_CMAKE_PATH] [NO_CMAKE_ENVIRONMENT_PATH] <MODULE> [<MODULE>]*) By default, if CMAKE_MINIMUM_REQUIRED_VERSION is 3.1 or later (in order to keep compatibility with the previous behavior), or if PKG_CONFIG_USE_CMAKE_PREFIX_PATH is set, the CMAKE_PREFIX_PATH, CMAKE_FRAMEWORK_PATH, and CMAKE_APPBUNDLE_PATH cache and environment variables will be added to pkgconfig search path. The NO_CMAKE_PATH and NO_CMAKE_ENVIRONMENT_PATH arguments disable this behavior for the cache variables and the environment variables, respectively, similarly to the find_package() command.
* FindPkgConfig: restructure documentation and document commands and variablesDaniele E. Domenichelli2014-03-101-135/+118
|
* FindPkgConfig: Prefer PKG_CONFIG to find pkg-config (#13175)Christoph Grüninger2014-02-271-2/+12
| | | | | If the environment variable PKG_CONFIG is set, use this as the default pkg-config executable.
* Convert builtin help to reStructuredText source filesKitware Robot2013-10-151-48/+110
| | | | | | | | Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-46/+46
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-8/+8
| | | | | | | | | | | | | | | | | Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
* FindPkgConfig.cmake: fix documented output variable not set (#13125,#13132)Rolf Eike Beer2012-04-151-2/+6
| | | | | The real fix is from Yury G. Kudryashov while I added the surrounding cleanups. An additional hint to really get this fixed came from Rex Dieter.
* FindPkgConfig: support version selection of pkg-config itselfRolf Eike Beer2012-02-181-5/+16
|
* FindPkgConfig: respect REQUIRED (#12620)Yury G. Kudryashov2012-01-201-4/+2
| | | | find_package(PkgConfig REQUIRED) now fails if pkg-config is not found.
* Modules: Fix spelling 'To distributed' -> 'To distribute'Todd Gamblin2010-08-091-1/+1
|
* -add QUIET keyword to pkgconfig macrosAlex Neundorf2010-05-081-8/+19
| | | | | | | | | Synced from KDE svn: pkg_check_modules() and pkg_search_module() now both support a QUIET keyword. When given, no messages will be printed (except the REQUIRED ones) This also fixes #10469 (confusing output of FindLibXml2.cmake) Alex
* Remove old license from FindPkgConfig.cmake moduleBrad King2009-10-051-24/+1
| | | | | | | This module was contributed under a BSD-like license. We added CMake's OSI-approved BSD License on top of it. With the author's permission, this commit removes the old license text and puts the author's copyright notice in the block referring to the new license.
* Convert CMake find-modules to BSD LicenseBrad King2009-09-281-0/+12
| | | | | | | This adds copyright/license notification blocks CMake's find-modules. Many of the modules had no notices at all. Some had notices referring to the BSD license already. This commit normalizes existing notices and adds missing notices.
* BUG: fix for bug 6117 pkgconfigBill Hoffman2008-02-071-2/+2
|
* BUG: fix for 5722Bill Hoffman2007-12-171-2/+2
|
* BUG: fix for 6117, fix for second runBill Hoffman2007-12-141-2/+2
|
* STYLE: fix typoAlexander Neundorf2007-08-261-2/+2
| | | | Alex
* ENH: better backwards compatibility, and deprecate PKGCONFIGBill Hoffman2006-12-091-25/+0
|
* ENH: maintain backwards compatibility in UsePkgConfigBill Hoffman2006-11-291-4/+9
|
* ENH: check in new pkgconfig stuff from Enrico ScholzBill Hoffman2006-11-221-0/+380