Skip to content
  • Benjamin Chrétien's avatar
    FindPkgConfig: return actual error when a package is not found (#15810) · 1bfb527f
    Benjamin Chrétien authored and Brad King's avatar Brad King committed
    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.
    1bfb527f