Skip to content
  • Daniele E. Domenichelli's avatar
    FindPkgConfig: Extend PKG_CONFIG_PATH using CMake variables (#12926) · 3df51470
    Daniele E. Domenichelli authored and Brad King's avatar Brad King committed
    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 CMA...
    3df51470