Package: libgtest-dev
Version: 1.10.0-2
Severity: normal

Dear maintainer,

The libgtest-dev package contains the gtest.pc and gtest_main.pc files
with incorrect prefix so that the libdir and the includedir variables
refer non-existent directories. This prevents using the package with
CMake's FindPkgConfig module.


builder@barberry:/tmp/tmp.rqeIGQnmWX$ cat CMakeLists.txt
cmake_minimum_required(VERSION 3.16)
project(InternalExample)
include(FindPkgConfig)
pkg_search_module(GTest gtest IMPORTED_TARGET)

add_executable(hello hello.cpp)
target_link_libraries(hello PkgConfig::GTest)
builder@barberry:/tmp/tmp.rqeIGQnmWX$ cmake .
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29") 
-- Checking for one of the modules 'gtest'
-- Configuring done
CMake Error in CMakeLists.txt:
  Imported target "PkgConfig::GTest" includes non-existent path

    "/usr/lib/x86_64-linux-gnu/pkgconfig/../../include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in CMakeLists.txt:
  Imported target "PkgConfig::GTest" includes non-existent path

    "/usr/lib/x86_64-linux-gnu/pkgconfig/../../include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

Reply via email to