Commit Graph

4 Commits

Author SHA1 Message Date
Daniel Scharrer 896ad251de Teach find_library and find_package to search lib32 paths (#11260)
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``.
2016-06-10 11:09:16 -04:00
Brad King fa7d47ac5c Tests: Fix CMP0054 warnings
Hack the CMP0054 warning locally to be an error and run the test suite.
Resolve CMP0054 in Tests/* code as appropriate for each case.
2014-09-16 09:06:29 -04:00
Daniele E. Domenichelli cc5a0d8f42 FindPkgConfig: More unit tests 2014-03-17 18:10:59 +01:00
Daniele E. Domenichelli 3df5147043 FindPkgConfig: Extend PKG_CONFIG_PATH using CMake variables (#12926)
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.
2014-03-17 09:43:08 -04:00